public void Write(TProtocol oprot) { oprot.IncrementRecursionDepth(); try { TStruct struc = new TStruct("DataUnit"); oprot.WriteStructBegin(struc); TField field = new TField(); if (Person_property != null && __isset.person_property) { field.Name = "person_property"; field.Type = TType.Struct; field.ID = 1; oprot.WriteFieldBegin(field); Person_property.Write(oprot); oprot.WriteFieldEnd(); } if (Page_property != null && __isset.page_property) { field.Name = "page_property"; field.Type = TType.Struct; field.ID = 2; oprot.WriteFieldBegin(field); Page_property.Write(oprot); oprot.WriteFieldEnd(); } if (Equiv != null && __isset.equiv) { field.Name = "equiv"; field.Type = TType.Struct; field.ID = 3; oprot.WriteFieldBegin(field); Equiv.Write(oprot); oprot.WriteFieldEnd(); } if (Page_view != null && __isset.page_view) { field.Name = "page_view"; field.Type = TType.Struct; field.ID = 4; oprot.WriteFieldBegin(field); Page_view.Write(oprot); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); } finally { oprot.DecrementRecursionDepth(); } }
public override string ToString() { StringBuilder __sb = new StringBuilder("DataUnit("); bool __first = true; if (Person_property != null && __isset.person_property) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Person_property: "); __sb.Append(Person_property == null ? "<null>" : Person_property.ToString()); } if (Page_property != null && __isset.page_property) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Page_property: "); __sb.Append(Page_property == null ? "<null>" : Page_property.ToString()); } if (Equiv != null && __isset.equiv) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Equiv: "); __sb.Append(Equiv == null ? "<null>" : Equiv.ToString()); } if (Page_view != null && __isset.page_view) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Page_view: "); __sb.Append(Page_view == null ? "<null>" : Page_view.ToString()); } __sb.Append(")"); return(__sb.ToString()); }