Skip to main content

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​

ServiceStack.UrnId

Parameters​
TypeName
System.StringurnId

Create(String, String)​

View Source​
Declaration
public static string Create(string objectTypeName, string idFieldValue)
Returns​

System.String

Parameters​
TypeName
System.StringobjectTypeName
System.StringidFieldValue

CreateWithParts(String, String[])​

View Source​
Declaration
public static string CreateWithParts(string objectTypeName, params string[] keyParts)
Returns​

System.String

Parameters​
TypeName
System.StringobjectTypeName
System.String[]keyParts

CreateWithParts<T>(String[])​

View Source​
Declaration
public static string CreateWithParts<T>(params string[] keyParts)
Returns​

System.String

Parameters​
TypeName
System.String[]keyParts
Type Parameters​
  • T

Create<T>(String)​

View Source​
Declaration
public static string Create<T>(string idFieldValue)
Returns​

System.String

Parameters​
TypeName
System.StringidFieldValue
Type Parameters​
  • T

Create<T>(Object)​

View Source​
Declaration
public static string Create<T>(object idFieldValue)
Returns​

System.String

Parameters​
TypeName
System.ObjectidFieldValue
Type Parameters​
  • T

Create(Type, String)​

View Source​
Declaration
public static string Create(Type objectType, string idFieldValue)
Returns​

System.String

Parameters​
TypeName
System.TypeobjectType
System.StringidFieldValue

Create<T>(String, String)​

View Source​
Declaration
public static string Create<T>(string idFieldName, string idFieldValue)
Returns​

System.String

Parameters​
TypeName
System.StringidFieldName
System.StringidFieldValue
Type Parameters​
  • T

Create(Type, String, String)​

View Source​
Declaration
public static string Create(Type objectType, string idFieldName, string idFieldValue)
Returns​

System.String

Parameters​
TypeName
System.TypeobjectType
System.StringidFieldName
System.StringidFieldValue

GetStringId(String)​

View Source​
Declaration
public static string GetStringId(string urn)
Returns​

System.String

Parameters​
TypeName
System.Stringurn

GetGuidId(String)​

View Source​
Declaration
public static Guid GetGuidId(string urn)
Returns​

System.Guid

Parameters​
TypeName
System.Stringurn

GetLongId(String)​

View Source​
Declaration
public static long GetLongId(string urn)
Returns​

System.Int64

Parameters​
TypeName
System.Stringurn