public ApplicationContext() { ApplicationBuilder = new ApplicationBuilder(); Instances = new Dictionary <string, object>(); FileSystem = new MockFileSystem(); ScopeHolder = new ScopeHolder(); Application = new ApplicationBuilder() .WithModule <EventHandling>() .WithModule <EdgeHub>() .WithModule <Configuration>() .WithHandler <PrioritizerHandler>() .WithType <Prioritizer>() .WithManualRegistration(builder => builder.RegisterInstance(FileSystem).As <IFileSystem>()) .WithManualRegistration(builder => builder.RegisterInstance(ScopeHolder)) .WithTask <ScopeExposer>() .Build(); }
public ScopeExposer(ILifetimeScope scope, ScopeHolder scopeHolder) { ScopeHolder = scopeHolder; ScopeHolder.Scope = scope; }