C# 클래스 Rebel.Framework.HiveEntityUri

상속: IEquatable, IEquatable, IEquatable
파일 보기 프로젝트 열기: RebelCMS/rebelcmsxu5 1 사용 예제들

공개 메소드들

메소드 설명
CompareString ( string id1, string id2 ) : bool

Compares 2 strings that are hive ids and checks if they are equal

ConvertIntToGuid ( int id ) : HiveEntityUri

Equals ( other ) : bool

Indicates whether the current object is equal to another object of the same type.

Equals ( Guid other ) : bool

Indicates whether the current object is equal to another object of the same type.

Equals ( int other ) : bool
Equals ( object obj ) : bool
Equals ( string other ) : bool

Checks if the string is the same, if it is not, it checks if the UrlDecoded or Encoded version of the string is the same

FromUriString ( string baseUri ) : HiveEntityUri

Creates an entity Uri from a string base

GetAllStringParts ( char delimiter = '/' ) : string

Concatenates all non-empty string parts together with the specified char as the delimiter

GetHashCode ( ) : int

Generated by Resharper, though it seems like its good

GetHtmlId ( ) : string

Returns a string id that can be used for Html elements

HiveEntityUri ( ) : System

Constructor

HiveEntityUri ( Guid guid ) : System

Creates an entity Uri from a Guid

HiveEntityUri ( Int32 id ) : System

Creates an entity Uri from a Int32

HiveEntityUri ( string identifier ) : System

Creates an entity from a generic string identitfier

The usage of this constructor is for things such as file paths

HiveEntityUri ( string schemeName, string providerKey, Guid id ) : System
HiveEntityUri ( string schemeName, string providerKey, int id ) : System

Initializes a new instance of the HiveEntityUri class.

HiveEntityUri ( string schemeName, string providerKey, string id ) : System
IsNullOrEmpty ( id ) : bool

Checks if the uri is null or 'Empty'

IsSystem ( ) : bool

Determines if the HiveEntityUri is a system Uri, this is determined if the ConvertIntToGuid is called with a nagative int.

Parse ( string value ) : HiveEntityUri

Parses the string into a HiveEntityUri, if parsing fails and exception is thrown

ToFriendlyString ( ) : string

Outputs a string for use with display/presentation

ToString ( ) : string

Returns the string representation of the HiveEntityUri for use in URLs

This checks what type of SerializationType is being used, for most cases (GUIDs and Ints) the output will be formatted as a 'readable' string, for string types, the output will be formatted as a safely casted (for use in URLs) Base64 encoded string.

TryParse ( string value, &uri ) : bool

Attempts to parse the value into a HiveEntityUri, this will check for types

operator ( ) : bool

Equality operator between HiveEntityUri's

비공개 메소드들

메소드 설명
FormatGuid ( Guid guid ) : string
FormatInt ( Int32 id ) : string
FormatString ( string id ) : string
GetGuidParts ( ) : IEnumerable
GetIntParts ( ) : IEnumerable
HiveEntityUri ( string identifier, bool isUri ) : System

Creates an entity from a string identitfier

The usage of this constructor is for things such as file paths

HiveEntityUriDecode ( string encoded ) : string

Decodes the string to a Uri string

HiveEntityUriEncode ( string decoded ) : string

Encodes the uri string to be used inside of Urls

InternalStaticParse ( string value ) : HiveEntityUri

Parses a string into a HiveEntityUri, returning null if parsing fails

Reset ( string baseUri = HiveRoot, bool detectSerialization = true ) : void
ResetAsFormattedString ( string baseUri = HiveRoot ) : void
ResetByParsing ( string value ) : bool
ValueEquals ( other ) : bool

메소드 상세

CompareString() 공개 정적인 메소드

Compares 2 strings that are hive ids and checks if they are equal
public static CompareString ( string id1, string id2 ) : bool
id1 string
id2 string
리턴 bool

ConvertIntToGuid() 공개 정적인 메소드

public static ConvertIntToGuid ( int id ) : HiveEntityUri
id int
리턴 HiveEntityUri

Equals() 공개 메소드

