Table of Contents

Class Duration

Namespace
ComponentSpace.Saml2.Metadata
Assembly
ComponentSpace.Saml2.dll

Represents the XML schema duration type.

public class Duration
Inheritance
Duration
Inherited Members

Remarks

Refer to the XML Schema specification for further details.

Constructors

Duration()

Initializes a new instance of the Duration class.

public Duration()

Duration(string)

Initializes a new instance of the Duration class.

public Duration(string duration)

Parameters

duration string

The duration as a string.

Remarks

The format of the string is: [-]PnYnMnDTnHnMnS.

Exceptions

SamlSerializationException

Thrown when the string format is invalid.

Properties

Days

Gets or sets the number of days.

public int Days { get; set; }

Property Value

int

The number of days.

Hours

Gets or sets the number of hours.

public int Hours { get; set; }

Property Value

int

The number of hours.

Minutes

Gets or sets the number of minutes.

public int Minutes { get; set; }

Property Value

int

The number of minutes.

Months

Gets or sets the number of months.

public int Months { get; set; }

Property Value

int

The number of months.

Negative

Gets or sets the negative duration flag.

public bool Negative { get; set; }

Property Value

bool

The negative duration flag.

Seconds

Gets or sets the number of seconds.

public decimal Seconds { get; set; }

Property Value

decimal

The number of seconds.

Years

Gets or sets the number of years.

public int Years { get; set; }

Property Value

int

The number of years.

Methods

ToString()

Returns a string that represents the duration.

public override string ToString()

Returns

string

A string that represents the duration.

Remarks

The format of the string is: [-]PnYnMnDTnHnMnS.