예제 #1
0
        public Startup()
        {
            _lsc = new LifeStyleContainer();
            _lsc.set(LifeStyle.Transient);

            var assemblies = new [] {
                typeof(Startup).Assembly,
                typeof(PhiladelphiaPowered.Domain.Dummy).Assembly,
                typeof(PhiladelphiaPowered.Services.Dummy).Assembly
            };

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

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

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

            Logger.ConfigureImplementation(new ConsoleWritelineLoggerImplementation());
            _baseStartup = new BaseStartup(
                _lsc,
                _ => {},
                assemblies,
                ServerSettings.CreateDefault()
                .With(x => x.CustomStaticResourceDirs = new [] { staticResourcesDir }));
        }