public void Write(TProtocol oprot) { oprot.IncrementRecursionDepth(); try { TStruct struc = new TStruct("ProductProperty"); oprot.WriteStructBegin(struc); TField field = new TField(); if (StickerProperty != null && __isset.stickerProperty) { field.Name = "stickerProperty"; field.Type = TType.Struct; field.ID = 1; oprot.WriteFieldBegin(field); StickerProperty.Write(oprot); oprot.WriteFieldEnd(); } if (ThemeProperty != null && __isset.themeProperty) { field.Name = "themeProperty"; field.Type = TType.Struct; field.ID = 2; oprot.WriteFieldBegin(field); ThemeProperty.Write(oprot); oprot.WriteFieldEnd(); } if (SticonProperty != null && __isset.sticonProperty) { field.Name = "sticonProperty"; field.Type = TType.Struct; field.ID = 3; oprot.WriteFieldBegin(field); SticonProperty.Write(oprot); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); } finally { oprot.DecrementRecursionDepth(); } }
public override string ToString() { StringBuilder __sb = new StringBuilder("ProductProperty("); bool __first = true; if (StickerProperty != null && __isset.stickerProperty) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("StickerProperty: "); __sb.Append(StickerProperty == null ? "<null>" : StickerProperty.ToString()); } if (SticonProperty != null && __isset.sticonProperty) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("SticonProperty: "); __sb.Append(SticonProperty == null ? "<null>" : SticonProperty.ToString()); } if (ThemeProperty != null && __isset.themeProperty) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("ThemeProperty: "); __sb.Append(ThemeProperty == null ? "<null>" : ThemeProperty.ToString()); } __sb.Append(")"); return(__sb.ToString()); }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Struct) { StickerProperty = new StickerProperty(); StickerProperty.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Struct) { SticonProperty = new SticonProperty(); SticonProperty.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { ThemeProperty = new ThemeProperty(); ThemeProperty.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }