private Host GetHost(IDictionary<string, object> variables) { DslFactory dslFactory = new DslFactory(); HostDslEngine dslEngine = new HostDslEngine(); dslEngine.Storage = new FileSystemDslEngineStorageWithExtension("*.host"); dslFactory.Register<Host>(dslEngine); return dslFactory.Create<Host>(@"config\APPTEST\APPTEST.host", variables); }
protected override void InitDslFactory(ILog logger, DslConfigurationSection configSection) { VariablesDslEngine variablesDslEngine = new VariablesDslEngine(); variablesDslEngine.Storage = new BooFileSystemDslEngineStorage { FileNameFormat = "*.var" }; this.dslFactory.Register<GlobalVariables>(variablesDslEngine); logger.Trace(x => x("VariablesDslEngine for *.var files successully registered")); this.dslFactory.Register<Service>(new ServiceDslEngine()); logger.Trace(x => x("ServiceDslEngine for *.boo files successully registered")); HostDslEngine hostDslEngine = new HostDslEngine(); hostDslEngine.Storage = new BooFileSystemDslEngineStorage { FileNameFormat = "*.host" }; this.dslFactory.Register<Host>(hostDslEngine); logger.Trace(x => x("HostDslEngine for *.host files successully registered")); }