Пример #1
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("MAvatarDescription");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (AvatarID == null)
         {
             throw new TProtocolException(TProtocolException.INVALID_DATA, "required field AvatarID not set");
         }
         field.Name = "AvatarID";
         field.Type = TType.String;
         field.ID   = 1;
         oprot.WriteFieldBegin(field);
         oprot.WriteString(AvatarID);
         oprot.WriteFieldEnd();
         if (ZeroPosture == null)
         {
             throw new TProtocolException(TProtocolException.INVALID_DATA, "required field ZeroPosture not set");
         }
         field.Name = "ZeroPosture";
         field.Type = TType.Struct;
         field.ID   = 2;
         oprot.WriteFieldBegin(field);
         ZeroPosture.Write(oprot);
         oprot.WriteFieldEnd();
         if (Properties != null && __isset.Properties)
         {
             field.Name = "Properties";
             field.Type = TType.Map;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteMapBegin(new TMap(TType.String, TType.String, Properties.Count));
                 foreach (string _iter29 in Properties.Keys)
                 {
                     oprot.WriteString(_iter29);
                     oprot.WriteString(Properties[_iter29]);
                 }
                 oprot.WriteMapEnd();
             }
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
Пример #2
0
        public override string ToString()
        {
            StringBuilder __sb = new StringBuilder("MAvatarDescription(");

            __sb.Append(", AvatarID: ");
            __sb.Append(AvatarID);
            __sb.Append(", ZeroPosture: ");
            __sb.Append(ZeroPosture == null ? "<null>" : ZeroPosture.ToString());
            if (Properties != null && __isset.Properties)
            {
                __sb.Append(", Properties: ");
                __sb.Append(Properties);
            }
            __sb.Append(")");
            return(__sb.ToString());
        }