Skip to main content

MetadataTypeExtensions

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

Fields​

CollectionTypes​

View Source​
Declaration
public static HashSet<string> CollectionTypes

Methods​

GetParamType(MetadataPropertyType, MetadataType, Operation)​

View Source​
Declaration
public static string GetParamType(this MetadataPropertyType prop, MetadataType type, Operation op)
Returns​

System.String

Parameters​
TypeName
ServiceStack.MetadataPropertyTypeprop
ServiceStack.MetadataTypetype
ServiceStack.Host.Operationop

GetParamType(ApiMemberAttribute, Type, String)​

View Source​
Declaration
public static string GetParamType(this ApiMemberAttribute attr, Type type, string verb)
Returns​

System.String

Parameters​
TypeName
ServiceStack.ApiMemberAttributeattr
System.Typetype
System.Stringverb

IsCollection(MetadataPropertyType)​

View Source​
Declaration
public static bool IsCollection(this MetadataPropertyType prop)
Returns​

System.Boolean

Parameters​
TypeName
ServiceStack.MetadataPropertyTypeprop

IsArray(MetadataPropertyType)​

View Source​
Declaration
public static bool IsArray(this MetadataPropertyType prop)
Returns​

System.Boolean

Parameters​
TypeName
ServiceStack.MetadataPropertyTypeprop

IsInterface(MetadataType)​

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

System.Boolean

Parameters​
TypeName
ServiceStack.MetadataTypetype

IsAbstract(MetadataType)​

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

System.Boolean

Parameters​
TypeName
ServiceStack.MetadataTypetype

ExcludesFeature(Type, Feature)​

View Source​
Declaration
public static bool ExcludesFeature(this Type type, Feature feature)
Returns​

System.Boolean

Parameters​
TypeName
System.Typetype
ServiceStack.Featurefeature

Has(Feature, Feature)​

View Source​
Declaration
public static bool Has(this Feature feature, Feature flag)
Returns​

System.Boolean

Parameters​
TypeName
ServiceStack.Featurefeature
ServiceStack.Featureflag

NullIfFalse(Boolean)​

View Source​
Declaration
public static bool? NullIfFalse(this bool value)
Returns​

System.Nullable<System.Boolean>

Parameters​
TypeName
System.Booleanvalue

NullIfEmpty<T>(List<T>)​

View Source​
Declaration
public static List<T> NullIfEmpty<T>(this List<T> value)
Returns​

System.Collections.Generic.List<<T>>

Parameters​
TypeName
System.Collections.Generic.List<<T>>value
Type Parameters​
  • T

NullIfMinValue(Int32)​

View Source​
Declaration
public static int? NullIfMinValue(this int value)
Returns​

System.Nullable<System.Int32>

Parameters​
TypeName
System.Int32value

ToMetadataServiceRoutes(Dictionary<Type, String[]>, Action<Dictionary<String, String[]>>)​

View Source​
Declaration
public static Dictionary<string, string[]> ToMetadataServiceRoutes(this Dictionary<Type, string[]> serviceRoutes, Action<Dictionary<string, string[]>> filter = null)
Returns​

System.Collections.Generic.Dictionary<System.String,System.String[]>

Parameters​
TypeName
System.Collections.Generic.Dictionary<System.Type,System.String[]>serviceRoutes
System.Action<System.Collections.Generic.Dictionary<System.String,System.String[]>>filter

ForceInclude(MetadataTypesConfig, Type)​

View Source​
Declaration
public static bool ForceInclude(this MetadataTypesConfig config, Type type)
Returns​

System.Boolean

Parameters​
TypeName
ServiceStack.MetadataTypesConfigconfig
System.Typetype

ForceInclude(MetadataTypesConfig, MetadataType)​

View Source​
Declaration
public static bool ForceInclude(this MetadataTypesConfig config, MetadataType type)
Returns​

System.Boolean

Parameters​
TypeName
ServiceStack.MetadataTypesConfigconfig
ServiceStack.MetadataTypetype