public TMessages(string FromVssId, TFile FileOject, int ProvideTime, string FromApp, string ProvideName) : this() { this.FromVssId = FromVssId; this.FileOject = FileOject; this.ProvideTime = ProvideTime; this.FromApp = FromApp; this.ProvideName = ProvideName; }
public void Read(TProtocol iprot) { bool isset_FromVssId = false; bool isset_FileOject = false; bool isset_ProvideTime = false; bool isset_FromApp = false; bool isset_ProvideName = false; TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.String) { FromVssId = iprot.ReadString(); isset_FromVssId = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { FileOject = new TFile(); FileOject.Read(iprot); isset_FileOject = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.I32) { ProvideTime = iprot.ReadI32(); isset_ProvideTime = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.String) { FromApp = iprot.ReadString(); isset_FromApp = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.String) { ProvideName = iprot.ReadString(); isset_ProvideName = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_FromVssId) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_FileOject) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_ProvideTime) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_FromApp) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_ProvideName) { throw new TProtocolException(TProtocolException.INVALID_DATA); } }