System.Configuration.PositiveTimeSpanValidatorAttribute 类

方法描述

以声明的方式指示 .NET Framework 对配置属性执行时间验证。 此类不能被继承。

语法定义(C# System.Configuration.PositiveTimeSpanValidatorAttribute 类 的用法)

[AttributeUsageAttribute(AttributeTargets.Property)]
public sealed class PositiveTimeSpanValidatorAttribute : ConfigurationValidatorAttribute

构造函数

构造函数名称 构造函数描述
PositiveTimeSpanValidatorAttribute 初始化 PositiveTimeSpanValidatorAttribute 类的新实例。

成员/方法

方法名称 方法描述
Equals 基础结构。返回一个值,该值指示此实例是否与指定的对象相等。 (继承自 Attribute。)
Finalize 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。)
GetHashCode 返回此实例的哈希代码。 (继承自 Attribute。)
GetType 获取当前实例的 Type。 (继承自 Object。)
IsDefaultAttribute 当在派生类中重写时,指示此实例的值是否是派生类的默认值。 (继承自 Attribute。)
Match 当在派生类中重写时,返回一个指示此实例是否等于指定对象的值。 (继承自 Attribute。)
MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
ToString 返回表示当前对象的字符串。 (继承自 Object。)

提示和注释

可使用 PositiveTimeSpanValidatorAttribute 特性修饰配置属性。 这指示 .NET Framework 使用 PositiveTimeSpanValidator 对象对属性进行验证,并传递修饰参数的值。

只能对属性类型应用 PositiveTimeSpanValidatorAttribute 对象。

System.Configuration.PositiveTimeSpanValidatorAttribute 类例子


继承层次结构

System.Object

System.Attribute

System.Configuration.ConfigurationValidatorAttribute

System.Configuration.PositiveTimeSpanValidatorAttribute

命名空间

namespace: System.Configuration

程序集: System.Configuration(在 System.Configuration.dll 中)

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

版本信息

.NET Framework 受以下版本支持:4、3.5、3.0、2.0 .NET Framework Client Profile 受以下版本支持:4、3.5 SP1

适用平台

Windows 7, Windows Vista SP1 或更高版本, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008(不支持服务器核心), Windows Server 2008 R2(支持 SP1 或更高版本的服务器核心), Windows Server 2003 SP2 .NET Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。