C# 클래스 bsharptree.example.simpledb.objectid.BsonUtils

A static class containing BSON utility methods.
파일 보기 프로젝트 열기: thoward/bsharptree

공개 메소드들

메소드 설명
ParseHexString ( string s ) : byte[]

Parses a hex string to a byte array.

ToDateTimeFromMillisecondsSinceEpoch ( long millisecondsSinceEpoch ) : System.DateTime

Converts from number of milliseconds since Unix epoch to DateTime.

ToHexString ( byte bytes ) : string

Converts a byte array to a hex string.

ToLocalTime ( System.DateTime dateTime, DateTimeKind kind ) : System.DateTime

Converts a DateTime to local time (with special handling for MinValue and MaxValue).

ToMillisecondsSinceEpoch ( System.DateTime dateTime ) : long

Converts a DateTime to number of milliseconds since Unix epoch.

ToUniversalTime ( System.DateTime dateTime ) : System.DateTime

Converts a DateTime to UTC (with special handling for MinValue and MaxValue).

TryParseHexString ( string s, byte &bytes ) : bool

Tries to parse a hex string to a byte array.

메소드 상세

ParseHexString() 공개 정적인 메소드

Parses a hex string to a byte array.
public static ParseHexString ( string s ) : byte[]
s string The hex string.
리턴 byte[]

ToDateTimeFromMillisecondsSinceEpoch() 공개 정적인 메소드

Converts from number of milliseconds since Unix epoch to DateTime.
public static ToDateTimeFromMillisecondsSinceEpoch ( long millisecondsSinceEpoch ) : System.DateTime
millisecondsSinceEpoch long The number of milliseconds since Unix epoch.
리턴 System.DateTime

ToHexString() 공개 정적인 메소드

Converts a byte array to a hex string.
public static ToHexString ( byte bytes ) : string
bytes byte The byte array.
리턴 string

ToLocalTime() 공개 정적인 메소드

Converts a DateTime to local time (with special handling for MinValue and MaxValue).
public static ToLocalTime ( System.DateTime dateTime, DateTimeKind kind ) : System.DateTime
dateTime System.DateTime A DateTime.
kind DateTimeKind A DateTimeKind.
리턴 System.DateTime

ToMillisecondsSinceEpoch() 공개 정적인 메소드

Converts a DateTime to number of milliseconds since Unix epoch.
public static ToMillisecondsSinceEpoch ( System.DateTime dateTime ) : long
dateTime System.DateTime A DateTime.
리턴 long

ToUniversalTime() 공개 정적인 메소드

Converts a DateTime to UTC (with special handling for MinValue and MaxValue).
public static ToUniversalTime ( System.DateTime dateTime ) : System.DateTime
dateTime System.DateTime A DateTime.
리턴 System.DateTime

TryParseHexString() 공개 정적인 메소드

Tries to parse a hex string to a byte array.
public static TryParseHexString ( string s, byte &bytes ) : bool
s string The hex string.
bytes byte A byte array.
리턴 bool