public static void AutoRegistrationSkipCustomRegistration(this ContainerBuilder builder, Type type)
{
var attributes = type
.GetCustomAttributes(typeof(IAutofacRegistrationAttribute), false)
.OfType<IAutofacRegistrationAttribute>()
.ToArray();
if (attributes.Any() == false) return;
if (type.IsGenericType)
RegisterGenericType(builder, type, attributes);
else
RegisterType(builder, type, attributes);
}