Udostępnij za pomocą


BinderBase<T>.IValueSource.TryGetValue Metoda

Definicja

Próbuje uzyskać wartość z kontekstu powiązania. Wartość zwracana wskazuje, czy wartość zgodna z określonym deskryptorem wartości była obecna.

 virtual bool System.CommandLine.Binding.IValueSource.TryGetValue(System::CommandLine::Binding::IValueDescriptor ^ valueDescriptor, System::CommandLine::Binding::BindingContext ^ bindingContext, [Runtime::InteropServices::Out] System::Object ^ % boundValue) = System::CommandLine::Binding::IValueSource::TryGetValue;
bool IValueSource.TryGetValue (System.CommandLine.Binding.IValueDescriptor valueDescriptor, System.CommandLine.Binding.BindingContext? bindingContext, out object? boundValue);
abstract member System.CommandLine.Binding.IValueSource.TryGetValue : System.CommandLine.Binding.IValueDescriptor * System.CommandLine.Binding.BindingContext * obj -> bool
override this.System.CommandLine.Binding.IValueSource.TryGetValue : System.CommandLine.Binding.IValueDescriptor * System.CommandLine.Binding.BindingContext * obj -> bool
Function TryGetValue (valueDescriptor As IValueDescriptor, bindingContext As BindingContext, ByRef boundValue As Object) As Boolean Implements IValueSource.TryGetValue

Parametry

valueDescriptor
IValueDescriptor

Deskryptor dla wartości, która ma być powiązana.

bindingContext
BindingContext

Kontekst powiązania, z którego ma być powiązana wartość.

boundValue
Object

Gdy ta metoda zwróci wartość, zawiera powiązaną wartość.

Zwraca

true jeśli znaleziono pasującą wartość; w przeciwnym razie , false.

Implementuje

Dotyczy