internal static string GetCategoryNameForType()

in src/Google.Cloud.Functions.Testing/LoggerTypeNameHelper.cs [34:42]


        internal static string GetCategoryNameForType(Type type)
        {
            // Annoyingly, we have to use reflection here...
            var method = typeof(LoggerTypeNameHelper).GetMethod(
                nameof(GetCategoryNameForType), 1, BindingFlags.NonPublic | BindingFlags.Static,
                binder: null, Type.EmptyTypes, modifiers: null);
            method = method!.MakeGenericMethod(type);
            return (string?) method!.Invoke(null, null) ?? throw new InvalidOperationException("Method returned null");
        }