Indicates whether the current object is equal to another object of the same type.
public Equals ( other ) : bool
other An object to compare with this object.
리턴 bool

Equals() 공개 메소드

Indicates whether the current object is equal to another object of the same type.
public Equals ( Guid other ) : bool
other Guid An object to compare with this object.
리턴 bool

Equals() 공개 메소드

public Equals ( int other ) : bool
other int
리턴 bool

Equals() 공개 메소드

public Equals ( object obj ) : bool
obj object
리턴 bool

Equals() 공개 메소드

Checks if the string is the same, if it is not, it checks if the UrlDecoded or Encoded version of the string is the same
public Equals ( string other ) : bool
other string
리턴 bool

FromUriString() 공개 정적인 메소드

Creates an entity Uri from a string base
public static FromUriString ( string baseUri ) : HiveEntityUri
baseUri string Base Uri.
리턴 HiveEntityUri

GetAllStringParts() 공개 메소드

Concatenates all non-empty string parts together with the specified char as the delimiter
public GetAllStringParts ( char delimiter = '/' ) : string
delimiter char The delimiter (defaults to /).
리턴 string

GetHashCode() 공개 메소드

Generated by Resharper, though it seems like its good
public GetHashCode ( ) : int
리턴 int

GetHtmlId() 공개 메소드

Returns a string id that can be used for Html elements
public GetHtmlId ( ) : string
리턴 string

HiveEntityUri() 공개 메소드

Constructor
public HiveEntityUri ( ) : System
리턴 System

HiveEntityUri() 공개 메소드

Creates an entity Uri from a Guid
public HiveEntityUri ( Guid guid ) : System
guid Guid Base .
리턴 System

HiveEntityUri() 공개 메소드

Creates an entity Uri from a Int32
public HiveEntityUri ( Int32 id ) : System
id Int32 Base .
리턴 System

HiveEntityUri() 공개 메소드

Creates an entity from a generic string identitfier
The usage of this constructor is for things such as file paths
public HiveEntityUri ( string identifier ) : System
identifier string
리턴 System

HiveEntityUri() 공개 메소드

public HiveEntityUri ( string schemeName, string providerKey, Guid id ) : System
schemeName string
providerKey string
id Guid
리턴 System

HiveEntityUri() 공개 메소드

Initializes a new instance of the HiveEntityUri class.
public HiveEntityUri ( string schemeName, string providerKey, int id ) : System
schemeName string Name of the scheme.
providerKey string The provider key.
id int The id.
리턴 System

HiveEntityUri() 공개 메소드

public HiveEntityUri ( string schemeName, string providerKey, string id ) : System
schemeName string
providerKey string
id string
리턴 System

IsNullOrEmpty() 공개 정적인 메소드

Checks if the uri is null or 'Empty'
public static IsNullOrEmpty ( id ) : bool
리턴 bool

IsSystem() 공개 메소드

Determines if the HiveEntityUri is a system Uri, this is determined if the ConvertIntToGuid is called with a nagative int.
public IsSystem ( ) : bool
리턴 bool

Parse() 공개 정적인 메소드

Parses the string into a HiveEntityUri, if parsing fails and exception is thrown
public static Parse ( string value ) : HiveEntityUri
value string
리턴 HiveEntityUri

ToFriendlyString() 공개 메소드

Outputs a string for use with display/presentation
public ToFriendlyString ( ) : string
리턴 string

ToString() 공개 메소드

Returns the string representation of the HiveEntityUri for use in URLs
This checks what type of SerializationType is being used, for most cases (GUIDs and Ints) the output will be formatted as a 'readable' string, for string types, the output will be formatted as a safely casted (for use in URLs) Base64 encoded string.
public ToString ( ) : string
리턴 string

TryParse() 공개 정적인 메소드

Attempts to parse the value into a HiveEntityUri, this will check for types
public static TryParse ( string value, &uri ) : bool
value string
uri The HiveEntityUri that will be output if parsing is successful
리턴 bool

operator() 공개 정적인 메소드

Equality operator between HiveEntityUri's
public static operator ( ) : bool
리턴 bool