Inheritance: TBase
Beispiel #1
0
 internal static NoteStore.Client GetNoteStoreClient(String edamBaseUrl, User user)
 {
     Uri noteStoreUrl = new Uri(edamBaseUrl + "/edam/note/" + user.ShardId);
     TTransport noteStoreTransport = new THttpClient(noteStoreUrl);
     TProtocol noteStoreProtocol = new TBinaryProtocol(noteStoreTransport);
     NoteStore.Client noteStore = new NoteStore.Client(noteStoreProtocol);
     return noteStore;
 }
 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.String) {
           Guid = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Name = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.I32) {
           UpdateSequenceNum = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 6:
         if (field.Type == TType.Bool) {
           DefaultNotebook = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 7:
         if (field.Type == TType.I64) {
           ServiceCreated = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 8:
         if (field.Type == TType.I64) {
           ServiceUpdated = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 10:
         if (field.Type == TType.Struct) {
           Publishing = new Publishing();
           Publishing.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 11:
         if (field.Type == TType.Bool) {
           Published = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 12:
         if (field.Type == TType.String) {
           Stack = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 13:
         if (field.Type == TType.List) {
           {
             SharedNotebookIds = new List<long>();
             TList _list34 = iprot.ReadListBegin();
             for( int _i35 = 0; _i35 < _list34.Count; ++_i35)
             {
               long _elem36 = 0;
               _elem36 = iprot.ReadI64();
               SharedNotebookIds.Add(_elem36);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 14:
         if (field.Type == TType.List) {
           {
             SharedNotebooks = new List<SharedNotebook>();
             TList _list37 = iprot.ReadListBegin();
             for( int _i38 = 0; _i38 < _list37.Count; ++_i38)
             {
               SharedNotebook _elem39 = new SharedNotebook();
               _elem39 = new SharedNotebook();
               _elem39.Read(iprot);
               SharedNotebooks.Add(_elem39);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 15:
         if (field.Type == TType.Struct) {
           BusinessNotebook = new BusinessNotebook();
           BusinessNotebook.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 16:
         if (field.Type == TType.Struct) {
           Contact = new User();
           Contact.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 17:
         if (field.Type == TType.Struct) {
           Restrictions = new NotebookRestrictions();
           Restrictions.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }