Class Duration
Represents the XML schema duration type.
Inheritance
Inherited Members
Namespace: ComponentSpace.Saml2.Metadata
Assembly: ComponentSpace.Saml2.dll
Syntax
public class Duration
Remarks
Refer to the XML Schema specification for further details.
Constructors
Duration()
Initializes a new instance of the Duration
class.
Declaration
public Duration()
Duration(String)
Initializes a new instance of the Duration
class.
Declaration
public Duration(string duration)
Parameters
Type | Name | Description |
---|---|---|
System. |
duration | The duration as a string. |
Remarks
The format of the string is: [-]PnYnMnDTnHnMnS.
Exceptions
Type | Condition |
---|---|
Saml |
Thrown when the string format is invalid. |
Properties
Days
Gets or sets the number of days.
Declaration
public int Days { get; set; }
Property Value
Type | Description |
---|---|
System. |
The number of days. |
Hours
Gets or sets the number of hours.
Declaration
public int Hours { get; set; }
Property Value
Type | Description |
---|---|
System. |
The number of hours. |
Minutes
Gets or sets the number of minutes.
Declaration
public int Minutes { get; set; }
Property Value
Type | Description |
---|---|
System. |
The number of minutes. |
Months
Gets or sets the number of months.
Declaration
public int Months { get; set; }
Property Value
Type | Description |
---|---|
System. |
The number of months. |
Negative
Gets or sets the negative duration flag.
Declaration
public bool Negative { get; set; }
Property Value
Type | Description |
---|---|
System. |
The negative duration flag. |
Seconds
Gets or sets the number of seconds.
Declaration
public decimal Seconds { get; set; }
Property Value
Type | Description |
---|---|
System. |
The number of seconds. |
Years
Gets or sets the number of years.
Declaration
public int Years { get; set; }
Property Value
Type | Description |
---|---|
System. |
The number of years. |
Methods
ToString()
Returns a string that represents the duration.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System. |
A string that represents the duration. |
Overrides
Remarks
The format of the string is: [-]PnYnMnDTnHnMnS.