public override string ToString() { StringBuilder sb = new StringBuilder("MEvent("); sb.Append("ActionType: "); sb.Append(ActionType); sb.Append(",OpenChat: "); sb.Append(OpenChat == null ? "<null>" : OpenChat.ToString()); sb.Append(",CloseChat: "); sb.Append(CloseChat == null ? "<null>" : CloseChat.ToString()); sb.Append(",ChatMessage: "); sb.Append(ChatMessage == null ? "<null>" : ChatMessage.ToString()); sb.Append(",AcceptBid: "); sb.Append(AcceptBid == null ? "<null>" : AcceptBid.ToString()); sb.Append(",RefuseBid: "); sb.Append(RefuseBid == null ? "<null>" : RefuseBid.ToString()); sb.Append(",CloseSale: "); sb.Append(CloseSale == null ? "<null>" : CloseSale.ToString()); sb.Append(",Bid: "); sb.Append(Bid == null ? "<null>" : Bid.ToString()); sb.Append(")"); return(sb.ToString()); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("MEvent"); oprot.WriteStructBegin(struc); TField field = new TField(); if (__isset.actionType) { field.Name = "actionType"; field.Type = TType.I16; field.ID = 10; oprot.WriteFieldBegin(field); oprot.WriteI16(ActionType); oprot.WriteFieldEnd(); } if (OpenChat != null && __isset.openChat) { field.Name = "openChat"; field.Type = TType.Struct; field.ID = 20; oprot.WriteFieldBegin(field); OpenChat.Write(oprot); oprot.WriteFieldEnd(); } if (CloseChat != null && __isset.closeChat) { field.Name = "closeChat"; field.Type = TType.Struct; field.ID = 30; oprot.WriteFieldBegin(field); CloseChat.Write(oprot); oprot.WriteFieldEnd(); } if (ChatMessage != null && __isset.chatMessage) { field.Name = "chatMessage"; field.Type = TType.Struct; field.ID = 40; oprot.WriteFieldBegin(field); ChatMessage.Write(oprot); oprot.WriteFieldEnd(); } if (AcceptBid != null && __isset.acceptBid) { field.Name = "acceptBid"; field.Type = TType.Struct; field.ID = 50; oprot.WriteFieldBegin(field); AcceptBid.Write(oprot); oprot.WriteFieldEnd(); } if (RefuseBid != null && __isset.refuseBid) { field.Name = "refuseBid"; field.Type = TType.Struct; field.ID = 60; oprot.WriteFieldBegin(field); RefuseBid.Write(oprot); oprot.WriteFieldEnd(); } if (CloseSale != null && __isset.closeSale) { field.Name = "closeSale"; field.Type = TType.Struct; field.ID = 70; oprot.WriteFieldBegin(field); CloseSale.Write(oprot); oprot.WriteFieldEnd(); } if (Bid != null && __isset.bid) { field.Name = "bid"; field.Type = TType.Struct; field.ID = 80; oprot.WriteFieldBegin(field); Bid.Write(oprot); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }