public AzureProjectAgent(ISerializer serializer, ILoggerFactory loggerFactory) { _loggerFactory = loggerFactory; _logger = loggerFactory.GetLoggerFor(GetType()); _configuration = GetConfiguration(serializer); _serializer = serializer; }
private AzureProjectAgentConfiguration GetConfiguration(ISerializer serializer) { var configHandler = new ConfigurationJsonFileHandler(@".\azure_project_agent.json", serializer, _logger); AzureProjectAgentConfiguration config; if (configHandler.IsConfigFileExisting()) { config = configHandler.Load <AzureProjectAgentConfiguration>(); } else { config = new AzureProjectAgentConfiguration(); configHandler.Backup(config); } return(config); }