Skip to content

Commit

Permalink
Fix .WithParameter argument strictly
Browse files Browse the repository at this point in the history
  • Loading branch information
hadashiA committed Feb 13, 2021
1 parent 3d545a8 commit 22e9c0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public RegistrationBuilder WithParameter(Type type, object value)
return this;
}

public RegistrationBuilder WithParameter<TParam>(object value)
public RegistrationBuilder WithParameter<TParam>(TParam value)
{
return WithParameter(typeof(TParam), value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,20 @@ public static void UseEntryPoints(
Lifetime lifetime,
Action<EntryPointsBuilder> configuration)
{
var entryPoints = new EntryPointsBuilder(builder, lifetime);
configuration(entryPoints);
configuration(new EntryPointsBuilder(builder, lifetime));
}

public static void UseComponents(this IContainerBuilder builder, Action<ComponentsBuilder> configuration)
{
var components = new ComponentsBuilder(builder);
configuration(components);
configuration(new ComponentsBuilder(builder));
}

public static void UseComponents(
this IContainerBuilder builder,
Transform root,
Action<ComponentsBuilder> configuration)
{
var components = new ComponentsBuilder(builder, root);
configuration(components);
configuration(new ComponentsBuilder(builder, root));
}

public static RegistrationBuilder RegisterEntryPoint<T>(this IContainerBuilder builder, Lifetime lifetime)
Expand Down

0 comments on commit 22e9c0f

Please sign in to comment.