Lifetime 构造函数

定义

初始化 Lifetime 类的新实例。Initializes a new instance of the Lifetime class.

重载

Lifetime(DateTime, DateTime)

使用指定的创建和过期时间初始化 Lifetime 类的新实例。Initializes a new instance of the Lifetime class with the specified creation and expiration time.

Lifetime(Nullable<DateTime>, Nullable<DateTime>)

使用指定的创建和过期时间初始化 Lifetime 类的新实例。Initializes a new instance of the Lifetime class with the specified creation and expiration time.

Lifetime(DateTime, DateTime)

使用指定的创建和过期时间初始化 Lifetime 类的新实例。Initializes a new instance of the Lifetime class with the specified creation and expiration time.

public:
 Lifetime(DateTime created, DateTime expires);
public Lifetime (DateTime created, DateTime expires);
new System.IdentityModel.Protocols.WSTrust.Lifetime : DateTime * DateTime -> System.IdentityModel.Protocols.WSTrust.Lifetime
Public Sub New (created As DateTime, expires As DateTime)

参数

created
DateTime

DateTime 表示 UTC 中标记的创建时间。A DateTime that represents the token creation time in UTC.

expires
DateTime

一个 DateTime,表示 UTC 中令牌的过期时间。A DateTime that represents the token expiration time in UTC.

例外

created 指定的时间将 expires指定的时间之前发生。The time specified by created occurs before the time specified by expires.

适用于

Lifetime(Nullable<DateTime>, Nullable<DateTime>)

使用指定的创建和过期时间初始化 Lifetime 类的新实例。Initializes a new instance of the Lifetime class with the specified creation and expiration time.

public:
 Lifetime(Nullable<DateTime> created, Nullable<DateTime> expires);
public Lifetime (DateTime? created, DateTime? expires);
new System.IdentityModel.Protocols.WSTrust.Lifetime : Nullable<DateTime> * Nullable<DateTime> -> System.IdentityModel.Protocols.WSTrust.Lifetime
Public Sub New (created As Nullable(Of DateTime), expires As Nullable(Of DateTime))

参数

created
Nullable<DateTime>

DateTime 指定 UTC 中标记的创建时间。A DateTime that specifies the token creation time in UTC. 可以为 nullCan be null.

expires
Nullable<DateTime>

DateTime 指定 UTC 中标记过期的时间。A DateTime that specifies the token expiration time in UTC. 可以为 nullCan be null.

例外

created 指定的时间将 expires指定的时间之前发生。The time specified by created occurs before the time specified by expires.

适用于