Esempio n. 1
0
        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 <IdentityMapperHandler>()
                          .WithType <TimeSeriesMapper>()
                          .WithManualRegistration(builder => builder.RegisterInstance(FileSystem).As <IFileSystem>())
                          .WithManualRegistration(builder => builder.RegisterInstance(ScopeHolder))
                          .WithTask <ScopeExposer>()
                          .Build();
        }
Esempio n. 2
0
 public ScopeExposer(ILifetimeScope scope, ScopeHolder scopeHolder)
 {
     ScopeHolder       = scopeHolder;
     ScopeHolder.Scope = scope;
 }