DataMemberConverter.GetStandardValuesExclusive(ITypeDescriptorContext) 方法

定义

获取一个值,该值指示从 GetStandardValues() 返回的标准值集合是否为所有可能值的列表。

public:
 override bool GetStandardValuesExclusive(System::ComponentModel::ITypeDescriptorContext ^ context);
public override bool GetStandardValuesExclusive (System.ComponentModel.ITypeDescriptorContext context);
override this.GetStandardValuesExclusive : System.ComponentModel.ITypeDescriptorContext -> bool
Public Overrides Function GetStandardValuesExclusive (context As ITypeDescriptorContext) As Boolean

参数

context
ITypeDescriptorContext

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

返回

Boolean

如果从 TypeConverter.StandardValuesCollection 返回的 GetStandardValues() 是所有可能的有效值的排他列表,则为 true;如果还可能有其他值,则为 false

当在此类中实现时,此方法始终返回 false

注解

如果该列表是独占的(如在枚举数据类型中),则其他任何值都无效。 如果列表不是独占的,则除了提供的标准值列表之外,还有其他有效值 GetStandardValues

继承者说明

如果要转换的类型支持标准值,请重写此方法。

context 参数可用于提取有关从中调用该转换器的环境的附加信息。 这可能是 null,因此应始终检查。 此外,对象的属性 context 也可能返回 null

适用于

另请参阅