Esempio n. 1
0
        /// <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);
            }
        }
Esempio n. 2
0
        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;
            }
        }
Esempio n. 4
0
 public Domain(CNDSClient client)
 {
     this.Client = client;
     this.Path   = "/Domain";
 }
Esempio n. 5
0
 public CNDSNetworksController()
 {
     CNDSApi = new CNDSClient(CNDSurl);
 }
Esempio n. 6
0
 public CNDSPermissions()
 {
     CNDS = new CNDSClient(System.Configuration.ConfigurationManager.AppSettings["CNDS.URL"]);
 }
Esempio n. 7
0
 public CNDSNetworkRequestTypesTests()
 {
     Logger  = log4net.LogManager.GetLogger(typeof(CNDSNetworkRequestTypesTests));
     CNDSApi = new CNDSClient(CNDSurl);
 }
Esempio n. 8
0
 /// <summary>
 ///
 /// </summary>
 public CNDSSearchController()
 {
     CNDSApi = new CNDSClient(CNDSurl);
 }
Esempio n. 9
0
 public Permissions(CNDSClient client)
 {
     this.Client = client;
     this.Path   = "/Permissions";
 }
Esempio n. 10
0
 /// <summary>
 ///
 /// </summary>
 public CNDSRequestTypesController()
 {
     CNDSApi = new CNDSClient(CNDSurl);
 }
Esempio n. 11
0
 public DataSources(CNDSClient client)
 {
     this.Client = client;
     this.Path   = "/DataSources";
 }
Esempio n. 12
0
 public CNDSEntityUpdater(Guid networkID, string url)
 {
     NetworkID = networkID;
     CNDS      = new CNDSClient(url);
 }
Esempio n. 13
0
 public Networks(CNDSClient client)
 {
     this.Client = client;
     this.Path   = "/Networks";
 }
Esempio n. 14
0
 public Users(CNDSClient client)
 {
     this.Client = client;
     this.Path   = "/Users";
 }
Esempio n. 15
0
 public Organizations(CNDSClient client)
 {
     this.Client = client;
     this.Path   = "/Organizations";
 }
Esempio n. 16
0
 public QlikData(CNDSClient client)
 {
     this.Client = client;
     this.Path   = "/QlikData";
 }
Esempio n. 17
0
 public RequestTypeMapping(CNDSClient client)
 {
     this.Client = client;
     this.Path   = "/RequestTypeMapping";
 }
Esempio n. 18
0
 public Requests(CNDSClient client)
 {
     this.Client = client;
     this.Path   = "/Requests";
 }
Esempio n. 19
0
 public SecurityGroupUsers(CNDSClient client)
 {
     this.Client = client;
     this.Path   = "/SecurityGroupUsers";
 }