public AzureProvisioningAgent(AzureHubConfiguration azureHubConfiguration, ILoggerFactory loggerFactory) { _loggerFactory = loggerFactory; _logger = loggerFactory.GetLoggerFor(GetType()); _azureHubConfiguration = azureHubConfiguration; }
public AzureCommunicationAgentImpl(ISerializer serializer, ILoggerFactory loggerFactory) { _serializer = serializer; _loggerFactory = loggerFactory; _logger = loggerFactory.GetLoggerFor(GetType()); _hubConfiguration = GetConfiguration(serializer, _logger); }
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); }