MetadataExtensions
Assembly: ServiceStack.dll
View Source
public static class MetadataExtensions
Methods
ToMetadataTypeName(MetadataType)
View Source
public static MetadataTypeName ToMetadataTypeName(this MetadataType type)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.MetadataType | type |
ToMetadataType(MetadataTypeName)
View Source
public static MetadataType ToMetadataType(this MetadataTypeName type)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.MetadataTypeName | type |
GetAllMetadataTypes(MetadataTypes)
View Source
public static List<MetadataType> GetAllMetadataTypes(this MetadataTypes metadata)
Returns
System.Collections.Generic.List<ServiceStack.MetadataType>
Parameters
Type | Name |
---|---|
ServiceStack.MetadataTypes | metadata |
GetReferencedTypeNames(MetadataType, MetadataTypes)
View Source
public static HashSet<string> GetReferencedTypeNames(this MetadataType type, MetadataTypes metadataTypes)
Returns
System.Collections.Generic.HashSet<System.String>
Parameters
Type | Name |
---|---|
ServiceStack.MetadataType | type |
ServiceStack.MetadataTypes | metadataTypes |
IgnoreSystemType(MetadataType)
View Source
public static bool IgnoreSystemType(this MetadataType type)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.MetadataType | type |
GetDefaultNamespaces(MetadataTypesConfig, MetadataTypes)
View Source
public static HashSet<string> GetDefaultNamespaces(this MetadataTypesConfig config, MetadataTypes metadata)
Returns
System.Collections.Generic.HashSet<System.String>
Parameters
Type | Name |
---|---|
ServiceStack.MetadataTypesConfig | config |
ServiceStack.MetadataTypes | metadata |
ToPrettyName(Type)
View Source
public static string ToPrettyName(this Type type)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Type | type |
RemoveIgnoredTypesForNet(MetadataTypes, MetadataTypesConfig)
View Source
public static void RemoveIgnoredTypesForNet(this MetadataTypes metadata, MetadataTypesConfig config)
Parameters
Type | Name |
---|---|
ServiceStack.MetadataTypes | metadata |
ServiceStack.MetadataTypesConfig | config |
RemoveIgnoredTypes(MetadataTypes, MetadataTypesConfig)
View Source
public static List<string> RemoveIgnoredTypes(this MetadataTypes metadata, MetadataTypesConfig config)
Returns
System.Collections.Generic.List<System.String>
Parameters
Type | Name |
---|---|
ServiceStack.MetadataTypes | metadata |
ServiceStack.MetadataTypesConfig | config |
GetIncludeList(MetadataTypes, MetadataTypesConfig)
View Source
public static List<string> GetIncludeList(MetadataTypes metadata, MetadataTypesConfig config)
Returns
System.Collections.Generic.List<System.String>
Parameters
Type | Name |
---|---|
ServiceStack.MetadataTypes | metadata |
ServiceStack.MetadataTypesConfig | config |
IgnoreType(MetadataType, MetadataTypesConfig, List<String>)
View Source
public static bool IgnoreType(this MetadataType type, MetadataTypesConfig config, List<string> overrideIncludeType = null)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.MetadataType | type |
ServiceStack.MetadataTypesConfig | config |
System.Collections.Generic.List<System.String> | overrideIncludeType |
SanitizeType(String)
View Source
public static string SanitizeType(this string typeName)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | typeName |
SafeComment(String)
View Source
public static string SafeComment(this string comment)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | comment |
SafeToken(String)
View Source
public static string SafeToken(this string token)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | token |
SafeValue(String)
View Source
public static string SafeValue(this string value)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | value |
QuotedSafeValue(String)
View Source
public static string QuotedSafeValue(this string value)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | value |
ToMetadataAttribute(MetadataRoute)
View Source
public static MetadataAttribute ToMetadataAttribute(this MetadataRoute route)
Returns
ServiceStack.MetadataAttribute
Parameters
Type | Name |
---|---|
ServiceStack.MetadataRoute | route |
GetAllTypes(MetadataTypes)
View Source
public static IEnumerable<MetadataType> GetAllTypes(this MetadataTypes metadata)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.MetadataType>
Parameters
Type | Name |
---|---|
ServiceStack.MetadataTypes | metadata |
GetAllTypesOrdered(MetadataTypes)
View Source
public static List<MetadataType> GetAllTypesOrdered(this MetadataTypes metadata)
Returns
System.Collections.Generic.List<ServiceStack.MetadataType>
Parameters
Type | Name |
---|---|
ServiceStack.MetadataTypes | metadata |
CreateSortedTypeList(List<MetadataType>)
View Source
public static List<MetadataType> CreateSortedTypeList(this List<MetadataType> allTypes)
Returns
System.Collections.Generic.List<ServiceStack.MetadataType>
Parameters
Type | Name |
---|---|
System.Collections.Generic.List<ServiceStack.MetadataType> | allTypes |
Push(Dictionary<String, List<String>>, String, String)
View Source
public static void Push(this Dictionary<string, List<string>> map, string key, string value)
Parameters
Type | Name |
---|---|
System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.List<System.String>> | map |
System.String | key |
System.String | value |
GetValues(Dictionary<String, List<String>>, String)
View Source
public static List<string> GetValues(this Dictionary<string, List<string>> map, string key)
Returns
System.Collections.Generic.List<System.String>
Parameters
Type | Name |
---|---|
System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.List<System.String>> | map |
System.String | key |
OrderTypesByDeps(List<MetadataType>)
View Source
public static List<MetadataType> OrderTypesByDeps(this List<MetadataType> types)
Returns
System.Collections.Generic.List<ServiceStack.MetadataType>
Parameters
Type | Name |
---|---|
System.Collections.Generic.List<ServiceStack.MetadataType> | types |
GetDepTypes(Dictionary<String, List<String>>, Dictionary<String, MetadataType>, HashSet<String>, MetadataType)
View Source
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
Type | Name |
---|---|
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.MetadataType | type |
GetTypeName(MetadataPropertyType, MetadataTypesConfig, List<MetadataType>)
View Source
public static string GetTypeName(this MetadataPropertyType prop, MetadataTypesConfig config, List<MetadataType> allTypes)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.MetadataPropertyType | prop |
ServiceStack.MetadataTypesConfig | config |
System.Collections.Generic.List<ServiceStack.MetadataType> | allTypes |
StripGenericType(String, String)
View Source
public static string StripGenericType(string type, string subType)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | type |
System.String | subType |
IsServiceStackType(Type)
View Source
public static bool IsServiceStackType(this Type type)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Type | type |
GetEnumMemberValue(MetadataType, Int32)
View Source
public static string GetEnumMemberValue(this MetadataType type, int i)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.MetadataType | type |
System.Int32 | i |
GetAttributeName(Attribute)
View Source
public static string GetAttributeName(this Attribute attr)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Attribute | attr |
GetDirectInterfaces(Type)
View Source
public static Type[] GetDirectInterfaces(this Type type)
Returns
System.Type[]
Parameters
Type | Name |
---|---|
System.Type | type |
Emit(StringBuilderWrapper, MetadataType, Lang)
View Source
public static void Emit(this StringBuilderWrapper sb, MetadataType type, Lang lang)
Parameters
Type | Name |
---|---|
ServiceStack.NativeTypes.StringBuilderWrapper | sb |
ServiceStack.MetadataType | type |
ServiceStack.Lang | lang |
Emit(StringBuilderWrapper, MetadataPropertyType, Lang)
View Source
public static void Emit(this StringBuilderWrapper sb, MetadataPropertyType propType, Lang lang)
Parameters
Type | Name |
---|---|
ServiceStack.NativeTypes.StringBuilderWrapper | sb |
ServiceStack.MetadataPropertyType | propType |
ServiceStack.Lang | lang |