IValueSource.TryGetValue(IValueDescriptor, BindingContext, Object) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從綁定上下文取得一個值。 回傳值表示是否存在與指定值描述符相符的值。
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
參數
- valueDescriptor
- IValueDescriptor
綁定值的描述符。
- bindingContext
- BindingContext
這是綁定價值的綁定脈絡。
- boundValue
- Object
即是界定值。
傳回
true若找到匹配值;否則,。 false