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
Type | Name |
---|---|
System.Object | entity |
ToId<T>(T)
View Source
Declaration
public static object ToId<T>(this T entity)
Returns
System.Object
Parameters
Type | Name |
---|---|
<T> | entity |
Type Parameters
T
ToUrn<T>(T)
View Source
Declaration
public static string ToUrn<T>(this T entity)
Returns
System.String
Parameters
Type | Name |
---|---|
<T> | entity |
Type Parameters
T
ToSafePathCacheKey<T>(String)
View Source
Declaration
public static string ToSafePathCacheKey<T>(this string idValue)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | idValue |
Type Parameters
T
ToUrn<T>(Object)
View Source
Declaration
public static string ToUrn<T>(this object id)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Object | id |
Type Parameters
T
GetId<T>(T)
View Source
Declaration
public static object GetId<T>(this T entity)
Returns
System.Object
Parameters
Type | Name |
---|---|
<T> | entity |
Type Parameters
T
CreateUrn<T>(Object)
View Source
Declaration
public static string CreateUrn<T>(object id)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Object | id |
Type Parameters
T
CreateUrn(Type, Object)
View Source
Declaration
public static string CreateUrn(Type type, object id)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Type | type |
System.Object | id |
CreateUrn(String, Object)
View Source
Declaration
public static string CreateUrn(string type, object id)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | type |
System.Object | id |
CreateUrn<T>(T)
View Source
Declaration
public static string CreateUrn<T>(this T entity)
Returns
System.String
Parameters
Type | Name |
---|---|
<T> | entity |
Type Parameters
T
CreateCacheKeyPath<T>(String)
View Source
Declaration
public static string CreateCacheKeyPath<T>(string idValue)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | idValue |
Type Parameters
T
GetIdProperty(Type)
View Source
Declaration
public static PropertyInfo GetIdProperty(this Type type)
Returns
System.Reflection.PropertyInfo
Parameters
Type | Name |
---|---|
System.Type | type |