/// <summary> /// Gets a collection of CNDSEntityIdentifiers which link the CNDS entity ID with the specified PMN ID's that have been registered with CNDS. /// </summary> /// <param name="ids">The collection of PMN entity ID's to get the reciprocal CNDS entity ID's.</param> /// <remarks>Note: The collection returned from CNDS will only contain registered entities.</remarks> /// <returns></returns> public static async Task <IEnumerable <CNDSEntityIdentifier> > GetCNDSEntityIdentifiers(IEnumerable <Guid> ids) { using (var api = new CNDSClient(System.Configuration.ConfigurationManager.AppSettings["CNDS.URL"])) { HttpResponseMessage responseMessage = await api.Networks.LookupEntities(NetworkID, ids); string json = await responseMessage.GetMessage(); var response = JsonConvert.DeserializeObject <Lpp.Utilities.BaseResponse <CNDSEntityIdentifier> >(json); return(response.results); } }
async Task GetDocumentContent(Guid documentID) { using (var db = new DataContext()) using (var cndsAPI = new Lpp.CNDS.ApiClient.CNDSClient(CNDSurl)) { using (var docStream = new Data.Documents.DocumentStream(db, documentID)) { var httpResponse = await cndsAPI.Requests.ReadDocument(documentID); await httpResponse.Content.CopyToAsync(docStream); await docStream.FlushAsync(); } } }
private bool disposedValue = false; // To detect redundant calls protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { if (_client != null) { _client.Dispose(); _client = null; } } // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below. // TODO: set large fields to null. disposedValue = true; } }
public Domain(CNDSClient client) { this.Client = client; this.Path = "/Domain"; }
public CNDSNetworksController() { CNDSApi = new CNDSClient(CNDSurl); }
public CNDSPermissions() { CNDS = new CNDSClient(System.Configuration.ConfigurationManager.AppSettings["CNDS.URL"]); }
public CNDSNetworkRequestTypesTests() { Logger = log4net.LogManager.GetLogger(typeof(CNDSNetworkRequestTypesTests)); CNDSApi = new CNDSClient(CNDSurl); }
/// <summary> /// /// </summary> public CNDSSearchController() { CNDSApi = new CNDSClient(CNDSurl); }
public Permissions(CNDSClient client) { this.Client = client; this.Path = "/Permissions"; }
/// <summary> /// /// </summary> public CNDSRequestTypesController() { CNDSApi = new CNDSClient(CNDSurl); }
public DataSources(CNDSClient client) { this.Client = client; this.Path = "/DataSources"; }
public CNDSEntityUpdater(Guid networkID, string url) { NetworkID = networkID; CNDS = new CNDSClient(url); }
public Networks(CNDSClient client) { this.Client = client; this.Path = "/Networks"; }
public Users(CNDSClient client) { this.Client = client; this.Path = "/Users"; }
public Organizations(CNDSClient client) { this.Client = client; this.Path = "/Organizations"; }
public QlikData(CNDSClient client) { this.Client = client; this.Path = "/QlikData"; }
public RequestTypeMapping(CNDSClient client) { this.Client = client; this.Path = "/RequestTypeMapping"; }
public Requests(CNDSClient client) { this.Client = client; this.Path = "/Requests"; }
public SecurityGroupUsers(CNDSClient client) { this.Client = client; this.Path = "/SecurityGroupUsers"; }