public static IBindingNamedWithOrOnSyntax <T> InCommandScope <T>(this IBindingInSyntax <T> src, KernelMode mode) { return(mode switch { KernelMode.HangFireJob => src.InBackgroundJobScope(), KernelMode.Web => src.InRequestScope(), _ => throw new ArgumentOutOfRangeException(nameof(mode)) });