<PackageReference Include="Google.Protobuf" Version="3.35.0" />

Google.Protobuf.Reflection.ReflectionUtil

static class ReflectionUtil
The methods in this class are somewhat evil, and should not be tampered with lightly. Basically they allow the creation of relatively weakly typed delegates from MethodInfos which are more strongly typed. They do this by creating an appropriate strongly typed delegate from the MethodInfo, and then calling that within an anonymous method. Mind-bending stuff (at least to your humble narrator) but the resulting delegates are very fast compared with calling Invoke later on.
namespace Google.Protobuf.Reflection { public abstract class DescriptorBase : IDescriptor { public int Index { get; } public abstract string Name { get; } public string FullName { get; } public FileDescriptor File { get; } public DescriptorDeclaration Declaration { get; } } } namespace Google.Protobuf.Reflection { internal static class ReflectionUtil { public enum SampleEnum { X } public static SampleEnum SampleEnumMethod(); } }