Abstract base type for IMaterializationInterceptor, possibly other interceptor interfaces #34764
Labels
closed-no-further-action
The issue is closed and no further action is planned.
customer-reported
type-enhancement
The docs for interceptor interfaces suggest extending their abstract base types instead of directly implementing the interface.
IMaterializationInterceptor
is missing a corresponding abstract base type. Some interfaces, likeISingletonInterceptor
, have no abstract base type because they have no methods. Others, likeIIdentityResolutionInterceptor
, have multiple abstract base types. I thinkMaterializationInterceptor
is the only one missing, but please check that.Why this matters
#27625 added default method implementations for all interceptor interface methods. Interfaces with default method implementations do not play nicely with Visual Studio. There is no suggestion to implement the interface because you don't have to. There is no "generate override" refactoring because your implementation is not an override. You have to manually write the correct method signatures or copy-paste them from the docs or decompiled definition. When extending an abstract base class, you can use the "generate override" refactoring.
The text was updated successfully, but these errors were encountered: