コード例 #1
0
        public static PrimitiveType MapPrimitiveType(PrimitiveTypeCodec type)
        {
            switch (type)
            {
            case PrimitiveTypeCodec.INT8:
                return(PrimitiveType.SbeInt8);

            case PrimitiveTypeCodec.INT16:
                return(PrimitiveType.SbeInt16);

            case PrimitiveTypeCodec.INT32:
                return(PrimitiveType.SbeInt32);

            case PrimitiveTypeCodec.INT64:
                return(PrimitiveType.SbeInt64);

            case PrimitiveTypeCodec.UINT8:
                return(PrimitiveType.SbeUInt8);

            case PrimitiveTypeCodec.UINT16:
                return(PrimitiveType.SbeUInt16);

            case PrimitiveTypeCodec.UINT32:
                return(PrimitiveType.SbeUInt32);

            case PrimitiveTypeCodec.UINT64:
                return(PrimitiveType.SbeUInt64);

            case PrimitiveTypeCodec.FLOAT:
                return(PrimitiveType.SbeFloat);

            case PrimitiveTypeCodec.DOUBLE:
                return(PrimitiveType.SbeDouble);

            case PrimitiveTypeCodec.CHAR:
                return(PrimitiveType.SbeChar);

            case PrimitiveTypeCodec.NONE:
            default:
                return(null);
            }
        }
コード例 #2
0
        public static PrimitiveType MapPrimitiveType(PrimitiveTypeCodec type)
        {
            switch (type)
            {
                case PrimitiveTypeCodec.INT8:
                    return PrimitiveType.SbeInt8;

                case PrimitiveTypeCodec.INT16:
                    return PrimitiveType.SbeInt16;

                case PrimitiveTypeCodec.INT32:
                    return PrimitiveType.SbeInt32;

                case PrimitiveTypeCodec.INT64:
                    return PrimitiveType.SbeInt64;

                case PrimitiveTypeCodec.UINT8:
                    return PrimitiveType.SbeUInt8;

                case PrimitiveTypeCodec.UINT16:
                    return PrimitiveType.SbeUInt16;

                case PrimitiveTypeCodec.UINT32:
                    return PrimitiveType.SbeUInt32;

                case PrimitiveTypeCodec.UINT64:
                    return PrimitiveType.SbeUInt64;

                case PrimitiveTypeCodec.FLOAT:
                    return PrimitiveType.SbeFloat;

                case PrimitiveTypeCodec.DOUBLE:
                    return PrimitiveType.SbeDouble;

                case PrimitiveTypeCodec.CHAR:
                    return PrimitiveType.SbeChar;

                case PrimitiveTypeCodec.NONE:
                default:
                    return null;
            }
        }