Skip to content

Commit

Permalink
Merge pull request #700 from MatthieuG9/patch-1
Browse files Browse the repository at this point in the history
Add an overload method RegisterEntryPoint
  • Loading branch information
hadashiA authored Aug 14, 2024
2 parents 75da356 + 8de6f2c commit e7f2955
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@ public static RegistrationBuilder RegisterEntryPoint<T>(
return builder.Register<T>(lifetime).AsImplementedInterfaces();
}

public static RegistrationBuilder RegisterEntryPoint<TInterface>(
this IContainerBuilder builder,
Func<IObjectResolver, TInterface> implementationConfiguration,
Lifetime lifetime)
{
EntryPointsBuilder.EnsureDispatcherRegistered(builder);
return builder.Register(new FuncRegistrationBuilder(container => implementationConfiguration(container),
typeof(TInterface), lifetime)).AsImplementedInterfaces();
}

public static void RegisterEntryPointExceptionHandler(
this IContainerBuilder builder,
Action<Exception> exceptionHandler)
Expand Down

0 comments on commit e7f2955

Please sign in to comment.