public static valueType DeSerialize <valueType>(ref SubArray <byte> data, DeSerializeConfig config = null)
        {
            if (data.Length != 0)
            {
                fixed(byte *dataFixed = data.Array)
                {
                    valueType value = default(valueType);

                    if (DeSerialize <valueType>(data.Array, dataFixed + data.Start, data.Length, ref value, config))
                    {
                        return(value);
                    }
                }
            }
            return(default(valueType));
        }
 internal void SetTcpServer(DeSerializeConfig config, object context)
 {
     Config  = config;
     Context = context;
 }
        public static DeSerializeResult DeSerialize <valueType>(ref SubArray <byte> data, ref valueType value, DeSerializeConfig config = null)
        {
            if (data.Length == 0)
            {
                return new DeSerializeResult {
                           State = DeSerializeState.UnknownData
                }
            }
            ;

            fixed(byte *dataFixed = data.Array) return(DeSerialize <valueType>(data.Array, dataFixed + data.Start, data.Length, ref value, config));
        }
 public static DeSerializeResult DeSerialize <valueType>(SubArray <byte> data, ref valueType value, DeSerializeConfig config = null)
 {
     return(DeSerialize(ref data, ref value, config));
 }
 public static valueType DeSerialize <valueType>(SubArray <byte> data, DeSerializeConfig config = null)
 {
     return(DeSerialize <valueType>(ref data, config));
 }
Ejemplo n.º 6
0
 internal void SetTcpServer(DeSerializeConfig config)
 {
     Config = config;
 }