internal DataCenterService(Authentication authentication, IServiceInvoker serviceInvoker, GroupService groupService, AccountService accountService, BillingService billingService) : base(authentication, serviceInvoker) { this.groupService = groupService; this.accountService = accountService; this.billingService = billingService; }
/// <summary> /// Constructor called after an authentication request has succeeded. The AuthenticationInfo object /// contains properties for Account Alias and BearerToken. /// </summary> /// <param name="authenticationInfo"></param> public Client(Authentication authenticationInfo) { if (authenticationInfo != null) { UserIsAuthenticated = true; Authentication = authenticationInfo; InitializeServices(); } else { UserIsAuthenticated = false; } }
/// <summary> /// Constructor called when the user needs to be authenticated. It sets the userInfo and authenticationInfo fields /// that can then be accessed by the corresponding readonly properties. The UserInfo for User Info display and the AuthenticationInfo /// for subsequent calls to the API after the authentication has succeeded. /// </summary> /// <param name="userName"></param> /// <param name="password"></param> public Client(string userName, string password) { UserIsAuthenticated = false; var userInfo = AuthenticateUser(userName, password).Result; if (userInfo != null) { UserIsAuthenticated = true; Authentication = new Authentication() { AccountAlias = userInfo.AccountAlias, BearerToken = userInfo.BearerToken, LocationAlias = userInfo.LocationAlias, Roles = userInfo.Roles }; InitializeServices(); } else { UserIsAuthenticated = false; } }
public static void Login(TestContext testContext) { client = new Client("mario.mamalis", "MarioTest!"); authentication = client.Authentication; }
internal GroupService(Authentication authentication, IServiceInvoker serviceInvoker, ServerService serverService) : base(authentication, serviceInvoker) { this.serverService = serverService; }
internal ServerService(Authentication authentication, IServiceInvoker serviceInvoker) : base(authentication, serviceInvoker) { }
protected ServiceBase(Authentication authentication, IServiceInvoker serviceInvoker) { this.authentication = authentication; this.serviceInvoker = serviceInvoker; }
internal AccountService(Authentication authentication, IServiceInvoker serviceInvoker) : base(authentication, serviceInvoker) { }
internal QueueService(Authentication authentication, IServiceInvoker serviceInvoker) : base(authentication, serviceInvoker) { this.authentication = authentication; }