diff --git a/VContainer/Assets/VContainer/Runtime/ContainerBuilderExtensions.cs b/VContainer/Assets/VContainer/Runtime/ContainerBuilderExtensions.cs index b5bd73d6..9e9d0ed8 100644 --- a/VContainer/Assets/VContainer/Runtime/ContainerBuilderExtensions.cs +++ b/VContainer/Assets/VContainer/Runtime/ContainerBuilderExtensions.cs @@ -16,6 +16,15 @@ public static RegistrationBuilder Register( ? new OpenGenericRegistrationBuilder(type, lifetime) : new RegistrationBuilder(type, lifetime)); + public static RegistrationBuilder Register( + this IContainerBuilder builder, + Type interfaceType, + Type implementationType, + Lifetime lifetime) + { + return builder.Register(implementationType, lifetime).As(interfaceType); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static RegistrationBuilder Register( this IContainerBuilder builder,