C# Class Rebel.Framework.HiveIdExtensions

Mostrar archivo Open project: RebelCMS/rebelcmsxu5

Public Methods

Method Description
CompareStrings ( string left, string right, bool ignoreProviderId = true ) : bool

Compares two strings by parsing them as HiveId to check equality.

ConvertToEmptyIfNullValue ( this id ) : HiveId

Returns null if the id is null or empty, otherwise returns the id

GetHtmlId ( this id ) : string

Convert the HiveId to a compatible Id used for Html elements

IsNullValueOrEmpty ( this id ) : bool

Determines whether id is null or empty.

NullIfEmpty ( this id ) : HiveId?
StringParts ( this id ) : string[]
ToJsonObject ( this id ) : Newtonsoft.Json.Linq.JObject

Returns a JObject representing the HiveId for use in JavaScript

TryParseFromHtmlId ( string htmlId ) : AttemptTuple

Method Details

CompareStrings() public static method

Compares two strings by parsing them as HiveId to check equality.
public static CompareStrings ( string left, string right, bool ignoreProviderId = true ) : bool
left string The left.
right string The right.
ignoreProviderId bool
return bool

ConvertToEmptyIfNullValue() public static method

Returns null if the id is null or empty, otherwise returns the id
public static ConvertToEmptyIfNullValue ( this id ) : HiveId
id this
return HiveId

GetHtmlId() public static method

Convert the HiveId to a compatible Id used for Html elements
public static GetHtmlId ( this id ) : string
id this
return string

IsNullValueOrEmpty() public static method

Determines whether id is null or empty.
public static IsNullValueOrEmpty ( this id ) : bool
id this The id.
return bool

NullIfEmpty() public static method

public static NullIfEmpty ( this id ) : HiveId?
id this
return HiveId?

StringParts() public static method

public static StringParts ( this id ) : string[]
id this
return string[]

ToJsonObject() public static method

Returns a JObject representing the HiveId for use in JavaScript
public static ToJsonObject ( this id ) : Newtonsoft.Json.Linq.JObject
id this
return Newtonsoft.Json.Linq.JObject

TryParseFromHtmlId() public static method

public static TryParseFromHtmlId ( string htmlId ) : AttemptTuple
htmlId string
return AttemptTuple