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