LifeTime Constructor (DateTime, Int64)

Initializes a new instance of the LifeTime class using the specified creation time and time-to-live value.

Namespace: Microsoft.Web.Services2.Security
Assembly: Microsoft.Web.Services2 (in microsoft.web.services2.dll)

Usage

'Usage
Dim created As DateTime
Dim ttlInSeconds As Long
Dim lifeTime1 As New LifeTime(created, ttlInSeconds)

Syntax

'Declaration
Public Sub New( _
    ByVal created As DateTime, _
    ByVal ttlInSeconds As Long _
)
public LifeTime(
    DateTime created, 
    long ttlInSeconds
);
public: LifeTime(
    DateTime^ created, 
    Int64 ttlInSeconds
);
public LifeTime(
    DateTime created, 
    long ttlInSeconds
);
public function LifeTime(
     created : DateTime, 
     ttlInSeconds : long
);

Parameters

  • created
    A System.DateTime that specifies the creation time.
  • ttlInSeconds
    The number of seconds for the LifeTime.

Exceptions

Exception type Condition
System.ArgumentException

ttlInSeconds is less than 0 and not equal to System.Threading.Timeout.Infinite.

Remarks

This constructor sets the Created property to the value of the created parameter, and it sets the Expires property to a value that is ttlInSeconds seconds later than created.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, and Windows 2000

Target Platforms

Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, Pocket PC, Windows CE, Smart Phone

See Also

Reference

LifeTime Class
Microsoft.Web.Services2.Security Namespace

Other Resources

LifeTime Members