public async Task<PaginatedResponse<IEnumerable<FriendsInCategoryResponse>>> GetFriendsInCategory(PaginatedRequest<FriendsInCategoryRequest> request, SystemSession session)
        {
            var serviceRequest = new UserCategory
            {
                UserId = session.UserId.ToString(),
                UserCategoryTypeId = request.Data.CategoryId,
                InvertCatSerch = request.Data.InvertCategorySearch,
                PageIndex = request.PageIndex,
                PageSize = request.PageSize + 1
            };

            var data = await Task.Factory.StartNew(() => Client.UserService.getUserFriendsInCategory(serviceRequest, session.GetSession())).ConfigureAwait(false);
            var result = new PaginatedResponse<IEnumerable<FriendsInCategoryResponse>>
            {
                Page = data.Select(x => new FriendsInCategoryResponse
                {
                    UserId = x.UserId,
                    UserName = x.UserName,
                    Image = x.Picture,
                    FirstName = x.FirstName,
                    LastName = x.LastName,
                    Title = x.Title,
                    UserTypeId = (SystemUserType)x.UserTypeId,
                    Email = x.Email
                }).Take(request.PageSize),
                HasNextPage = data.Count > request.PageSize
            };

            return result;
        }
 public async Task<StatusData<byte?>> InsertCategory(CategoryAddRequest request, SystemSession session)
 {
     var userCategory = new UserCategory { UserId = session.UserId.ToString(), Name = request.Name, Description = request.Description };
     var result = new StatusData<byte?>();
     var friends = request.Friends != null && request.Friends.Any() ? String.Join(",", request.Friends) : null;
     var serviceResponse = await Task.Factory.StartNew(() => Client.UserService.createNewCategory(userCategory, friends, session.GetSession())).ConfigureAwait(false);
     result.Data = (byte?)serviceResponse.UserCategoryTypeId;
     result.Message = serviceResponse.DbStatusMsg;
     result.Status = (SystemDbStatus)serviceResponse.DbStatusCode;
     result.SubStatus = serviceResponse.DbSubStatusCode;
     return result;
 }
 public async Task<StatusData<string>> UpsertCategoryFriends(CategoryFriends request, SystemDbStatus mode, SystemSession session)
 {
     var userCategory = new UserCategory { UserId = session.UserId.ToString(), UserCategoryTypeId = request.CategoryId };
     var friends = request.Friends != null && request.Friends.Any() ? String.Join(",", request.Friends) : null;
     var result = (mode == SystemDbStatus.Inserted
                 ? await
                     Task.Factory.StartNew(
                         () => Client.UserService.insertInCategory(userCategory, friends, session.GetSession())).ConfigureAwait(false)
                 : await
                     Task.Factory.StartNew(
                         () => Client.UserService.removeFromCategory(userCategory, friends, session.GetSession())).ConfigureAwait(false));
     return result.GetStatusData<string>();
 }
        public async Task<StatusData<string>> CategoryFriendsCopy(CopyCategory request, SystemSession session)
        {
            var userCategory = new UserCategory { UserId = session.UserId.ToString() };
            var friends = string.Join(",", request.Friends);
            var result = new StatusData<string>();
            var isOperationSuccessful = true;
            foreach (var categoryId in request.TargetCategories)
            {
                userCategory.UserCategoryTypeId = categoryId;
                var serviceResponse = await Task.Factory.StartNew(() => Client.UserService.insertInCategory(userCategory, friends, session.GetSession())).ConfigureAwait(false);
                isOperationSuccessful &= ((SystemDbStatus)serviceResponse.DbStatusCode).IsOperationSuccessful();
            }
            if (request.RemoveFromSource)
            {
                userCategory.UserCategoryTypeId = request.CategoryId;
                var serviceResponse = await Task.Factory.StartNew(() => Client.UserService.removeFromCategory(userCategory, friends, session.GetSession())).ConfigureAwait(false);
                isOperationSuccessful &= ((SystemDbStatus)serviceResponse.DbStatusCode).IsOperationSuccessful();
            }

            result.Status = isOperationSuccessful ? SystemDbStatus.Inserted : SystemDbStatus.Duplicate;
            return result;
        }
