Ejemplo n.º 1
0
        public static IServiceCollection AddDefaultFactoryProvider(this IServiceCollection serviceCollection)
        => serviceCollection.AddSingleton <IFactoryMediator, DefaultFactoryMediator>(p =>
        {
            var factoryProvider = new DefaultFactoryMediator();

            factoryProvider.Init();

            return(factoryProvider);
        });
Ejemplo n.º 2
0
        public static IServiceCollection AddDefaultFactoryProvider(this IServiceCollection serviceCollection, Type profileAssemblyMarkerType)
        => serviceCollection.AddSingleton <IFactoryMediator, DefaultFactoryMediator>(p =>
        {
            var factoryProvider = new DefaultFactoryMediator();

            factoryProvider.Init(profileAssemblyMarkerType);

            return(factoryProvider);
        });