Skip to main content

IdUtils

Assembly: ServiceStack.Common.dll
View Source
Declaration
public static class IdUtils

Fields

IdField

View Source
Declaration
public const string IdField = "Id"

Methods

GetObjectId(Object)

View Source
Declaration
public static object GetObjectId(this object entity)
Returns

System.Object

Parameters
TypeName
System.Objectentity

ToId<T>(T)

View Source
Declaration
public static object ToId<T>(this T entity)
Returns

System.Object

Parameters
TypeName
<T>entity
Type Parameters
  • T

ToUrn<T>(T)

View Source
Declaration
public static string ToUrn<T>(this T entity)
Returns

System.String

Parameters
TypeName
<T>entity
Type Parameters
  • T

ToSafePathCacheKey<T>(String)

View Source
Declaration
public static string ToSafePathCacheKey<T>(this string idValue)
Returns

System.String

Parameters
TypeName
System.StringidValue
Type Parameters
  • T

ToUrn<T>(Object)

View Source
Declaration
public static string ToUrn<T>(this object id)
Returns

System.String

Parameters
TypeName
System.Objectid
Type Parameters
  • T

GetId<T>(T)

View Source
Declaration
public static object GetId<T>(this T entity)
Returns

System.Object

Parameters
TypeName
<T>entity
Type Parameters
  • T

CreateUrn<T>(Object)

View Source
Declaration
public static string CreateUrn<T>(object id)
Returns

System.String

Parameters
TypeName
System.Objectid
Type Parameters
  • T

CreateUrn(Type, Object)

View Source
Declaration
public static string CreateUrn(Type type, object id)
Returns

System.String

Parameters
TypeName
System.Typetype
System.Objectid

CreateUrn(String, Object)

View Source
Declaration
public static string CreateUrn(string type, object id)
Returns

System.String

Parameters
TypeName
System.Stringtype
System.Objectid

CreateUrn<T>(T)

View Source
Declaration
public static string CreateUrn<T>(this T entity)
Returns

System.String

Parameters
TypeName
<T>entity
Type Parameters
  • T

CreateCacheKeyPath<T>(String)

View Source
Declaration
public static string CreateCacheKeyPath<T>(string idValue)
Returns

System.String

Parameters
TypeName
System.StringidValue
Type Parameters
  • T

GetIdProperty(Type)

View Source
Declaration
public static PropertyInfo GetIdProperty(this Type type)
Returns

System.Reflection.PropertyInfo

Parameters
TypeName
System.Typetype