UrnId
Creates a Unified Resource Name (URN) with the following formats:
- urn:{TypeName}:{IdFieldValue} e.g. urn:UserSession:1
- urn:{TypeName}:{IdFieldName}:{IdFieldValue} e.g. urn:UserSession:UserId:1
Assembly: ServiceStack.Common.dll
View Source
Declaration
public class UrnId
Properties
TypeName
View Source
Declaration
public string TypeName { get; }
IdFieldValue
View Source
Declaration
public string IdFieldValue { get; }
IdFieldName
View Source
Declaration
public string IdFieldName { get; }
Methods
Parse(String)
View Source
Declaration
public static UrnId Parse(string urnId)
Returns
Parameters
Type | Name |
---|---|
System.String | urnId |
Create(String, String)
View Source
Declaration
public static string Create(string objectTypeName, string idFieldValue)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | objectTypeName |
System.String | idFieldValue |
CreateWithParts(String, String[])
View Source
Declaration
public static string CreateWithParts(string objectTypeName, params string[] keyParts)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | objectTypeName |
System.String[] | keyParts |
CreateWithParts<T>(String[])
View Source
Declaration
public static string CreateWithParts<T>(params string[] keyParts)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String[] | keyParts |
Type Parameters
T
Create<T>(String)
View Source
Declaration
public static string Create<T>(string idFieldValue)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | idFieldValue |
Type Parameters
T
Create<T>(Object)
View Source
Declaration
public static string Create<T>(object idFieldValue)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Object | idFieldValue |
Type Parameters
T
Create(Type, String)
View Source
Declaration
public static string Create(Type objectType, string idFieldValue)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Type | objectType |
System.String | idFieldValue |
Create<T>(String, String)
View Source
Declaration
public static string Create<T>(string idFieldName, string idFieldValue)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | idFieldName |
System.String | idFieldValue |
Type Parameters
T
Create(Type, String, String)
View Source
Declaration
public static string Create(Type objectType, string idFieldName, string idFieldValue)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Type | objectType |
System.String | idFieldName |
System.String | idFieldValue |
GetStringId(String)
View Source
Declaration
public static string GetStringId(string urn)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | urn |
GetGuidId(String)
View Source
Declaration
public static Guid GetGuidId(string urn)
Returns
System.Guid
Parameters
Type | Name |
---|---|
System.String | urn |
GetLongId(String)
View Source
Declaration
public static long GetLongId(string urn)
Returns
System.Int64
Parameters
Type | Name |
---|---|
System.String | urn |