public Archivist(IFileProvider fileProvider, ILogMachine logMachine) { _fileProvider = fileProvider; _logger = logMachine; //this will get the folder from which the code is executed. //our code should use that path and search inside if the needed folders exists. var current = AssemblyLocator.GetAssemblyLocation(); _logger.Log($"Archivist looking inside {current} for required folders..."); var directories = Directory.GetDirectories(current); Directory.CreateDirectory(Path.Combine(current, "CharacterSheets")); _logger.Log($"Archivist created Character Sheet folder"); sheetPath = Path.GetFullPath(Path.Combine(current, "CharacterSheets")); var archiveFolder = directories.FirstOrDefault(x => x == "Archives"); Directory.CreateDirectory(Path.Combine(current, "Archives")); _logger.Log($"Archivist created Archives folder"); archivePath = Path.GetFullPath(Path.Combine(current, "Archives")); _logger.Log($"Characters will be saved in {sheetPath} and archived in {archivePath} ."); }
public Startup(IConfiguration configuration, IHostingEnvironment env) { _hostingEnvironment = env; Configuration = configuration; _logMachine = new LogMachine(); }
public CharacterService(IRepository repo, ILogMachine logmachine) { //_repositories = repositories; _repo = repo; _logger = logmachine; }
public GameController(ILogMachine logger, IGameService service) { _logger = logger; _service = service; }
public Startup(IConfiguration configuration, IHostingEnvironment env) { _hostingEnvironment = env; Configuration = configuration; _logMachine = new LogMachine(env.ContentRootFileProvider); }
public CharacterController(ICharacterService service, ILogMachine logMachine) { _logger = logMachine; _service = service; }
public Repository(ICharacterFactory factory, IArchivist archivist, ILogMachine logMachine) { _factory = factory; _archivist = archivist; _logger = logMachine; }