Skip to main content

DartGenerator

Assembly: ServiceStack.dll​
View Source​
Declaration
public class DartGenerator : ILangGenerator

Properties​

PreTypeFilter​

View Source​
Declaration
public static Action<StringBuilderWrapper, MetadataType> PreTypeFilter { get; set; }

InnerTypeFilter​

View Source​
Declaration
public static Action<StringBuilderWrapper, MetadataType> InnerTypeFilter { get; set; }

PostTypeFilter​

View Source​
Declaration
public static Action<StringBuilderWrapper, MetadataType> PostTypeFilter { get; set; }

PrePropertyFilter​

View Source​
Declaration
public static Action<StringBuilderWrapper, MetadataPropertyType, MetadataType> PrePropertyFilter { get; set; }

PostPropertyFilter​

View Source​
Declaration
public static Action<StringBuilderWrapper, MetadataPropertyType, MetadataType> PostPropertyFilter { get; set; }

GenerateServiceStackTypes​

View Source​
Declaration
public static bool GenerateServiceStackTypes { get; }

TypeFilter​

View Source​
Declaration
public static TypeFilterDelegate TypeFilter { get; set; }

PropertyTypeFilter​

View Source​
Declaration
public static Func<DartGenerator, MetadataType, MetadataPropertyType, string> PropertyTypeFilter { get; set; }

InsertCodeFilter​

Add Code to top of generated code

View Source​
Declaration
public static AddCodeDelegate InsertCodeFilter { get; set; }

AddCodeFilter​

Add Code to bottom of generated code

View Source​
Declaration
public static AddCodeDelegate AddCodeFilter { get; set; }

AddQueryParamOptions​

Additional Options in Header Options

View Source​
Declaration
public List<string> AddQueryParamOptions { get; set; }

WithoutOptions​

Emit code without Header Options

View Source​
Declaration
public bool WithoutOptions { get; set; }

Fields​

DefaultImports​

View Source​
Declaration
public static List<string> DefaultImports

TypeAliases​

View Source​
Declaration
public static Dictionary<string, string> TypeAliases

DartToJsonConverters​

View Source​
Declaration
public static Dictionary<string, string> DartToJsonConverters

IgnoreTypeInfosFor​

View Source​
Declaration
public static HashSet<string> IgnoreTypeInfosFor

FilterTypes​

View Source​
Declaration
public static Func<List<MetadataType>, List<MetadataType>> FilterTypes

ArrayTypes​

View Source​
Declaration
public static HashSet<string> ArrayTypes

DictionaryTypes​

View Source​
Declaration
public static HashSet<string> DictionaryTypes

SetTypes​

View Source​
Declaration
public static HashSet<string> SetTypes

Methods​

DefaultFilterTypes(List<MetadataType>)​

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

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

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

GetCode(MetadataTypes, IRequest, INativeTypesMetadata)​

View Source​
Declaration
public string GetCode(MetadataTypes metadata, IRequest request, INativeTypesMetadata nativeTypes)
Returns​

System.String

Parameters​
TypeName
ServiceStack.MetadataTypesmetadata
ServiceStack.Web.IRequestrequest
ServiceStack.NativeTypes.INativeTypesMetadatanativeTypes

RegisterPropertyType(MetadataPropertyType, String)​

View Source​
Declaration
public void RegisterPropertyType(MetadataPropertyType prop, string dartType)
Parameters​
TypeName
ServiceStack.MetadataPropertyTypeprop
System.StringdartType

DartLiteral(String)​

View Source​
Declaration
public string DartLiteral(string typeName)
Returns​

System.String

Parameters​
TypeName
System.StringtypeName

UseTypeConversion(MetadataPropertyType)​

View Source​
Declaration
public bool UseTypeConversion(MetadataPropertyType prop)
Returns​

System.Boolean

Parameters​
TypeName
ServiceStack.MetadataPropertyTypeprop

AddProperties(StringBuilderWrapper, MetadataType, Boolean)​

