private void LoadUserAccounts() { { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "jaosid1201231", RefreshToken = "jaosid1201231", ClientId = "TripThru", ClientSecret = "23noiasdn2123" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "demo12345", RefreshToken = "demo12345", ClientId = "*****@*****.**", ClientSecret = "demo12345" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "luxor23noiasdn2123", RefreshToken = "23noiasdn2123", ClientId = "*****@*****.**", ClientSecret = "23noiasdn2123" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "yellow12ondazazxx21", RefreshToken = "12ondazazxx21", ClientId = "*****@*****.**", ClientSecret = "12ondazazxx21" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "metro12ondazazxx21", RefreshToken = "12ondazazxx21", ClientId = "*****@*****.**", ClientSecret = "12ondazazxx21" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "les12ondazazxx21", RefreshToken = "12ondazazxx21", ClientId = "*****@*****.**", ClientSecret = "12ondazazxx21" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "dubai12ondazazxx21", RefreshToken = "12ondazazxx21", ClientId = "*****@*****.**", ClientSecret = "12ondazazxx21" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "test_tdispatch12ondazazxx21", RefreshToken = "test_tdispatch12ondazazxx21", ClientId = "*****@*****.**", ClientSecret = "test_tdispatch12ondazazxx21" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "webondazazxx21", RefreshToken = "web12ondazazxx21", ClientId = "*****@*****.**", ClientSecret = "web12ondazazxx21" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } }
public Partner(string ID, string name, Gateway tripthru, List<PartnerFleet> PartnerFleets = null, string preferedPartnerId = null) : base(ID, name) { this.tripthru = tripthru; this.preferedPartnerId = preferedPartnerId; this.PartnerFleets = new Dictionary<string, PartnerFleet>(); if (PartnerFleets != null) { foreach (PartnerFleet f in PartnerFleets) AddPartnerFleet(f); } tripsByID = new Dictionary<string, PartnerTrip>(); partnerAccounts.Clear(); clientIdByAccessToken.Clear(); { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "jaosid1201231", RefreshToken = "jaosid1201231", ClientId = "TripThru", ClientSecret = "23noiasdn2123" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } }
private void LoadUserAccounts() { { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "jaosid1201231", RefreshToken = "jaosid1201231", ClientId = "TripThru", ClientSecret = "23noiasdn2123" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "demo12345", RefreshToken = "demo12345", ClientId = "*****@*****.**", ClientSecret = "demo12345" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "luxor23noiasdn2123", RefreshToken = "23noiasdn2123", ClientId = "*****@*****.**", ClientSecret = "23noiasdn2123" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "yellow12ondazazxx21", RefreshToken = "12ondazazxx21", ClientId = "*****@*****.**", ClientSecret = "12ondazazxx21" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "metro12ondazazxx21", RefreshToken = "12ondazazxx21", ClientId = "*****@*****.**", ClientSecret = "12ondazazxx21" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "les12ondazazxx21", RefreshToken = "12ondazazxx21", ClientId = "*****@*****.**", ClientSecret = "12ondazazxx21" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "dubai12ondazazxx21", RefreshToken = "12ondazazxx21", ClientId = "*****@*****.**", ClientSecret = "12ondazazxx21" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "test_tdispatch12ondazazxx21", RefreshToken = "test_tdispatch12ondazazxx21", ClientId = "*****@*****.**", ClientSecret = "test_tdispatch12ondazazxx21" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } { PartnerAccount partnerAccount = new PartnerAccount { UserName = "******", Password = "******", Email = "*****@*****.**", AccessToken = "webondazazxx21", RefreshToken = "web12ondazazxx21", ClientId = "*****@*****.**", ClientSecret = "web12ondazazxx21" }; partnerAccounts[partnerAccount.ClientId] = partnerAccount; clientIdByAccessToken[partnerAccount.AccessToken] = partnerAccount.ClientId; } var accounts = StorageManager.GetPartnerAccounts(); if (accounts != null) { foreach (PartnerAccount account in accounts) { if (!partnerAccounts.ContainsKey(account.ClientId)) { partnerAccounts[account.ClientId] = account; } if (!clientIdByAccessToken.ContainsKey(account.AccessToken)) { clientIdByAccessToken[account.AccessToken] = account.ClientId; } } } }