public static HostManifest ReadFrom(string fileName, EnvironmentSettings environment) { var parser = new SettingsParser(fileName, environment.Overrides.ToDictionary()); new FileSystem().ReadTextFile(fileName, parser.ParseText); var hostName = Path.GetFileNameWithoutExtension(fileName); var host = new HostManifest(hostName); var settings = parser.Settings; host.RegisterSettings(settings); host.RegisterBottles(parser.References); return host; }
public static HostManifest ReadFrom(string fileName, EnvironmentSettings environment) { var parser = new SettingsParser(fileName, environment.Overrides.ToDictionary()); new FileSystem().ReadTextFile(fileName, parser.ParseText); var hostName = Path.GetFileNameWithoutExtension(fileName); var host = new HostManifest(hostName); var settings = parser.Settings; host.RegisterSettings(settings); host.RegisterBottles(parser.References); return(host); }
public static HostManifest ReadFrom(string fileName) { var parser = new SettingsParser(fileName); try { new FileSystem().ReadTextFile(fileName, parser.ParseText); } catch (Exception ex) { var message = "Failed trying to read " + fileName; throw new ApplicationException(message, ex); } var hostName = Path.GetFileNameWithoutExtension(fileName); var host = new HostManifest(hostName); var settings = parser.Settings; host.RegisterSettings(settings); host.RegisterBottles(parser.References); return host; }
public void SetUp() { theParser = new SettingsParser("some description"); }
public void SetUp() { theDictionary = new Dictionary<string, string>(); theParser = new SettingsParser("some description", theDictionary); }