Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix .WithParameter argument strictly #123

Merged
merged 1 commit into from
Feb 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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