C# 클래스 NetworkCommsDotNet.Tools.ShortGuid

Represents a shortform globally unique identifier (GUID) which is easier to handle than Guid.NewGuid(). This class is used to uniquely identify a peer/application using NetworkComms.Net. See here for original source.
파일 보기 프로젝트 열기: MarcFletcher/NetworkComms.Net 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Empty ShortGuid

공개 메소드들

메소드 설명
Decode ( string value ) : System.Guid

Decodes the given base64 string

Encode ( System.Guid guid ) : string

Encodes the given Guid as a base64 string that is 22 characters long.

Encode ( string value ) : string

Creates a new instance of a Guid using the string value, then returns the base64 encoded version of the Guid.

Equals ( object obj ) : bool

Returns a value indicating whether this instance and a specified Object represent the same type and value.

GetHashCode ( ) : int

Returns the HashCode for underlying Guid.

NewGuid ( ) : ShortGuid

Initialises a new instance of the ShortGuid class

ShortGuid ( System.Guid guid ) : System

Creates a ShortGuid from a Guid

ShortGuid ( string value ) : System

Creates a ShortGuid from a base64 encoded string

ToString ( ) : string

Returns the base64 encoded guid as a string

operator ( ) : bool

Determines if both ShortGuids have the same underlying Guid value.

메소드 상세

Decode() 공개 정적인 메소드

Decodes the given base64 string
public static Decode ( string value ) : System.Guid
value string The base64 encoded string of a Guid
리턴 System.Guid

Encode() 공개 정적인 메소드

Encodes the given Guid as a base64 string that is 22 characters long.
public static Encode ( System.Guid guid ) : string
guid System.Guid The Guid to encode
리턴 string

Encode() 공개 정적인 메소드

Creates a new instance of a Guid using the string value, then returns the base64 encoded version of the Guid.
public static Encode ( string value ) : string
value string An actual Guid string (i.e. not a ShortGuid)
리턴 string

Equals() 공개 메소드

Returns a value indicating whether this instance and a specified Object represent the same type and value.
public Equals ( object obj ) : bool
obj object The object to compare
리턴 bool

GetHashCode() 공개 메소드

Returns the HashCode for underlying Guid.
public GetHashCode ( ) : int
리턴 int

NewGuid() 공개 정적인 메소드

Initialises a new instance of the ShortGuid class
public static NewGuid ( ) : ShortGuid
리턴 ShortGuid

ShortGuid() 공개 메소드

Creates a ShortGuid from a Guid
public ShortGuid ( System.Guid guid ) : System
guid System.Guid The Guid to encode
리턴 System

ShortGuid() 공개 메소드

Creates a ShortGuid from a base64 encoded string
public ShortGuid ( string value ) : System
value string The encoded guid as a /// base64 string
리턴 System

ToString() 공개 메소드

Returns the base64 encoded guid as a string
public ToString ( ) : string
리턴 string

operator() 공개 정적인 메소드

Determines if both ShortGuids have the same underlying Guid value.
public static operator ( ) : bool
리턴 bool

프로퍼티 상세

Empty 공개적으로 정적으로 프로퍼티

A read-only instance of the ShortGuid class whose value is guaranteed to be all zeroes.
public static ShortGuid,NetworkCommsDotNet.Tools Empty
리턴 ShortGuid