public static IUnityContainer GetContainer()
        {
            var container = new UnityContainer();

            container.AddMediator <UnityConfiguration>();

            container.RegisterType <Features.Accounts.IAccountsEventBusMessageHandler, Features.Accounts.AccountsEventBusMessageHandler>();
            container.RegisterType <Features.DigitalAssets.IDigitalAssetsEventBusMessageHandler, Features.DigitalAssets.DigitalAssetsEventBusMessageHandler>();
            container.RegisterType <Features.Features.IFeaturesEventBusMessageHandler, Features.Features.FeaturesEventBusMessageHandler>();
            container.RegisterType <Features.Profiles.IProfilesEventBusMessageHandler, Features.Profiles.ProfilesEventBusMessageHandler>();
            container.RegisterType <Features.Subscriptions.ISubscriptionsEventBusMessageHandler, Features.Subscriptions.SubscriptionsEventBusMessageHandler>();
            container.RegisterType <Features.Tenants.ITenantsEventBusMessageHandler, Features.Tenants.TenantsEventBusMessageHandler>();
            container.RegisterType <Features.Users.IUsersEventBusMessageHandler, Features.Users.UsersEventBusMessageHandler>();

            container.RegisterType <IChangePasswordCommandValidator, ChangePasswordCommandValidator>();

            container.RegisterType <HttpClient>(
                new ContainerControlledLifetimeManager(),
                new InjectionFactory(x => new HttpClient()));

            container.RegisterType <ICache>(
                new ContainerControlledLifetimeManager(),
                new InjectionFactory(x => new RedisCache()));

            container.RegisterInstance(AuthConfiguration.LazyConfig);

            return(container);
        }
        public static IUnityContainer GetContainer()
        {
            var container = new UnityContainer();

            container.AddMediator <UnityConfiguration>();

            container.RegisterType <HttpClient>(
                new ContainerControlledLifetimeManager(),
                new InjectionFactory(x => {
                return(new HttpClient());
            }));

            container.RegisterType <ICache>(
                new ContainerControlledLifetimeManager(),
                new InjectionFactory(x => {
                return(new MemoryCache());
            }));


            container.RegisterType <IDashboardsEventBusMessageHandler, DashboardsEventBusMessageHandler>();
            container.RegisterType <IDashboardTilesEventBusMessageHandler, DashboardTilesEventBusMessageHandler>();
            container.RegisterType <ITilesEventBusMessageHandler, TilesEventBusMessageHandler>();

            container.RegisterType <IAthletesEventBusMessageHandler, AthletesEventBusMessageHandler>();
            container.RegisterType <IBodyPartsEventBusMessageHandler, BodyPartsEventBusMessageHandler>();
            container.RegisterType <ICompletedScheduledExercisesEventBusMessageHandler, CompletedScheduledExercisesEventBusMessageHandler>();
            container.RegisterType <IDaysEventBusMessageHandler, DaysEventBusMessageHandler>();
            container.RegisterType <IExercisesEventBusMessageHandler, ExercisesEventBusMessageHandler>();
            container.RegisterType <IScheduledExercisesEventBusMessageHandler, ScheduledExercisesEventBusMessageHandler>();

            return(container);
        }
Ejemplo n.º 3
0
        public static IUnityContainer GetContainer()
        {
            var container = new UnityContainer();

            container.AddMediator <UnityConfiguration>();
            return(container);
        }
Ejemplo n.º 4
0
        public static IUnityContainer GetContainer()
        {
            var container = new UnityContainer();

            container.AddMediator <UnityConfiguration>();
            container.RegisterInstance(AuthConfiguration.LazyConfig);
            return(container);
        }
Ejemplo n.º 5
0
        public static IUnityContainer GetContainer()
        {
            var container = new UnityContainer();

            container.AddMediator <UnityConfiguration>();

            container.RegisterType <HttpClient>(
                new ContainerControlledLifetimeManager(),
                new InjectionFactory(x => new HttpClient()));

            container.RegisterInstance(AuthConfiguration.LazyConfig);
            container.RegisterInstance(AzureBlobStorageConfiguration.LazyConfig);
            return(container);
        }
 public static IUnityContainer GetContainer()
 {
     if (_container == null)
     {
         _container = new UnityContainer();
         _container.AddMediator <UnityConfiguration>();
         _container.RegisterType <HttpClient>(
             new ContainerControlledLifetimeManager(),
             new InjectionFactory(x => new HttpClient()));
         _container.RegisterInstance(AuthConfiguration.LazyConfig);
         _container.RegisterType <SlackishContext>(new ContainerControlledLifetimeManager());
         _container.RegisterInstance(AuthConfiguration.LazyConfig);
         _container.RegisterInstance(MemoryCache.Current, new ContainerControlledLifetimeManager());
     }
     return(_container);
 }
        public static IUnityContainer GetContainer()
        {
            var container = new UnityContainer();

            container.AddMediator <UnityConfiguration>();

            container.RegisterType <HttpClient>(
                new ContainerControlledLifetimeManager(),
                new InjectionFactory(x => {
                return(new HttpClient());
            }));

            container.RegisterType <ICache>(
                new ContainerControlledLifetimeManager(),
                new InjectionFactory(x => {
                return(new MemoryCache());
            }));


            return(container);
        }
Ejemplo n.º 8
0
        public static IUnityContainer GetContainer()
        {
            var container = new UnityContainer();

            container.AddMediator <UnityConfiguration>();

            container.RegisterType <HttpClient>(
                new ContainerControlledLifetimeManager(),
                new InjectionFactory(x => {
                return(new HttpClient());
            }));

            container.RegisterType <ICache>(
                new ContainerControlledLifetimeManager(),
                new InjectionFactory(x => {
                return(new MemoryCache());
            }));


            container.RegisterType <Features.Notes.INotesEventBusMessageHandler, Features.Notes.NotesEventBusMessageHandler>();
            container.RegisterType <Features.Tags.ITagsEventBusMessageHandler, Features.Tags.TagsEventBusMessageHandler>();
            return(container);
        }