Created
March 2, 2021 00:56
-
-
Save felipebaltazar/19ed80de993361bcf80d94e539837916 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Notifications | |
{ | |
public partial class MyStartup : ShinyStartup | |
{ | |
public static IContainer? Container { get; private set; } | |
public override void ConfigureServices(IServiceCollection services, IPlatform platform) | |
{ | |
services.UseFirebaseMessaging<PushDelegate>(); | |
} | |
public override IServiceProvider CreateServiceProvider(IServiceCollection services) | |
{ | |
var container = new Container(Rules | |
.Default | |
.WithConcreteTypeDynamicRegistrations(reuse: Reuse.Transient) | |
.With(Made.Of(FactoryMethod.ConstructorWithResolvableArguments)) | |
.WithFuncAndLazyWithoutRegistration() | |
.WithTrackingDisposableTransients() | |
.WithoutFastExpressionCompiler() | |
.WithFactorySelector(Rules.SelectLastRegisteredFactory()) | |
); | |
DryIocAdapter.Populate(container, services); | |
Container = container; | |
return container.GetServiceProvider(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment