Пример #1
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("MWalkPoint");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (PositionConstraint == null)
         {
             throw new TProtocolException(TProtocolException.INVALID_DATA, "required field PositionConstraint not set");
         }
         field.Name = "PositionConstraint";
         field.Type = TType.Struct;
         field.ID   = 1;
         oprot.WriteFieldBegin(field);
         PositionConstraint.Write(oprot);
         oprot.WriteFieldEnd();
         field.Name = "Suitability";
         field.Type = TType.Double;
         field.ID   = 2;
         oprot.WriteFieldBegin(field);
         oprot.WriteDouble(Suitability);
         oprot.WriteFieldEnd();
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }