public void Read(TProtocol iprot) { 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) { Info = new com.imd.doc.thrift.Info(); Info.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public UserShare(string id, com.imd.user.thrift.User user, com.imd.doc.thrift.Info info, long createTime) : this() { this.Id = id; this.User = user; this.Info = info; this.CreateTime = createTime; }
public UserFavourite(string id, com.imd.user.thrift.User user, com.imd.doc.thrift.Info info, long createTime, bool status) : this() { this.Id = id; this.User = user; this.Info = info; this.CreateTime = createTime; this.Status = status; }
public UserDownload(string id, com.imd.user.thrift.User user, com.imd.doc.thrift.Info info, long createTime, DownloadStatus status) : this() { this.Id = id; this.User = user; this.Info = info; this.CreateTime = createTime; this.Status = status; }
public void index(com.imd.doc.thrift.Info info) { #if !SILVERLIGHT send_index(info); recv_index(); #else var asyncResult = Begin_index(null, null, info); End_index(asyncResult); #endif }
public void send_index(com.imd.doc.thrift.Info info) #endif { oprot_.WriteMessageBegin(new TMessage("index", TMessageType.Call, seqid_)); index_args args = new index_args(); args.Info = info; args.Write(oprot_); oprot_.WriteMessageEnd(); #if SILVERLIGHT return(oprot_.Transport.BeginFlush(callback, state)); #else oprot_.Transport.Flush(); #endif }
public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.I64) { Total = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.I64) { Time = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.List) { { Results = new List <com.imd.doc.thrift.Info>(); TList _list0 = iprot.ReadListBegin(); for (int _i1 = 0; _i1 < _list0.Count; ++_i1) { com.imd.doc.thrift.Info _elem2 = new com.imd.doc.thrift.Info(); _elem2 = new com.imd.doc.thrift.Info(); _elem2.Read(iprot); Results.Add(_elem2); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Read(TProtocol iprot) { bool isset_id = false; bool isset_user = false; bool isset_info = false; bool isset_createTime = false; bool isset_status = 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) { Id = iprot.ReadString(); isset_id = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { User = new com.imd.user.thrift.User(); User.Read(iprot); isset_user = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Struct) { Info = new com.imd.doc.thrift.Info(); Info.Read(iprot); isset_info = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.I64) { CreateTime = iprot.ReadI64(); isset_createTime = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.I64) { UpdateTime = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.Bool) { Status = iprot.ReadBool(); isset_status = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_id) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_user) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_info) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_createTime) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_status) { throw new TProtocolException(TProtocolException.INVALID_DATA); } }
public IAsyncResult send_index(AsyncCallback callback, object state, com.imd.doc.thrift.Info info)
public IAsyncResult Begin_index(AsyncCallback callback, object state, com.imd.doc.thrift.Info info) { return(send_index(callback, state, info)); }