Exemplo n.º 1
0
        public string EncodeTypeDeclaration(bool isRequired)
        {
            if (this.ModelType is IVariableType)
            {
                return(((IVariableType)this.ModelType).EncodeTypeDeclaration(isRequired));
            }

            return(SwiftNameHelper.getTypeName(this.ModelType.Name, isRequired));
        }
Exemplo n.º 2
0
        public string VariableTypeDeclaration(bool isRequired)
        {
            var retVal = this.IsNamed ? this.Name.FixedValue + "Enum" : "String";

            if (this.UnNamedEnumRelatedType != null)
            {
                return(this.UnNamedEnumRelatedType.VariableTypeDeclaration(isRequired));
            }

            return(SwiftNameHelper.getTypeName(retVal, isRequired));
        }
Exemplo n.º 3
0
        public string EncodeTypeDeclaration(bool isRequired)
        {
            var retVal = $"[{ElementType.Name}]";

            if (ElementType is IVariableType)
            {
                retVal = $"[{((IVariableType)ElementType).EncodeTypeDeclaration(isRequired)}]";
            }

            return(SwiftNameHelper.getTypeName(retVal, isRequired));
        }
Exemplo n.º 4
0
        public string DecodeTypeDeclaration(bool isRequired)
        {
            var retVal = this.ModelType.Name;

            if (this.ModelType is IVariableType)
            {
                return(((IVariableType)this.ModelType).DecodeTypeDeclaration(isRequired));
            }

            return(SwiftNameHelper.getTypeName(retVal, isRequired));
        }
Exemplo n.º 5
0
        public string VariableTypeDeclaration(bool isRequired)
        {
            var retVal = string.Format(CultureInfo.InvariantCulture, FieldNameFormat,
                                       this.ValueType.Name);

            if (ValueType is IVariableType)
            {
                retVal = string.Format(CultureInfo.InvariantCulture, FieldNameFormat,
                                       ((IVariableType)ValueType).VariableTypeDeclaration(isRequired));
            }

            return(SwiftNameHelper.getTypeName(retVal, isRequired));
        }
Exemplo n.º 6
0
 public string DecodeTypeDeclaration(bool isRequired)
 {
     return(SwiftNameHelper.getTypeName(this.TypeName, isRequired));
 }
Exemplo n.º 7
0
 public string VariableTypeDeclaration(bool isRequired)
 {
     return(SwiftNameHelper.getTypeName(this.Name + "Protocol", isRequired));
 }