C# Class Rebel.Framework.HiveEntityUri

Inheritance: IEquatable, IEquatable, IEquatable
Afficher le fichier Open project: RebelCMS/rebelcmsxu5 Class Usage Examples

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

CompareString() public static méthode

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
Résultat bool

ConvertIntToGuid() public static méthode

public static ConvertIntToGuid ( int id ) : HiveEntityUri
id int
Résultat HiveEntityUri

Equals() public méthode

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.
Résultat bool

Equals() public méthode

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.
Résultat bool

Equals() public méthode

public Equals ( int other ) : bool
other int
Résultat bool

Equals() public méthode

public Equals ( object obj ) : bool
obj object
Résultat bool

Equals() public méthode

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
Résultat bool

FromUriString() public static méthode

Creates an entity Uri from a string base
public static FromUriString ( string baseUri ) : HiveEntityUri
baseUri string Base Uri.
Résultat HiveEntityUri

GetAllStringParts() public méthode

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 /).
Résultat string

GetHashCode() public méthode

Generated by Resharper, though it seems like its good
public GetHashCode ( ) : int
Résultat int

GetHtmlId() public méthode

Returns a string id that can be used for Html elements
public GetHtmlId ( ) : string
Résultat string

HiveEntityUri() public méthode

Constructor
public HiveEntityUri ( ) : System
Résultat System

HiveEntityUri() public méthode

Creates an entity Uri from a Guid
public HiveEntityUri ( Guid guid ) : System
guid Guid Base .
Résultat System

HiveEntityUri() public méthode

Creates an entity Uri from a Int32
public HiveEntityUri ( Int32 id ) : System
id Int32 Base .
Résultat System

HiveEntityUri() public méthode

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
Résultat System

HiveEntityUri() public méthode

public HiveEntityUri ( string schemeName, string providerKey, Guid id ) : System
schemeName string
providerKey string
id Guid
Résultat System

HiveEntityUri() public méthode

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.
Résultat System

HiveEntityUri() public méthode

public HiveEntityUri ( string schemeName, string providerKey, string id ) : System
schemeName string
providerKey string
id string
Résultat System

IsNullOrEmpty() public static méthode

Checks if the uri is null or 'Empty'
public static IsNullOrEmpty ( id ) : bool
Résultat bool

IsSystem() public méthode

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

Parse() public static méthode

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

ToFriendlyString() public méthode

Outputs a string for use with display/presentation
public ToFriendlyString ( ) : string
Résultat string

ToString() public méthode

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
Résultat string

TryParse() public static méthode

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
Résultat bool

operator() public static méthode

Equality operator between HiveEntityUri's
public static operator ( ) : bool
Résultat bool