Ejemplo n.º 1
0
 protected void deSerializeParameter <parameterType>(AutoCSer.BinarySerialize.DeSerializer deSerializer, ref parameterType parameter)
 {
     if (deSerializer.CheckNullValue() != 0)
     {
         AutoCSer.BinarySerialize.TypeDeSerializer <parameterType> .DeSerialize(deSerializer, ref parameter);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 反序列化父节点
 /// </summary>
 /// <param name="deSerializer"></param>
 protected void deSerializeParent(AutoCSer.BinarySerialize.DeSerializer deSerializer)
 {
     if (deSerializer.CheckNullValue() != 0)
     {
         DeSerialize(deSerializer, out Parent);
     }
 }
Ejemplo n.º 3
0
 private void deSerialize(AutoCSer.BinarySerialize.DeSerializer deSerializer)
 {
     if (deSerializer.CheckNullValue() != 0)
     {
         byte *read = deSerializer.Read;
         deSerializer.DeSerializeTcpServer(ref LoadData, read + sizeof(int), *(int *)read);
         deSerializer.MoveRead(LoadData.Length + sizeof(int));
     }
 }
Ejemplo n.º 4
0
        private void deSerialize(AutoCSer.BinarySerialize.DeSerializer deSerializer)
        {
            if (deSerializer.CheckNullValue() == 0)
            {
                Value = default(valueType);
            }
            else
            {
                MemberMap oldMemberMap = deSerializer.MemberMap;
                deSerializer.MemberMap = MemberMap;
                try
                {
                    if (Value == null)
                    {
                        valueType poolValue = Value = MemberMapValueLinkPool <valueType> .Pop();

                        try
                        {
                            AutoCSer.BinarySerialize.TypeDeSerializer <valueType> .DeSerialize(deSerializer, ref Value);
                        }
                        finally
                        {
                            if (poolValue != Value)
                            {
                                MemberMapValueLinkPool <valueType> .PushNotNull(poolValue);
                            }
                        }
                    }
                    else
                    {
                        memberMapType parseValue = Value;
                        AutoCSer.BinarySerialize.TypeDeSerializer <memberMapType> .DeSerialize(deSerializer, ref parseValue);
                    }
                }
                finally
                {
                    MemberMap = (MemberMap <memberMapType>)deSerializer.MemberMap;
                    deSerializer.MemberMap = oldMemberMap;
                }
            }
        }