Esempio n. 1
0
        public List <AccountResponse> GetAccount(string Username, string password = null)
        {
            GetAccountRequest req;

            if (!string.IsNullOrWhiteSpace(password))
            {
                req = GetAccountRequest.CreateBuilder()
                      .SetUserName(Username)
                      .SetPassword(password)
                      .SetSearchType(GetAccountRequest.Types.SearchType.ACCOUNTNAME)
                      .Build();
            }
            else
            {
                req = GetAccountRequest.CreateBuilder()
                      .SetUserName(Username)
                      .SetSearchType(GetAccountRequest.Types.SearchType.ACCOUNTNAME)
                      .Build();
            }

            return(GetResponseFromBuilder(req));
        }
Esempio n. 2
0
        public List <AccountResponse> GetAccount(ulong AccountID, string password = null)
        {
            GetAccountRequest req;

            if (!string.IsNullOrWhiteSpace(password))
            {
                req = GetAccountRequest.CreateBuilder()
                      .SetAccountId(Convert.ToUInt32(AccountID))
                      .SetPassword(password)
                      .SetSearchType(GetAccountRequest.Types.SearchType.ACCOUNTID)
                      .Build();
            }
            else
            {
                req = GetAccountRequest.CreateBuilder()
                      .SetAccountId(Convert.ToUInt32(AccountID))
                      .SetSearchType(GetAccountRequest.Types.SearchType.ACCOUNTID)
                      .Build();
            }

            return(GetResponseFromBuilder(req));
        }