View Source​
Declaration
public void AddProperties(StringBuilderWrapper sb, MetadataType type, bool includeResponseStatus)
Parameters​
TypeName
ServiceStack.NativeTypes.StringBuilderWrappersb
ServiceStack.MetadataTypetype
System.BooleanincludeResponseStatus

GetPropertyType(MetadataPropertyType)​

View Source​
Declaration
public virtual string GetPropertyType(MetadataPropertyType prop)
Returns​

System.String

Parameters​
TypeName
ServiceStack.MetadataPropertyTypeprop

AppendAttributes(StringBuilderWrapper, List<MetadataAttribute>)​

View Source​
Declaration
public bool AppendAttributes(StringBuilderWrapper sb, List<MetadataAttribute> attributes)
Returns​

System.Boolean

Parameters​
TypeName
ServiceStack.NativeTypes.StringBuilderWrappersb
System.Collections.Generic.List<ServiceStack.MetadataAttribute>attributes

TypeValue(String, String)​

View Source​
Declaration
public string TypeValue(string type, string value)
Returns​

System.String

Parameters​
TypeName
System.Stringtype
System.Stringvalue

Type(MetadataTypeName)​

View Source​
Declaration
public string Type(MetadataTypeName typeName)
Returns​

System.String

Parameters​
TypeName
ServiceStack.MetadataTypeNametypeName

Type(String, String[])​

View Source​
Declaration
public string Type(string type, string[] genericArgs)
Returns​

System.String

Parameters​
TypeName
System.Stringtype
System.String[]genericArgs

RawGenericType(String, String[])​

View Source​
Declaration
public string RawGenericType(string type, string[] genericArgs)
Returns​

System.String

Parameters​
TypeName
System.Stringtype
System.String[]genericArgs

NameOnly(String)​

View Source​
Declaration
public string NameOnly(string type)
Returns​

System.String

Parameters​
TypeName
System.Stringtype

AppendComments(StringBuilderWrapper, String)​

View Source​
Declaration
public bool AppendComments(StringBuilderWrapper sb, string desc)
Returns​

System.Boolean

Parameters​
TypeName
ServiceStack.NativeTypes.StringBuilderWrappersb
System.Stringdesc

AppendDataContract(StringBuilderWrapper, MetadataDataContract)​

View Source​
Declaration
public void AppendDataContract(StringBuilderWrapper sb, MetadataDataContract dcMeta)
Parameters​
TypeName
ServiceStack.NativeTypes.StringBuilderWrappersb
ServiceStack.MetadataDataContractdcMeta

AppendDataMember(StringBuilderWrapper, MetadataDataMember, Int32)​

View Source​
Declaration
public bool AppendDataMember(StringBuilderWrapper sb, MetadataDataMember dmMeta, int dataMemberIndex)
Returns​

System.Boolean

Parameters​
TypeName
ServiceStack.NativeTypes.StringBuilderWrappersb
ServiceStack.MetadataDataMemberdmMeta
System.Int32dataMemberIndex

GenericArg(String)​

View Source​
Declaration
public string GenericArg(string arg)
Returns​

System.String

Parameters​
TypeName
System.Stringarg

ConvertFromCSharp(TextNode)​

View Source​
Declaration
public string ConvertFromCSharp(TextNode node)
Returns​

System.String

Parameters​
TypeName
ServiceStack.TextNodenode

RawGenericArg(String)​

View Source​
Declaration
public string RawGenericArg(string arg)
Returns​

System.String

Parameters​
TypeName
System.Stringarg

RawType(TextNode)​

View Source​
Declaration
public string RawType(TextNode node)
Returns​

System.String

Parameters​
TypeName
ServiceStack.TextNodenode

GetPropertyName(String)​

View Source​
Declaration
public string GetPropertyName(string name)
Returns​

System.String

Parameters​
TypeName
System.Stringname

GetPropertyName(MetadataPropertyType)​

View Source​
Declaration
public string GetPropertyName(MetadataPropertyType prop)
Returns​

System.String

Parameters​
TypeName
ServiceStack.MetadataPropertyTypeprop

Implements​