Show / Hide Table of Contents

Class Duration

Represents the XML schema duration type.

Inheritance
object
Duration
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, 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
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
int

The number of days.

Hours

Gets or sets the number of hours.

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

The number of hours.

Minutes

Gets or sets the number of minutes.

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

The number of minutes.

Months

Gets or sets the number of months.

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

The number of months.

Negative

Gets or sets the negative duration flag.

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

The negative duration flag.

Seconds

Gets or sets the number of seconds.

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

The number of seconds.

Years

Gets or sets the number of years.

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

The number of years.

Methods

ToString()

Returns a string that represents the duration.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents the duration.

Overrides
object.ToString()
Remarks

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

In this article
Back to top Copyright © ComponentSpace Pty Ltd 2017-2025. All rights reserved.