Show / Hide Table of Contents

Class Duration

Represents the XML schema duration type.

Inheritance
System.Object
Duration
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
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.String duration

The duration as a string.

Remarks

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

Exceptions
Type Condition
SamlSerializationException

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.Int32

The number of days.

Hours

Gets or sets the number of hours.

Declaration
public int Hours { get; set; }
Property Value
Type Description
System.Int32

The number of hours.

Minutes

Gets or sets the number of minutes.

Declaration
public int Minutes { get; set; }
Property Value
Type Description
System.Int32

The number of minutes.

Months

Gets or sets the number of months.

Declaration
public int Months { get; set; }
Property Value
Type Description
System.Int32

The number of months.

Negative

Gets or sets the negative duration flag.

Declaration
public bool Negative { get; set; }
Property Value
Type Description
System.Boolean

The negative duration flag.

Seconds

Gets or sets the number of seconds.

Declaration
public decimal Seconds { get; set; }
Property Value
Type Description
System.Decimal

The number of seconds.

Years

Gets or sets the number of years.

Declaration
public int Years { get; set; }
Property Value
Type Description
System.Int32

The number of years.

Methods

ToString()

Returns a string that represents the duration.

Declaration
public override string ToString()
Returns
Type Description
System.String

A string that represents the duration.

Overrides
System.Object.ToString()
Remarks

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

In This Article
Back to top Copyright © ComponentSpace Pty Ltd 2017-2022. All rights reserved.