When type parameter of Type.GetInterfaceMap method is represented by:
Open generic constructed type - method throws ArgumentException "interface not found" which is not mentioned in the docs
- Closed generic constructed type - method returns
InterfaceMapping with InterfaceType property equal to the specified type parameter, but not the actual version of implemented generic interface. Generic parameters in the returned type correspond to the specified type parameter, but not to the actual implemented interface type. So the following remark from the docs is incorrect:
If the current Type represents a constructed generic type, type parameters are replaced by the appropriate type arguments in the elements of the InterfaceMapping returned by this method.
dotnet core 2.1
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
When type parameter of
Type.GetInterfaceMapmethod is represented by:Open generic constructed type - method throwsArgumentException"interface not found"which is not mentioned in the docsInterfaceMappingwithInterfaceTypeproperty equal to the specifiedtypeparameter, but not the actual version of implemented generic interface. Generic parameters in the returned type correspond to the specifiedtypeparameter, but not to the actual implemented interface type. So the following remark from the docs is incorrect:Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.