TypeParameterAdapter.Accepts Method

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

Definition

Determines whether this type parameter accepts the specified type parameter as a valid substitution.
protected virtual bool Accepts(ITypeParameter source)

Parameters

source ITypeParameter
The type parameter to evaluate for substitution compatibility.

Returns

bool
true if this type parameter accepts the specified type parameter; otherwise, false.

Remarks

A type parameter is accepted if it represents the same parameter position in the generic hierarchy, accounting for inheritance chains, method overrides, interface implementations, and type nesting.

This method is used to match type parameters across method overrides, interface implementations, and nested type declarations accessing outer type parameters.