Skip to content

Commit

Permalink
Merge pull request #123 from hadashiA/ku/typed-parameter-arg
Browse files Browse the repository at this point in the history
Fix .WithParameter argument strictly
  • Loading branch information
hadashiA authored Feb 13, 2021
2 parents 3d545a8 + 22e9c0f commit d231380
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

1 comment on commit d231380

@vercel
Copy link

@vercel vercel bot commented on d231380 Feb 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.