IWsJelasticGetJelasticAccounts Method |
Namespace: Aruba.Cloud.WsJelastic
[OperationContractAttribute] WsResult<List<JelasticAccount>> GetJelasticAccounts()
public ArubaWsJelastic.JelasticAccount[] GetJelasticAccounts() { using (var client = this.WsJelasticClient) { var result = client.GetJelasticAccounts(); //result.Success is true on Success, false on failure if (result.Success) return result.Value; else { this.LogError("GetJelasticAccounts", result); throw new CodedException(this.GetErrorCode(result.ResultCode), result.ResultMessage); } } } //the definition of WsJelasticClient: private WsJelasticClient WsJelasticClient { get { var client = Wrappers.WsJelasticClientFactory.CreateClientWithBehavior(); //this credentials will specify wich list of account will be retreived: client.ClientCredentials.UserName.UserName = this.AuthCredentials.UserName; client.ClientCredentials.UserName.Password = this.AuthCredentials.Password; return client; } }