C# 클래스 System.Xml.Schema.XsdDuration

This structure holds components of an Xsd Duration. It is used internally to support Xsd durations without loss of fidelity. XsdDuration structures are immutable once they've been created.
파일 보기 프로젝트 열기: gbarnett/shared-source-cli-2.0 1 사용 예제들

공개 메소드들

메소드 설명
Normalize ( ) : XsdDuration

Normalize year-month part and day-time part so that month < 12, hour < 24, minute < 60, and second < 60.

ToString ( ) : string

Return the string representation of this Xsd duration.

ToTimeSpan ( ) : System.TimeSpan

Internal helper method that converts an Xsd duration to a TimeSpan value. This code uses the estimate that there are 365 days in the year and 30 days in a month.

XsdDuration ( System.TimeSpan timeSpan ) : System

Construct an XsdDuration from a TimeSpan value.

XsdDuration ( bool isNegative, int years, int months, int days, int hours, int minutes, int seconds, int nanoseconds ) : System

Construct an XsdDuration from component parts.

XsdDuration ( string s ) : System

Constructs an XsdDuration from a string in the xsd:duration format. Components are stored with loss of fidelity (except in the case of overflow).

XsdDuration ( string s, DurationType durationType ) : System

Constructs an XsdDuration from a string in the xsd:duration format. Components are stored without loss of fidelity (except in the case of overflow).

비공개 메소드들

메소드 설명
ToString ( DurationType durationType ) : string

Return the string representation according to xsd:duration rules, xdt:dayTimeDuration rules, or xdt:yearMonthDuration rules.

ToTimeSpan ( DurationType durationType ) : System.TimeSpan

Internal helper method that converts an Xsd duration to a TimeSpan value. This code uses the estimate that there are 365 days in the year and 30 days in a month.

TryParse ( string s, DurationType durationType, XsdDuration &result ) : Exception
TryParse ( string s, XsdDuration &result ) : Exception
TryParseDigits ( string s, int &offset, bool eatDigits, int &result, int &numDigits ) : string
TryToTimeSpan ( DurationType durationType, System.TimeSpan &result ) : Exception
TryToTimeSpan ( System.TimeSpan &result ) : Exception
XsdDuration ( System.TimeSpan timeSpan, DurationType durationType ) : System

Construct an XsdDuration from a TimeSpan value that represents an xsd:duration, an xdt:dayTimeDuration, or an xdt:yearMonthDuration.

메소드 상세

Normalize() 공개 메소드

Normalize year-month part and day-time part so that month < 12, hour < 24, minute < 60, and second < 60.
public Normalize ( ) : XsdDuration
리턴 XsdDuration

ToString() 공개 메소드

Return the string representation of this Xsd duration.
public ToString ( ) : string
리턴 string

ToTimeSpan() 공개 메소드

Internal helper method that converts an Xsd duration to a TimeSpan value. This code uses the estimate that there are 365 days in the year and 30 days in a month.
public ToTimeSpan ( ) : System.TimeSpan
리턴 System.TimeSpan

XsdDuration() 공개 메소드

Construct an XsdDuration from a TimeSpan value.
public XsdDuration ( System.TimeSpan timeSpan ) : System
timeSpan System.TimeSpan
리턴 System

XsdDuration() 공개 메소드

Construct an XsdDuration from component parts.
public XsdDuration ( bool isNegative, int years, int months, int days, int hours, int minutes, int seconds, int nanoseconds ) : System
isNegative bool
years int
months int
days int
hours int
minutes int
seconds int
nanoseconds int
리턴 System

XsdDuration() 공개 메소드

Constructs an XsdDuration from a string in the xsd:duration format. Components are stored with loss of fidelity (except in the case of overflow).
public XsdDuration ( string s ) : System
s string
리턴 System

XsdDuration() 공개 메소드

Constructs an XsdDuration from a string in the xsd:duration format. Components are stored without loss of fidelity (except in the case of overflow).
public XsdDuration ( string s, DurationType durationType ) : System
s string
durationType DurationType
리턴 System