Exemplo n.º 5
0
 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) {
           UserCatagory = new UserCategory();
           UserCatagory.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Session = new Session();
           Session.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
Exemplo n.º 6
0
 public void send_editCategoryMeta(UserCategory userCategory, Session session)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("editCategoryMeta", TMessageType.Call, seqid_));
   editCategoryMeta_args args = new editCategoryMeta_args();
   args.UserCategory = userCategory;
   args.Session = session;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
 public async Task<StatusData<string>> UpdateCategory(CategoryUpdateRequest request, SystemSession session)
 {
     var userCategory = new UserCategory { UserId = session.UserId.ToString(), UserCategoryTypeId = request.CategoryId, Name = request.Name, Description = request.Description };
     var result = (await Task.Factory.StartNew(() => Client.UserService.editCategoryMeta(userCategory, session.GetSession())).ConfigureAwait(false)).GetStatusData<string>();
     return result;
 }
Exemplo n.º 8
0
        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)
                    {
                        UserId = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.String)
                    {
                        Email = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.String)
                    {
                        UserName = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.String)
                    {
                        Password = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 5:
                    if (field.Type == TType.String)
                    {
                        LastActivityDate = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 6:
                    if (field.Type == TType.String)
                    {
                        PrimaryContactNumber = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 7:
                    if (field.Type == TType.Bool)
                    {
                        IsApproved = iprot.ReadBool();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 8:
                    if (field.Type == TType.Bool)
                    {
                        IsLockedOut = iprot.ReadBool();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 9:
                    if (field.Type == TType.Bool)
                    {
                        IsActivated = iprot.ReadBool();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 10:
                    if (field.Type == TType.String)
                    {
                        CreateDate = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 11:
                    if (field.Type == TType.String)
                    {
                        LastLoginDate = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 12:
                    if (field.Type == TType.String)
                    {
                        LastPasswordChangedDate = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 13:
                    if (field.Type == TType.String)
                    {
                        LastLockoutDate = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 14:
                    if (field.Type == TType.I32)
                    {
                        FailedPasswordAttemptCount = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 15:
                    if (field.Type == TType.Bool)
                    {
                        IsFirstLogin = iprot.ReadBool();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 16:
                    if (field.Type == TType.String)
                    {
                        CTag = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 17:
                    if (field.Type == TType.Bool)
                    {
                        HasDeactivated = iprot.ReadBool();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 18:
                    if (field.Type == TType.I32)
                    {
                        ChatStatus = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 19:
                    if (field.Type == TType.Struct)
                    {
                        UserInfo = new UserInfo();
                        UserInfo.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 20:
                    if (field.Type == TType.Struct)
                    {
                        UserInfoPerson = new UserInfoPerson();
                        UserInfoPerson.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 21:
                    if (field.Type == TType.Struct)
                    {
                        UserCategory = new UserCategory();
                        UserCategory.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 22:
                    if (field.Type == TType.Struct)
                    {
                        Contact = new Contact();
                        Contact.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 23:
                    if (field.Type == TType.Struct)
                    {
                        Status = new Status();
                        Status.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 24:
                    if (field.Type == TType.Struct)
                    {
                        Session = new Session();
                        Session.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 25:
                    if (field.Type == TType.String)
                    {
                        DeviceId = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 26:
                    if (field.Type == TType.String)
                    {
                        UserGUID = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 27:
                    if (field.Type == TType.String)
                    {
                        MobileResetCode = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 28:
                    if (field.Type == TType.Struct)
                    {
                        UserInforCompany = new UserInfoCompany();
                        UserInforCompany.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 29:
                    if (field.Type == TType.Bool)
                    {
                        IsMobile = iprot.ReadBool();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 30:
                    if (field.Type == TType.I32)
                    {
                        DbStatusCode = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 31:
                    if (field.Type == TType.String)
                    {
                        UsernameEmail = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 32:
                    if (field.Type == TType.String)
                    {
                        DeviceType = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 33:
                    if (field.Type == TType.String)
                    {
                        PushCode = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 34:
                    if (field.Type == TType.I32)
                    {
                        DbSubStatusCode = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 35:
                    if (field.Type == TType.String)
                    {
                        DbStatusMsg = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
Exemplo n.º 9
0
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 0:
         if (field.Type == TType.List) {
           {
             Success = new List<UserCategory>();
             TList _list168 = iprot.ReadListBegin();
             for( int _i169 = 0; _i169 < _list168.Count; ++_i169)
             {
               UserCategory _elem170;
               _elem170 = new UserCategory();
               _elem170.Read(iprot);
               Success.Add(_elem170);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 1:
         if (field.Type == TType.Struct) {
           Ex = new UserException();
           Ex.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Se = new SessionException();
           Se.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
Exemplo n.º 10
0
 public IAsyncResult send_getUserFriendsInCategory(AsyncCallback callback, object state, UserCategory userCatagory, Session session)
Exemplo n.º 11
0
 public IAsyncResult Begin_deleteCategory(AsyncCallback callback, object state, UserCategory userCategory, Session session)
 {
   return send_deleteCategory(callback, state, userCategory, session);
 }
Exemplo n.º 12
0
 public IAsyncResult send_insertInCategory(AsyncCallback callback, object state, UserCategory userCategory, string friendIDs, Session session)
Exemplo n.º 13
0
      /// <summary>
      /// Inserts the provided list of friends in the provided category without
      /// affecting existing friends in the category
      /// 
      /// @param UserCategory UserID, UserCategoryTypeID
      /// @param Friend       IDs seperated by ','
      /// @return UserCategoryTypeID
      /// @throws UserException (See Error Code list for details)
      /// @throws SessionException (See Error Code list for details)
      /// </summary>
      /// <param name="userCategory"></param>
      /// <param name="friendIDs"></param>
      /// <param name="session"></param>
      public DbStatus insertInCategory(UserCategory userCategory, string friendIDs, Session session)
      {
        #if !SILVERLIGHT
        send_insertInCategory(userCategory, friendIDs, session);
        return recv_insertInCategory();

        #else
        var asyncResult = Begin_insertInCategory(null, null, userCategory, friendIDs, session);
        return End_insertInCategory(asyncResult);

        #endif
      }
Exemplo n.º 14
0
 public IAsyncResult Begin_insertInCategory(AsyncCallback callback, object state, UserCategory userCategory, string friendIDs, Session session)
 {
   return send_insertInCategory(callback, state, userCategory, friendIDs, session);
 }
Exemplo n.º 15
0
 public void send_updateListInCategory(UserCategory userCategory, string friendIDs, Session session)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("updateListInCategory", TMessageType.Call, seqid_));
   updateListInCategory_args args = new updateListInCategory_args();
   args.UserCategory = userCategory;
   args.FriendIDs = friendIDs;
   args.Session = session;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
Exemplo n.º 16
0
      /// <summary>
      /// This method creates a category with given name and description
      /// and optionally inserts any list of friends (if passed) in the
      /// new category
      /// 
      /// @param UserCategory UserID, Name, Description
      /// @param Friend       IDs seperated by ','
      /// @return (1) UserCategoryTypeID if success (2) -1 if failure
      /// @throws UserException (See Error Code list for details)
      /// @throws SessionException (See Error Code list for details)
      /// </summary>
      /// <param name="userCategory"></param>
      /// <param name="friendIDs"></param>
      /// <param name="session"></param>
      public UserCategory createNewCategory(UserCategory userCategory, string friendIDs, Session session)
      {
        #if !SILVERLIGHT
        send_createNewCategory(userCategory, friendIDs, session);
        return recv_createNewCategory();

        #else
        var asyncResult = Begin_createNewCategory(null, null, userCategory, friendIDs, session);
        return End_createNewCategory(asyncResult);

        #endif
      }
Exemplo n.º 17
0
 public IAsyncResult Begin_getUserFriendsInCategory(AsyncCallback callback, object state, UserCategory userCatagory, Session session)
 {
   return send_getUserFriendsInCategory(callback, state, userCatagory, session);
 }
Exemplo n.º 18
0
      public List<UserInfo> getUserFriendsInCategory(UserCategory userCatagory, Session session)
      {
        #if !SILVERLIGHT
        send_getUserFriendsInCategory(userCatagory, session);
        return recv_getUserFriendsInCategory();

        #else
        var asyncResult = Begin_getUserFriendsInCategory(null, null, userCatagory, session);
        return End_getUserFriendsInCategory(asyncResult);

        #endif
      }
Exemplo n.º 19
0
      /// <summary>
      /// Deletes the provided category and removes all friends inside it
      /// 
      /// @param UserCategory UserID, UserCategoryTypeID
      /// @return UserCategoryTypeID
      /// @throws UserException (See Error Code list for details)
      /// @throws SessionException (See Error Code list for details)
      /// </summary>
      /// <param name="userCategory"></param>
      /// <param name="session"></param>
      public DbStatus deleteCategory(UserCategory userCategory, Session session)
      {
        #if !SILVERLIGHT
        send_deleteCategory(userCategory, session);
        return recv_deleteCategory();

        #else
        var asyncResult = Begin_deleteCategory(null, null, userCategory, session);
        return End_deleteCategory(asyncResult);

        #endif
      }
Exemplo n.º 20
0
 public void send_getUserFriendsInCategory(UserCategory userCatagory, Session session)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("getUserFriendsInCategory", TMessageType.Call, seqid_));
   getUserFriendsInCategory_args args = new getUserFriendsInCategory_args();
   args.UserCatagory = userCatagory;
   args.Session = session;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
Exemplo n.º 21
0
 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) {
           UserId = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Email = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.String) {
           UserName = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.String) {
           Password = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.String) {
           LastActivityDate = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 6:
         if (field.Type == TType.String) {
           PrimaryContactNumber = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 7:
         if (field.Type == TType.Bool) {
           IsApproved = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 8:
         if (field.Type == TType.Bool) {
           IsLockedOut = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 9:
         if (field.Type == TType.Bool) {
           IsActivated = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 10:
         if (field.Type == TType.String) {
           CreateDate = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 11:
         if (field.Type == TType.String) {
           LastLoginDate = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 12:
         if (field.Type == TType.String) {
           LastPasswordChangedDate = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 13:
         if (field.Type == TType.String) {
           LastLockoutDate = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 14:
         if (field.Type == TType.I32) {
           FailedPasswordAttemptCount = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 15:
         if (field.Type == TType.Bool) {
           IsFirstLogin = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 16:
         if (field.Type == TType.String) {
           CTag = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 17:
         if (field.Type == TType.Bool) {
           HasDeactivated = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 18:
         if (field.Type == TType.I32) {
           ChatStatus = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 19:
         if (field.Type == TType.Struct) {
           UserInfo = new UserInfo();
           UserInfo.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 20:
         if (field.Type == TType.Struct) {
           UserInfoPerson = new UserInfoPerson();
           UserInfoPerson.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 21:
         if (field.Type == TType.Struct) {
           UserCategory = new UserCategory();
           UserCategory.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 22:
         if (field.Type == TType.Struct) {
           Contact = new Contact();
           Contact.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 23:
         if (field.Type == TType.Struct) {
           Status = new Status();
           Status.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 24:
         if (field.Type == TType.Struct) {
           Session = new Session();
           Session.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 25:
         if (field.Type == TType.String) {
           DeviceId = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 26:
         if (field.Type == TType.String) {
           UserGUID = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 27:
         if (field.Type == TType.String) {
           MobileResetCode = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 28:
         if (field.Type == TType.Struct) {
           UserInforCompany = new UserInfoCompany();
           UserInforCompany.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 29:
         if (field.Type == TType.Bool) {
           IsMobile = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 30:
         if (field.Type == TType.I32) {
           DbStatusCode = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 31:
         if (field.Type == TType.String) {
           UsernameEmail = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 32:
         if (field.Type == TType.String) {
           DeviceType = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 33:
         if (field.Type == TType.String) {
           PushCode = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 34:
         if (field.Type == TType.I32) {
           DbSubStatusCode = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 35:
         if (field.Type == TType.String) {
           DbStatusMsg = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
Exemplo n.º 22
0
 public IAsyncResult send_deleteCategory(AsyncCallback callback, object state, UserCategory userCategory, Session session)
Exemplo n.º 23
0
        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.I32)
                    {
                        UserId = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.I32)
                    {
                        FieldId = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.I32)
                    {
                        ContactChatNetworkId = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.I32)
                    {
                        Value = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 5:
                    if (field.Type == TType.I16)
                    {
                        Mode = iprot.ReadI16();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 6:
                    if (field.Type == TType.I64)
                    {
                        ContactCustomId = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 7:
                    if (field.Type == TType.I64)
                    {
                        ContactId = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 8:
                    if (field.Type == TType.String)
                    {
                        EntriesInPage = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 9:
                    if (field.Type == TType.String)
                    {
                        EntryList = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 10:
                    if (field.Type == TType.Bool)
                    {
                        IsDefault = iprot.ReadBool();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 11:
                    if (field.Type == TType.Bool)
                    {
                        IsBasicPrimary = iprot.ReadBool();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 12:
                    if (field.Type == TType.Struct)
                    {
                        UserInfo = new UserInfo();
                        UserInfo.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 13:
                    if (field.Type == TType.Struct)
                    {
                        UserInfoPerson = new UserInfoPerson();
                        UserInfoPerson.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 14:
                    if (field.Type == TType.Struct)
                    {
                        User = new User();
                        User.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 15:
                    if (field.Type == TType.Struct)
                    {
                        UserCategory = new UserCategory();
                        UserCategory.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
 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.I32) {
           UserId = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.I32) {
           FieldId = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.I32) {
           ContactChatNetworkId = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.I32) {
           Value = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.I16) {
           Mode = iprot.ReadI16();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 6:
         if (field.Type == TType.I64) {
           ContactCustomId = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 7:
         if (field.Type == TType.I64) {
           ContactId = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 8:
         if (field.Type == TType.String) {
           EntriesInPage = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 9:
         if (field.Type == TType.String) {
           EntryList = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 10:
         if (field.Type == TType.Bool) {
           IsDefault = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 11:
         if (field.Type == TType.Bool) {
           IsBasicPrimary = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 12:
         if (field.Type == TType.Struct) {
           UserInfo = new UserInfo();
           UserInfo.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 13:
         if (field.Type == TType.Struct) {
           UserInfoPerson = new UserInfoPerson();
           UserInfoPerson.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 14:
         if (field.Type == TType.Struct) {
           User = new User();
           User.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 15:
         if (field.Type == TType.Struct) {
           UserCategory = new UserCategory();
           UserCategory.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
Exemplo n.º 25
0
 public IAsyncResult Begin_editCategoryMeta(AsyncCallback callback, object state, UserCategory userCategory, Session session)
 {
   return send_editCategoryMeta(callback, state, userCategory, session);
 }
Exemplo n.º 26
0
        public override string ToString()
        {
            StringBuilder __sb    = new StringBuilder("User(");
            bool          __first = true;

            if (UserId != null && __isset.userId)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UserId: ");
                __sb.Append(UserId);
            }
            if (Email != null && __isset.email)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Email: ");
                __sb.Append(Email);
            }
            if (UserName != null && __isset.userName)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UserName: "******", ");
                }
                __first = false;
                __sb.Append("Password: "******", ");
                }
                __first = false;
                __sb.Append("LastActivityDate: ");
                __sb.Append(LastActivityDate);
            }
            if (PrimaryContactNumber != null && __isset.primaryContactNumber)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("PrimaryContactNumber: ");
                __sb.Append(PrimaryContactNumber);
            }
            if (__isset.isApproved)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("IsApproved: ");
                __sb.Append(IsApproved);
            }
            if (__isset.isLockedOut)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("IsLockedOut: ");
                __sb.Append(IsLockedOut);
            }
            if (__isset.isActivated)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("IsActivated: ");
                __sb.Append(IsActivated);
            }
            if (CreateDate != null && __isset.createDate)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("CreateDate: ");
                __sb.Append(CreateDate);
            }
            if (LastLoginDate != null && __isset.lastLoginDate)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("LastLoginDate: ");
                __sb.Append(LastLoginDate);
            }
            if (LastPasswordChangedDate != null && __isset.lastPasswordChangedDate)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("LastPasswordChangedDate: ");
                __sb.Append(LastPasswordChangedDate);
            }
            if (LastLockoutDate != null && __isset.lastLockoutDate)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("LastLockoutDate: ");
                __sb.Append(LastLockoutDate);
            }
            if (__isset.failedPasswordAttemptCount)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("FailedPasswordAttemptCount: ");
                __sb.Append(FailedPasswordAttemptCount);
            }
            if (__isset.isFirstLogin)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("IsFirstLogin: "******", ");
                }
                __first = false;
                __sb.Append("CTag: ");
                __sb.Append(CTag);
            }
            if (__isset.hasDeactivated)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("HasDeactivated: ");
                __sb.Append(HasDeactivated);
            }
            if (__isset.chatStatus)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("ChatStatus: ");
                __sb.Append(ChatStatus);
            }
            if (UserInfo != null && __isset.userInfo)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UserInfo: ");
                __sb.Append(UserInfo == null ? "<null>" : UserInfo.ToString());
            }
            if (UserInfoPerson != null && __isset.userInfoPerson)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UserInfoPerson: ");
                __sb.Append(UserInfoPerson == null ? "<null>" : UserInfoPerson.ToString());
            }
            if (UserCategory != null && __isset.userCategory)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UserCategory: ");
                __sb.Append(UserCategory == null ? "<null>" : UserCategory.ToString());
            }
            if (Contact != null && __isset.contact)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Contact: ");
                __sb.Append(Contact == null ? "<null>" : Contact.ToString());
            }
            if (Status != null && __isset.status)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Status: ");
                __sb.Append(Status == null ? "<null>" : Status.ToString());
            }
            if (Session != null && __isset.session)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Session: ");
                __sb.Append(Session == null ? "<null>" : Session.ToString());
            }
            if (DeviceId != null && __isset.deviceId)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("DeviceId: ");
                __sb.Append(DeviceId);
            }
            if (UserGUID != null && __isset.userGUID)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UserGUID: ");
                __sb.Append(UserGUID);
            }
            if (MobileResetCode != null && __isset.mobileResetCode)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("MobileResetCode: ");
                __sb.Append(MobileResetCode);
            }
            if (UserInforCompany != null && __isset.userInforCompany)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UserInforCompany: ");
                __sb.Append(UserInforCompany == null ? "<null>" : UserInforCompany.ToString());
            }
            if (__isset.isMobile)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("IsMobile: ");
                __sb.Append(IsMobile);
            }
            if (__isset.dbStatusCode)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("DbStatusCode: ");
                __sb.Append(DbStatusCode);
            }
            if (UsernameEmail != null && __isset.usernameEmail)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UsernameEmail: ");
                __sb.Append(UsernameEmail);
            }
            if (DeviceType != null && __isset.deviceType)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("DeviceType: ");
                __sb.Append(DeviceType);
            }
            if (PushCode != null && __isset.pushCode)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("PushCode: ");
                __sb.Append(PushCode);
            }
            if (__isset.dbSubStatusCode)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("DbSubStatusCode: ");
                __sb.Append(DbSubStatusCode);
            }
            if (DbStatusMsg != null && __isset.dbStatusMsg)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("DbStatusMsg: ");
                __sb.Append(DbStatusMsg);
            }
            __sb.Append(")");
            return(__sb.ToString());
        }
Exemplo n.º 27
0
      /// <summary>
      /// Updates existing category's meta data only (Name, Description, etc.)
      /// 
      /// @param UserCategory UserID, UserCategoryTypeID, Name , Description
      /// @param Friend       IDs seperated by ','
      /// @return UserCategoryTypeID
      /// @throws UserException (See Error Code list for details)
      /// @throws SessionException (See Error Code list for details)
      /// </summary>
      /// <param name="userCategory"></param>
      /// <param name="session"></param>
      public DbStatus editCategoryMeta(UserCategory userCategory, Session session)
      {
        #if !SILVERLIGHT
        send_editCategoryMeta(userCategory, session);
        return recv_editCategoryMeta();

        #else
        var asyncResult = Begin_editCategoryMeta(null, null, userCategory, session);
        return End_editCategoryMeta(asyncResult);

        #endif
      }
Exemplo n.º 28
0
        public void Write(TProtocol oprot)
        {
            TStruct struc = new TStruct("User");

            oprot.WriteStructBegin(struc);
            TField field = new TField();

            if (UserId != null && __isset.userId)
            {
                field.Name = "userId";
                field.Type = TType.String;
                field.ID   = 1;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(UserId);
                oprot.WriteFieldEnd();
            }
            if (Email != null && __isset.email)
            {
                field.Name = "email";
                field.Type = TType.String;
                field.ID   = 2;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(Email);
                oprot.WriteFieldEnd();
            }
            if (UserName != null && __isset.userName)
            {
                field.Name = "userName";
                field.Type = TType.String;
                field.ID   = 3;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(UserName);
                oprot.WriteFieldEnd();
            }
            if (Password != null && __isset.password)
            {
                field.Name = "password";
                field.Type = TType.String;
                field.ID   = 4;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(Password);
                oprot.WriteFieldEnd();
            }
            if (LastActivityDate != null && __isset.lastActivityDate)
            {
                field.Name = "lastActivityDate";
                field.Type = TType.String;
                field.ID   = 5;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(LastActivityDate);
                oprot.WriteFieldEnd();
            }
            if (PrimaryContactNumber != null && __isset.primaryContactNumber)
            {
                field.Name = "primaryContactNumber";
                field.Type = TType.String;
                field.ID   = 6;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(PrimaryContactNumber);
                oprot.WriteFieldEnd();
            }
            if (__isset.isApproved)
            {
                field.Name = "isApproved";
                field.Type = TType.Bool;
                field.ID   = 7;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(IsApproved);
                oprot.WriteFieldEnd();
            }
            if (__isset.isLockedOut)
            {
                field.Name = "isLockedOut";
                field.Type = TType.Bool;
                field.ID   = 8;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(IsLockedOut);
                oprot.WriteFieldEnd();
            }
            if (__isset.isActivated)
            {
                field.Name = "isActivated";
                field.Type = TType.Bool;
                field.ID   = 9;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(IsActivated);
                oprot.WriteFieldEnd();
            }
            if (CreateDate != null && __isset.createDate)
            {
                field.Name = "createDate";
                field.Type = TType.String;
                field.ID   = 10;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(CreateDate);
                oprot.WriteFieldEnd();
            }
            if (LastLoginDate != null && __isset.lastLoginDate)
            {
                field.Name = "lastLoginDate";
                field.Type = TType.String;
                field.ID   = 11;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(LastLoginDate);
                oprot.WriteFieldEnd();
            }
            if (LastPasswordChangedDate != null && __isset.lastPasswordChangedDate)
            {
                field.Name = "lastPasswordChangedDate";
                field.Type = TType.String;
                field.ID   = 12;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(LastPasswordChangedDate);
                oprot.WriteFieldEnd();
            }
            if (LastLockoutDate != null && __isset.lastLockoutDate)
            {
                field.Name = "lastLockoutDate";
                field.Type = TType.String;
                field.ID   = 13;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(LastLockoutDate);
                oprot.WriteFieldEnd();
            }
            if (__isset.failedPasswordAttemptCount)
            {
                field.Name = "failedPasswordAttemptCount";
                field.Type = TType.I32;
                field.ID   = 14;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(FailedPasswordAttemptCount);
                oprot.WriteFieldEnd();
            }
            if (__isset.isFirstLogin)
            {
                field.Name = "isFirstLogin";
                field.Type = TType.Bool;
                field.ID   = 15;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(IsFirstLogin);
                oprot.WriteFieldEnd();
            }
            if (CTag != null && __isset.cTag)
            {
                field.Name = "cTag";
                field.Type = TType.String;
                field.ID   = 16;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(CTag);
                oprot.WriteFieldEnd();
            }
            if (__isset.hasDeactivated)
            {
                field.Name = "hasDeactivated";
                field.Type = TType.Bool;
                field.ID   = 17;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(HasDeactivated);
                oprot.WriteFieldEnd();
            }
            if (__isset.chatStatus)
            {
                field.Name = "chatStatus";
                field.Type = TType.I32;
                field.ID   = 18;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(ChatStatus);
                oprot.WriteFieldEnd();
            }
            if (UserInfo != null && __isset.userInfo)
            {
                field.Name = "userInfo";
                field.Type = TType.Struct;
                field.ID   = 19;
                oprot.WriteFieldBegin(field);
                UserInfo.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (UserInfoPerson != null && __isset.userInfoPerson)
            {
                field.Name = "userInfoPerson";
                field.Type = TType.Struct;
                field.ID   = 20;
                oprot.WriteFieldBegin(field);
                UserInfoPerson.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (UserCategory != null && __isset.userCategory)
            {
                field.Name = "userCategory";
                field.Type = TType.Struct;
                field.ID   = 21;
                oprot.WriteFieldBegin(field);
                UserCategory.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (Contact != null && __isset.contact)
            {
                field.Name = "contact";
                field.Type = TType.Struct;
                field.ID   = 22;
                oprot.WriteFieldBegin(field);
                Contact.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (Status != null && __isset.status)
            {
                field.Name = "status";
                field.Type = TType.Struct;
                field.ID   = 23;
                oprot.WriteFieldBegin(field);
                Status.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (Session != null && __isset.session)
            {
                field.Name = "session";
                field.Type = TType.Struct;
                field.ID   = 24;
                oprot.WriteFieldBegin(field);
                Session.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (DeviceId != null && __isset.deviceId)
            {
                field.Name = "deviceId";
                field.Type = TType.String;
                field.ID   = 25;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(DeviceId);
                oprot.WriteFieldEnd();
            }
            if (UserGUID != null && __isset.userGUID)
            {
                field.Name = "userGUID";
                field.Type = TType.String;
                field.ID   = 26;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(UserGUID);
                oprot.WriteFieldEnd();
            }
            if (MobileResetCode != null && __isset.mobileResetCode)
            {
                field.Name = "mobileResetCode";
                field.Type = TType.String;
                field.ID   = 27;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(MobileResetCode);
                oprot.WriteFieldEnd();
            }
            if (UserInforCompany != null && __isset.userInforCompany)
            {
                field.Name = "userInforCompany";
                field.Type = TType.Struct;
                field.ID   = 28;
                oprot.WriteFieldBegin(field);
                UserInforCompany.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (__isset.isMobile)
            {
                field.Name = "isMobile";
                field.Type = TType.Bool;
                field.ID   = 29;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(IsMobile);
                oprot.WriteFieldEnd();
            }
            if (__isset.dbStatusCode)
            {
                field.Name = "dbStatusCode";
                field.Type = TType.I32;
                field.ID   = 30;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(DbStatusCode);
                oprot.WriteFieldEnd();
            }
            if (UsernameEmail != null && __isset.usernameEmail)
            {
                field.Name = "usernameEmail";
                field.Type = TType.String;
                field.ID   = 31;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(UsernameEmail);
                oprot.WriteFieldEnd();
            }
            if (DeviceType != null && __isset.deviceType)
            {
                field.Name = "deviceType";
                field.Type = TType.String;
                field.ID   = 32;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(DeviceType);
                oprot.WriteFieldEnd();
            }
            if (PushCode != null && __isset.pushCode)
            {
                field.Name = "pushCode";
                field.Type = TType.String;
                field.ID   = 33;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(PushCode);
                oprot.WriteFieldEnd();
            }
            if (__isset.dbSubStatusCode)
            {
                field.Name = "dbSubStatusCode";
                field.Type = TType.I32;
                field.ID   = 34;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(DbSubStatusCode);
                oprot.WriteFieldEnd();
            }
            if (DbStatusMsg != null && __isset.dbStatusMsg)
            {
                field.Name = "dbStatusMsg";
                field.Type = TType.String;
                field.ID   = 35;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(DbStatusMsg);
                oprot.WriteFieldEnd();
            }
            oprot.WriteFieldStop();
            oprot.WriteStructEnd();
        }
Exemplo n.º 29
0
 public IAsyncResult send_editCategoryMeta(AsyncCallback callback, object state, UserCategory userCategory, Session session)