Ejemplo n.º 1
0
            public GenType ConvertToGenType(BaijiType type)
            {
                var csharpTypeName = ConvertToString(type);
                var baseType       = ((BaseType)type).BType;
                var gType          = GTYPE_BASETYPE_MAP[baseType];
                var genType        = new GenType(gType, csharpTypeName);

                return(genType);
            }
Ejemplo n.º 2
0
            public GenType ConvertToGenType(BaijiType type)
            {
                var csharpTypeName = ConvertToString(type);

                var listType = type as ListType;
                var genType  = new GenType(GType.List, csharpTypeName);

                genType.ElementType           = typeToCSharpConverter.ConvertToGenType(listType.Type);
                genType.ElementCSharpTypeName = typeToCSharpConverter.ConvertToString(listType.Type);
                return(genType);
            }
Ejemplo n.º 3
0
            public GenType ConvertToGenType(BaijiType type)
            {
                var csharpTypeName = ConvertToString(type);

                var mapType = type as MapType;
                var genType = new GenType(GType.Map, csharpTypeName);

                genType.KeyType             = typeToCSharpConverter.ConvertToGenType(mapType.KeyType);
                genType.KeyCSharpTypeName   = typeToCSharpConverter.ConvertToString(mapType.KeyType);
                genType.ValueType           = typeToCSharpConverter.ConvertToGenType(mapType.ValueType);
                genType.ValueCSharpTypeName = typeToCSharpConverter.ConvertToString(mapType.ValueType);
                return(genType);
            }