コード例 #1
0
        public void AddAccount(int index, CTwitterAccountInformation accountInformation)
        {
            if (!accountInformation.TokenInfo.Secured)
            {
                EncryptAccessTokens(accountInformation);
            }

            AccountInformations.Insert(index, accountInformation);
        }
コード例 #2
0
        public int GetAccountIndex(long accountId)
        {
            int index = -1;

            AccountInformations.ForEach(i => {
                if (i.AccountID == accountId)
                {
                    index = AccountInformations.IndexOf(i);
                }
            });

            return(index);
        }
コード例 #3
0
        public CTwitterAccountInformation FindAccountById(long accountId)
        {
            CTwitterAccountInformation item = null;

            AccountInformations.ForEach(i => {
                if (i.AccountID == accountId)
                {
                    item = i;
                }
            });

            return(item);
        }
コード例 #4
0
 public void RemoveAccount(CTwitterAccountInformation accountInformation)
 => AccountInformations.Remove(accountInformation);
コード例 #5
0
 public void RemoveAccount(long accountId)
 => AccountInformations.Remove(FindAccountById(accountId));
コード例 #6
0
 public int GetAccountIndex(CTwitterAccountInformation accountInformation)
 => AccountInformations.IndexOf(accountInformation);