コード例 #1
0
        public AzureProvisioningAgent(AzureHubConfiguration azureHubConfiguration, ILoggerFactory loggerFactory)
        {
            _loggerFactory = loggerFactory;
            _logger        = loggerFactory.GetLoggerFor(GetType());

            _azureHubConfiguration = azureHubConfiguration;
        }
コード例 #2
0
        public AzureCommunicationAgentImpl(ISerializer serializer, ILoggerFactory loggerFactory)
        {
            _serializer    = serializer;
            _loggerFactory = loggerFactory;
            _logger        = loggerFactory.GetLoggerFor(GetType());

            _hubConfiguration = GetConfiguration(serializer, _logger);
        }
コード例 #3
0
        private AzureHubConfiguration GetConfiguration(ISerializer serializer, ILogger _logger)
        {
            var configHandler = new ConfigurationJsonFileHandler(@".\azure_communication_agent.json", serializer, _logger);

            if (configHandler.IsConfigFileExisting())
            {
                return(configHandler.Load <AzureHubConfiguration>());
            }
            var config = AzureHubConfiguration.PstConfig(serializer);

            configHandler.Backup(config);
            return(config);
        }