SwiftGenerator
Assembly: ServiceStack.dll
View Source
Declaration
public class SwiftGenerator : 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; }
EnumNameStrategy
View Source
Declaration
public static Func<string, string> EnumNameStrategy { get; set; }
TypeFilter
View Source
Declaration
public static TypeFilterDelegate TypeFilter { get; set; }
PropertyTypeFilter
View Source
Declaration
public static Func<SwiftGenerator, 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
Include Additional QueryString Params 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 ConcurrentDictionary<string, string> TypeAliases
IgnoreTypeNames
View Source
Declaration
public static HashSet<string> IgnoreTypeNames
Converters
Customize how types are encoded & decoded with a Type Converter
View Source
Declaration
public static ConcurrentDictionary<string, SwiftTypeConverter> Converters
OverrideInitForBaseClasses
View Source
Declaration
public static HashSet<string> OverrideInitForBaseClasses
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
IgnorePropertyTypeNames
View Source
Declaration
public static HashSet<string> IgnorePropertyTypeNames
IgnorePropertyNames
View Source
Declaration
public static HashSet<string> IgnorePropertyNames
IgnoreArrayReturnTypes
View Source
Declaration
public static bool IgnoreArrayReturnTypes
Methods
CSharpStyleEnums(String)
View Source
Declaration
public static string CSharpStyleEnums(string enumName)
Returns
System.String
Parameters
| Type | Name | 
|---|---|
| System.String | enumName | 
SwiftStyleEnums(String)
View Source
Declaration
public static string SwiftStyleEnums(string enumName)
Returns
System.String
Parameters
| Type | Name | 
|---|---|
| System.String | enumName | 
DefaultFilterTypes(List<MetadataType>)
View Source
Declaration
public static List<MetadataType> DefaultFilterTypes(List<MetadataType> types)
Returns
System.Collections.Generic.List<ServiceStack.MetadataType>
Parameters
| Type | Name | 
|---|---|
| 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
| Type | Name | 
|---|---|
| ServiceStack.MetadataTypes | metadata | 
| ServiceStack.Web.IRequest | request | 
| ServiceStack.NativeTypes.INativeTypesMetadata | nativeTypes | 
GetProperties(MetadataType)
View Source
Declaration
public List<MetadataPropertyType> GetProperties(MetadataType type)
Returns
System.Collections.Generic.List<ServiceStack.MetadataPropertyType>
Parameters
| Type | Name | 
|---|---|
| ServiceStack.MetadataType | type | 
AddProperties(StringBuilderWrapper, MetadataType, Boolean, Boolean)
View Source
Declaration
public void AddProperties(StringBuilderWrapper sb, MetadataType type, bool initCollections, bool includeResponseStatus)
Parameters
| Type | Name | 
|---|---|
| ServiceStack.NativeTypes.StringBuilderWrapper | sb | 
| ServiceStack.MetadataType | type | 
| System.Boolean | initCollections | 
| System.Boolean | includeResponseStatus | 
GetPropertyType(MetadataPropertyType)
View Source
Declaration
public virtual string GetPropertyType(MetadataPropertyType prop)
Returns
System.String
Parameters
| Type | Name | 
|---|---|
| ServiceStack.MetadataPropertyType | prop | 
AppendAttributes(StringBuilderWrapper, List<MetadataAttribute>)
View Source
Declaration
public bool AppendAttributes(StringBuilderWrapper sb, List<MetadataAttribute> attributes)
Returns
System.Boolean
Parameters
| Type | Name | 
|---|---|
| ServiceStack.NativeTypes.StringBuilderWrapper | sb | 
| System.Collections.Generic.List<ServiceStack.MetadataAttribute> | attributes | 
TypeValue(String, String)
View Source
Declaration
public string TypeValue(string type, string value)
Returns
System.String
Parameters
| Type | Name | 
|---|---|
| System.String | type | 
| System.String | value | 
Type(MetadataTypeName)
View Source
Declaration
public string Type(MetadataTypeName typeName)
Returns
System.String
Parameters
| Type | Name | 
|---|---|
| ServiceStack.MetadataTypeName | typeName | 
FindType(String, String, String[])
View Source
Declaration
public MetadataType FindType(string typeName, string typeNamespace, params string[] genericArgs)
Returns
Parameters
| Type | Name | 
|---|---|
| System.String | typeName | 
| System.String | typeNamespace | 
| System.String[] | genericArgs | 
FindType(MetadataTypeName)
View Source
Declaration
public MetadataType FindType(MetadataTypeName typeName)
Returns
Parameters
| Type | Name | 
|---|---|
| ServiceStack.MetadataTypeName | typeName | 
ReturnType(String, String[])
View Source
Declaration
public string ReturnType(string type, string[] genericArgs)
Returns
System.String
Parameters
| Type | Name | 
|---|---|
| System.String | type | 
| System.String[] | genericArgs | 
Type(String, String[])
View Source
Declaration
public string Type(string type, string[] genericArgs)
Returns
System.String
Parameters
| Type | Name | 
|---|---|
| System.String | type | 
| System.String[] | genericArgs | 
NameOnly(String)
View Source
Declaration
public string NameOnly(string type)
Returns
System.String
Parameters
| Type | Name | 
|---|---|
| System.String | type | 
AppendComments(StringBuilderWrapper, String)
View Source
Declaration
public bool AppendComments(StringBuilderWrapper sb, string desc)
Returns
System.Boolean
Parameters
| Type | Name | 
|---|---|
| ServiceStack.NativeTypes.StringBuilderWrapper | sb | 
| System.String | desc | 
AppendDataContract(StringBuilderWrapper, MetadataDataContract)
View Source
Declaration
public void AppendDataContract(StringBuilderWrapper sb, MetadataDataContract dcMeta)
Parameters
| Type | Name | 
|---|---|
| ServiceStack.NativeTypes.StringBuilderWrapper | sb | 
| ServiceStack.MetadataDataContract | dcMeta | 
AppendDataMember(StringBuilderWrapper, MetadataDataMember, Int32)
View Source
Declaration
public bool AppendDataMember(StringBuilderWrapper sb, MetadataDataMember dmMeta, int dataMemberIndex)
Returns
System.Boolean
Parameters
| Type | Name | 
|---|---|
| ServiceStack.NativeTypes.StringBuilderWrapper | sb | 
| ServiceStack.MetadataDataMember | dmMeta | 
| System.Int32 | dataMemberIndex | 
GenericArg(String)
View Source
Declaration
public string GenericArg(string arg)
Returns
System.String
Parameters
| Type | Name | 
|---|---|
| System.String | arg | 
ConvertFromCSharp(TextNode)
View Source
Declaration
public string ConvertFromCSharp(TextNode node)
Returns
System.String
Parameters
| Type | Name | 
|---|---|
| ServiceStack.TextNode | node | 
AddGenericConstraints(String)
View Source
Declaration
public static string AddGenericConstraints(string typeDef)
Returns
System.String
Parameters
| Type | Name | 
|---|---|
| System.String | typeDef | 
GetPropertyName(String)
View Source
Declaration
public string GetPropertyName(string name)
Returns
System.String
Parameters
| Type | Name | 
|---|---|
| System.String | name | 
GetPropertyName(MetadataPropertyType)
View Source
Declaration
public string GetPropertyName(MetadataPropertyType prop)
Returns
System.String
Parameters
| Type | Name | 
|---|---|
| ServiceStack.MetadataPropertyType | prop |