Skip to main content

MetadataExtensions

Assembly: ServiceStack.dll​
View Source​
Declaration
public static class MetadataExtensions

Methods​

ToMetadataTypeName(MetadataType)​

View Source​
Declaration
public static MetadataTypeName ToMetadataTypeName(this MetadataType type)
Returns​

ServiceStack.MetadataTypeName

Parameters​
TypeName
ServiceStack.MetadataTypetype

ToMetadataType(MetadataTypeName)​

View Source​
Declaration
public static MetadataType ToMetadataType(this MetadataTypeName type)
Returns​

ServiceStack.MetadataType

Parameters​
TypeName
ServiceStack.MetadataTypeNametype

GetAllMetadataTypes(MetadataTypes)​

View Source​
Declaration
public static List<MetadataType> GetAllMetadataTypes(this MetadataTypes metadata)
Returns​

System.Collections.Generic.List<ServiceStack.MetadataType>

Parameters​
TypeName
ServiceStack.MetadataTypesmetadata

GetReferencedTypeNames(MetadataType, MetadataTypes)​

View Source​
Declaration
public static HashSet<string> GetReferencedTypeNames(this MetadataType type, MetadataTypes metadataTypes)
Returns​

System.Collections.Generic.HashSet<System.String>

Parameters​
TypeName
ServiceStack.MetadataTypetype
ServiceStack.MetadataTypesmetadataTypes

IgnoreSystemType(MetadataType)​

View Source​
Declaration
public static bool IgnoreSystemType(this MetadataType type)
Returns​

System.Boolean

Parameters​
TypeName
ServiceStack.MetadataTypetype

GetDefaultNamespaces(MetadataTypesConfig, MetadataTypes)​

View Source​
Declaration
public static HashSet<string> GetDefaultNamespaces(this MetadataTypesConfig config, MetadataTypes metadata)
Returns​

System.Collections.Generic.HashSet<System.String>

Parameters​
TypeName
ServiceStack.MetadataTypesConfigconfig
ServiceStack.MetadataTypesmetadata

ToPrettyName(Type)​

View Source​
Declaration
public static string ToPrettyName(this Type type)
Returns​

System.String

Parameters​
TypeName
System.Typetype

RemoveIgnoredTypesForNet(MetadataTypes, MetadataTypesConfig)​

View Source​
Declaration
public static void RemoveIgnoredTypesForNet(this MetadataTypes metadata, MetadataTypesConfig config)
Parameters​
TypeName
ServiceStack.MetadataTypesmetadata
ServiceStack.MetadataTypesConfigconfig

RemoveIgnoredTypes(MetadataTypes, MetadataTypesConfig)​

View Source​
Declaration
public static List<string> RemoveIgnoredTypes(this MetadataTypes metadata, MetadataTypesConfig config)
Returns​

System.Collections.Generic.List<System.String>

Parameters​
TypeName
ServiceStack.MetadataTypesmetadata
ServiceStack.MetadataTypesConfigconfig

GetIncludeList(MetadataTypes, MetadataTypesConfig)​

View Source​
Declaration
public static List<string> GetIncludeList(MetadataTypes metadata, MetadataTypesConfig config)
Returns​

System.Collections.Generic.List<System.String>

Parameters​
TypeName
ServiceStack.MetadataTypesmetadata
ServiceStack.MetadataTypesConfigconfig

IgnoreType(MetadataType, MetadataTypesConfig, List<String>)​

View Source​
Declaration
public static bool IgnoreType(this MetadataType type, MetadataTypesConfig config, List<string> overrideIncludeType = null)
Returns​

System.Boolean

Parameters​
TypeName
ServiceStack.MetadataTypetype
ServiceStack.MetadataTypesConfigconfig
System.Collections.Generic.List<System.String>overrideIncludeType

SanitizeType(String)​

View Source​
Declaration
public static string SanitizeType(this string typeName)
Returns​

System.String

Parameters​
TypeName
System.StringtypeName

SafeComment(String)​

View Source​
Declaration
public static string SafeComment(this string comment)
Returns​

System.String

Parameters​
TypeName
System.Stringcomment

SafeToken(String)​

View Source​
Declaration
public static string SafeToken(this string token)
Returns​

System.String

Parameters​
TypeName
System.Stringtoken

SafeValue(String)​

View Source​
Declaration
public static string SafeValue(this string value)
Returns​

System.String

Parameters​
TypeName
System.Stringvalue

QuotedSafeValue(String)​

View Source​
Declaration
public static string QuotedSafeValue(this string value)
Returns​

System.String

Parameters​
TypeName
System.Stringvalue

ToMetadataAttribute(MetadataRoute)​

View Source​
Declaration
public static MetadataAttribute ToMetadataAttribute(this MetadataRoute route)
Returns​

ServiceStack.MetadataAttribute

