Ejemplo n.º 1
0
        internal static TinyIoCContainer Build(AnyStatusPackage package)
        {
            var container = TinyIoCContainer.Current;

            RegisterCore(container, package);
            RegisterMenuCommands(container);
            RegisterUI(container);
            RegisterItems(container);
            RegisterTemplates(container);
            RegisterHandlers(container);

            return(container);
        }
Ejemplo n.º 2
0
 private static void RegisterCore(TinyIoCContainer container, AnyStatusPackage package)
 {
     container.Register <IPackage>(package);
     container.Register <IInfoBarService, InfoBarService>().AsSingleton();
     container.Register <IServiceProvider>(package);
     container.Register <AnyStatusApp>().AsSingleton();
     container.Register <ISettingsStore, SettingsStore>().AsSingleton();
     container.Register <ILogger, Logger>().AsSingleton();
     container.Register <IJobScheduler, JobScheduler>().AsSingleton();
     container.Register <IScheduledJob, ScheduledJob>().AsMultiInstance();
     container.Register <IUsageReporter, AnalyticsReporter>().AsSingleton();
     container.Register <ICommandRegistry, CommandRegistry>().AsSingleton();
     container.Register <IMediator, Mediator>().AsMultiInstance();
     container.Register <IProcessStarter, ProcessStarter>().AsMultiInstance();
 }