UriTypeConverter.IsValid(ITypeDescriptorContext, Object) 方法

定义

返回给定值对象是 Uri,还是可以从该对象创建 UriReturns whether the given value object is a Uri or a Uri can be created from it.

public:
 override bool IsValid(System::ComponentModel::ITypeDescriptorContext ^ context, System::Object ^ value);
public override bool IsValid (System.ComponentModel.ITypeDescriptorContext context, object value);
override this.IsValid : System.ComponentModel.ITypeDescriptorContext * obj -> bool
Public Overrides Function IsValid (context As ITypeDescriptorContext, value As Object) As Boolean

参数

context
ITypeDescriptorContext

一个 ITypeDescriptorContext,用于提供格式上下文。An ITypeDescriptorContext that provides a format context.

value
Object

要测试其有效性的 ObjectThe Object to test for validity.

返回

如果 truevalue,或者是可以从中创建 UriString,则为 Uri;否则为 falsetrue if value is a Uri or a String from which a Uri can be created; otherwise, false.

适用于