Parameters​
TypeName
ServiceStack.MetadataRouteroute

GetAllTypes(MetadataTypes)​

View Source​
Declaration
public static IEnumerable<MetadataType> GetAllTypes(this MetadataTypes metadata)
Returns​

System.Collections.Generic.IEnumerable<ServiceStack.MetadataType>

Parameters​
TypeName
ServiceStack.MetadataTypesmetadata

GetAllTypesOrdered(MetadataTypes)​

View Source​
Declaration
public static List<MetadataType> GetAllTypesOrdered(this MetadataTypes metadata)
Returns​

System.Collections.Generic.List<ServiceStack.MetadataType>

Parameters​
TypeName
ServiceStack.MetadataTypesmetadata

CreateSortedTypeList(List<MetadataType>)​

View Source​
Declaration
public static List<MetadataType> CreateSortedTypeList(this List<MetadataType> allTypes)
Returns​

System.Collections.Generic.List<ServiceStack.MetadataType>

Parameters​
TypeName
System.Collections.Generic.List<ServiceStack.MetadataType>allTypes

Push(Dictionary<String, List<String>>, String, String)​

View Source​
Declaration
public static void Push(this Dictionary<string, List<string>> map, string key, string value)
Parameters​
TypeName
System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.List<System.String>>map
System.Stringkey
System.Stringvalue

GetValues(Dictionary<String, List<String>>, String)​

View Source​
Declaration
public static List<string> GetValues(this Dictionary<string, List<string>> map, string key)
Returns​

System.Collections.Generic.List<System.String>

Parameters​
TypeName
System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.List<System.String>>map
System.Stringkey

OrderTypesByDeps(List<MetadataType>)​

View Source​
Declaration
public static List<MetadataType> OrderTypesByDeps(this List<MetadataType> types)
Returns​

System.Collections.Generic.List<ServiceStack.MetadataType>

Parameters​
TypeName
System.Collections.Generic.List<ServiceStack.MetadataType>types

GetDepTypes(Dictionary<String, List<String>>, Dictionary<String, MetadataType>, HashSet<String>, MetadataType)​

View Source​
Declaration
public static IEnumerable<MetadataType> GetDepTypes(Dictionary<string, List<string>> deps, Dictionary<string, MetadataType> typesMap, HashSet<string> considered, MetadataType type)
Returns​

System.Collections.Generic.IEnumerable<ServiceStack.MetadataType>

Parameters​
TypeName
System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.List<System.String>>deps
System.Collections.Generic.Dictionary<System.String,ServiceStack.MetadataType>typesMap
System.Collections.Generic.HashSet<System.String>considered
ServiceStack.MetadataTypetype

GetTypeName(MetadataPropertyType, MetadataTypesConfig, List<MetadataType>)​

View Source​
Declaration
public static string GetTypeName(this MetadataPropertyType prop, MetadataTypesConfig config, List<MetadataType> allTypes)
Returns​

System.String

Parameters​
TypeName
ServiceStack.MetadataPropertyTypeprop
ServiceStack.MetadataTypesConfigconfig
System.Collections.Generic.List<ServiceStack.MetadataType>allTypes

StripGenericType(String, String)​

View Source​
Declaration
public static string StripGenericType(string type, string subType)
Returns​

System.String

Parameters​
TypeName
System.Stringtype
System.StringsubType

IsServiceStackType(Type)​

View Source​
Declaration
public static bool IsServiceStackType(this Type type)
Returns​

System.Boolean

Parameters​
TypeName
System.Typetype

GetEnumMemberValue(MetadataType, Int32)​

View Source​
Declaration
public static string GetEnumMemberValue(this MetadataType type, int i)
Returns​

System.String

Parameters​
TypeName
ServiceStack.MetadataTypetype
System.Int32i

GetAttributeName(Attribute)​

View Source​
Declaration
public static string GetAttributeName(this Attribute attr)
Returns​

System.String

Parameters​
TypeName
System.Attributeattr

GetDirectInterfaces(Type)​

View Source​
Declaration
public static Type[] GetDirectInterfaces(this Type type)
Returns​

System.Type[]

Parameters​
TypeName
System.Typetype

Emit(StringBuilderWrapper, MetadataType, Lang)​

View Source​
Declaration
public static void Emit(this StringBuilderWrapper sb, MetadataType type, Lang lang)
Parameters​
TypeName
ServiceStack.NativeTypes.StringBuilderWrappersb
ServiceStack.MetadataTypetype
ServiceStack.Langlang

Emit(StringBuilderWrapper, MetadataPropertyType, Lang)​

View Source​
Declaration
public static void Emit(this StringBuilderWrapper sb, MetadataPropertyType propType, Lang lang)
Parameters​
TypeName
ServiceStack.NativeTypes.StringBuilderWrappersb
ServiceStack.MetadataPropertyTypepropType
ServiceStack.Langlang