diff --git a/VContainer/Assets/VContainer/Runtime/RegistrationBuilder.cs b/VContainer/Assets/VContainer/Runtime/RegistrationBuilder.cs index 46409622..98138717 100644 --- a/VContainer/Assets/VContainer/Runtime/RegistrationBuilder.cs +++ b/VContainer/Assets/VContainer/Runtime/RegistrationBuilder.cs @@ -108,7 +108,7 @@ public RegistrationBuilder WithParameter(Type type, object value) return this; } - public RegistrationBuilder WithParameter(object value) + public RegistrationBuilder WithParameter(TParam value) { return WithParameter(typeof(TParam), value); } diff --git a/VContainer/Assets/VContainer/Runtime/Unity/ContainerBuilderUnityExtensions.cs b/VContainer/Assets/VContainer/Runtime/Unity/ContainerBuilderUnityExtensions.cs index 8c6636e9..7dce1210 100644 --- a/VContainer/Assets/VContainer/Runtime/Unity/ContainerBuilderUnityExtensions.cs +++ b/VContainer/Assets/VContainer/Runtime/Unity/ContainerBuilderUnityExtensions.cs @@ -64,14 +64,12 @@ public static void UseEntryPoints( Lifetime lifetime, Action configuration) { - var entryPoints = new EntryPointsBuilder(builder, lifetime); - configuration(entryPoints); + configuration(new EntryPointsBuilder(builder, lifetime)); } public static void UseComponents(this IContainerBuilder builder, Action configuration) { - var components = new ComponentsBuilder(builder); - configuration(components); + configuration(new ComponentsBuilder(builder)); } public static void UseComponents( @@ -79,8 +77,7 @@ public static void UseComponents( Transform root, Action configuration) { - var components = new ComponentsBuilder(builder, root); - configuration(components); + configuration(new ComponentsBuilder(builder, root)); } public static RegistrationBuilder RegisterEntryPoint(this IContainerBuilder builder, Lifetime lifetime)