Språk

IValueSource.TryGetValue(IValueDescriptor, BindingContext, Object) Metod

Definition

Hämtar ett värde från en bindningskontext. Ett returvärde anger om ett värde som matchar den angivna värdebeskrivningen fanns.

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

Parametrar

valueDescriptor
IValueDescriptor

Beskrivningen för värdet som ska bindas.

bindingContext
BindingContext

Bindningskontexten som värdet ska bindas från.

boundValue
Object

Det bundna värdet.

Returer

trueom ett matchande värde hittades; annars . false

Gäller för