Ejemplo n.º 1
0
        public MauiFactory(IMauiServiceCollection collection)
        {
            _collection = collection ?? throw new ArgumentNullException(nameof(collection));
            _singletons = new ConcurrentDictionary <ServiceDescriptor, object?>();

            // to make things easier, just add the provider
            collection.AddSingleton <IServiceProvider>(this);
        }
 public MauiHandlersServiceProvider(IMauiServiceCollection collection)
     : base(collection, false)
 {
 }
Ejemplo n.º 3
0
 public MauiServiceProvider(IMauiServiceCollection collection, bool constructorInjection)
 {
     _collection           = collection ?? throw new ArgumentNullException(nameof(collection));
     _constructorInjection = constructorInjection;
     _singletons           = new ConcurrentDictionary <ServiceDescriptor, object?>();
 }
Ejemplo n.º 4
0
 internal static IMauiHandlersServiceProvider BuildHandlersServiceProvider(this IMauiServiceCollection serviceCollection)
 => new MauiHandlersServiceProvider(serviceCollection);
Ejemplo n.º 5
0
 internal static IServiceProvider BuildServiceProvider(this IMauiServiceCollection serviceCollection, bool constructorInjection)
 => new MauiServiceProvider(serviceCollection, constructorInjection);
Ejemplo n.º 6
0
 internal static IServiceProvider BuildServiceProvider(this IMauiServiceCollection serviceCollection)
 => new MauiServiceProvider(serviceCollection);
Ejemplo n.º 7
0
 public ImageSourceServiceProvider(IMauiServiceCollection collection, IServiceProvider hostServiceProvider)
     : base(collection, false)
 {
     HostServiceProvider = hostServiceProvider;
 }