C# Класс Rebel.Framework.HiveEntityUri

Наследование: IEquatable, IEquatable, IEquatable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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