CompositeTypeAdapter.IsCompilerGeneratedBridgeMethod Method

Namespace
Kampute.DocToolkit.Metadata.Adapters
Assembly
  • Kampute.DocToolkit.dll

Definition

Determines whether an explicit interface implementation is a compiler-generated bridge method.
protected virtual bool IsCompilerGeneratedBridgeMethod(MethodInfo method)

Parameters

method MethodInfo
The reflection information of the method to check.

Returns

bool
true if the method is a compiler-generated bridge method; otherwise, false.

Exceptions

ArgumentNullException
Thrown when method is null.

Remarks

A compiler-generated bridge method is created by the C# compiler to handle explicit interface implementations that involve 'in' parameters. These methods are not part of the original source code and should be excluded from metadata representation.

This method checks for the presence of in parameters and attempts to find a corresponding public method for the explicit interface implementation. If such a method exists, it indicates that the explicit interface method is a compiler-generated bridge method.