예제 #1
0
        public Startup()
        {
            _lsc.set(LifeStyle.Transient); //least surprising
            var assemblies = new [] {
                typeof(Startup).Assembly,
                typeof(ControlledByTests.Domain.Dummy).Assembly
            };

            var dllsLoc = Path.GetDirectoryName(typeof(Startup).Assembly.Location);

            Directory.SetCurrentDirectory(dllsLoc); //to make configuration reading from disk working

            _ltFilter = new ConsoleBasedControllerAsLifeTimeFilter();
            var staticResourcesDir = Path.Combine(dllsLoc, "../../..");

            Logger.ConfigureImplementation(new ForwardToServerControllerLoggerImplementation(_ltFilter));
            _baseStartup = new BaseStartup(
                _lsc,
                _ => {},
                assemblies,
                ServerSettings.CreateDefault()
                .With(x => x.CustomStaticResourceDirs = new [] { staticResourcesDir }));
        }
예제 #2
0
 public ForwardToServerControllerLoggerImplementation(ConsoleBasedControllerAsLifeTimeFilter impl)
 {
     _impl = impl;
 }