C# Class Yaml.Timestamp

Yaml Timestamp node uri: tag:yaml.org,2002:timestamp
Inheritance: Scalar
Exibir arquivo Open project: rs-services/RightGridWindowsImplementation Class Usage Examples

Public Methods

Method Description
Timestamp ( System.DateTime datetime ) : System

Basic constructor that takes a given datetime

Timestamp ( System.DateTime datetime, double timezone ) : System

Basic constructor, that also gives the posibility to set a timezone

Timestamp ( ParseStream stream ) : System

Parse a DateTime

ToString ( ) : string

To String

Protected Methods

Method Description
Write ( WriteStream stream ) : void

Write to YAML

Private Methods

Method Description
ParseMilliSeconds ( ParseStream stream ) : int

Parse the milliseconds

ParseNumber ( ParseStream stream, int length ) : int

Parse an integer

ParseTime ( ParseStream stream, int &hour, int &minutes, int &seconds ) : void

Parse the time (hours, minutes, seconds)

ParseTimezone ( ParseStream stream ) : double

Parse the time zone

SkipChar ( ParseStream stream, char toSkip ) : void

Skips a specified char, and throws an exception when another char was found.

SkipWhitespace ( ParseStream stream ) : void

Skips the spaces * and tabs * in the current stream

YamlString ( ) : string

Yaml notation for this datetime

Method Details

Timestamp() public method

Basic constructor that takes a given datetime
public Timestamp ( System.DateTime datetime ) : System
datetime System.DateTime A .NET 1.0 datetime
return System

Timestamp() public method

Basic constructor, that also gives the posibility to set a timezone
public Timestamp ( System.DateTime datetime, double timezone ) : System
datetime System.DateTime A .NET 1.0 datetime
timezone double The offset, in hours,r to UTC that determine the timezone
return System

Timestamp() public method

Parse a DateTime
public Timestamp ( ParseStream stream ) : System
stream ParseStream
return System

ToString() public method

To String
public ToString ( ) : string
return string

Write() protected method

Write to YAML
protected Write ( WriteStream stream ) : void
stream WriteStream
return void