Example #1
0
        // IClientPropertyHandler
        public async Task <JObject> GetReportedPropertyAsync()
        {
            var request  = new Message.GetCertificateConfigurationRequest();
            var response = await _systemConfiguratorProxy.SendCommandAsync(request) as Message.GetCertificateConfigurationResponse;

            CertificatesDataContract.ReportedProperties reportedProperties = new CertificatesDataContract.ReportedProperties();

            reportedProperties.Set(CertificatesDataContract.JsonRootCATrustedCertificates_Root, response.configuration.rootCATrustedCertificates_Root);
            reportedProperties.Set(CertificatesDataContract.JsonRootCATrustedCertificates_CA, response.configuration.rootCATrustedCertificates_CA);
            reportedProperties.Set(CertificatesDataContract.JsonRootCATrustedCertificates_TrustedPublisher, response.configuration.rootCATrustedCertificates_TrustedPublisher);
            reportedProperties.Set(CertificatesDataContract.JsonRootCATrustedCertificates_TrustedPeople, response.configuration.rootCATrustedCertificates_TrustedPeople);
            reportedProperties.Set(CertificatesDataContract.JsonCertificateStore_CA_System, response.configuration.certificateStore_CA_System);
            reportedProperties.Set(CertificatesDataContract.JsonCertificateStore_Root_System, response.configuration.certificateStore_Root_System);
            reportedProperties.Set(CertificatesDataContract.JsonCertificateStore_My_User, response.configuration.certificateStore_My_User);
            reportedProperties.Set(CertificatesDataContract.JsonCertificateStore_My_System, response.configuration.certificateStore_My_System);

            return(reportedProperties.ToJsonObject());
        }
        private async Task <Message.GetCertificateConfigurationResponse> GetCertificateConfigurationAsync()
        {
            var request = new Message.GetCertificateConfigurationRequest();

            return(await this._systemConfiguratorProxy.SendCommandAsync(request) as Message.GetCertificateConfigurationResponse);
        }