DataSourceCacheDurationConverter.CanConvertFrom 方法

定义

确定是否可以 DataSourceCacheDurationConverter 将给定源类型中的对象转换为对象 Int32

public:
 override bool CanConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ context, Type ^ sourceType);
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, Type sourceType);
override this.CanConvertFrom : System.ComponentModel.ITypeDescriptorContext * Type -> bool
Public Overrides Function CanConvertFrom (context As ITypeDescriptorContext, sourceType As Type) As Boolean

参数

context
ITypeDescriptorContext

提供格式上下文的一 ITypeDescriptorContext 个。

sourceType
Type

Type 个表示转换器转换的类型。

返回

true 如果此转换器可以执行该操作,则为否则,为 false.

注解

DataSourceCacheDurationConverter 显式处理 string 类型。 否则,它调用其基类, Int32Converter以做出决定。

适用于