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