You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To prevent polluting the default Simple Injector API, the Container class overrides ToString, GetHashCode, Equals, and GetType and marks them with the [EditorBrowsable(EditorBrowsableState.Never)] attribute. This prevents users from seeing these methods in their IntelliSense list, while they are hardly ever useful when using the Container type. This practice has been in place for many years and works very well.
This practice, however, is useful for most types provides by Simple Injector, and might even be useful in Simple Injector's integration libraries.
For that reason, it would be good to introduce a common base class, e.g. ApiObject that implements the hiding of these four methods. This allows other object to inherit from that base class and prevents them from having to implement these overrides themselves.
The text was updated successfully, but these errors were encountered:
To prevent polluting the default Simple Injector API, the
Container
class overridesToString
,GetHashCode
,Equals
, andGetType
and marks them with the[EditorBrowsable(EditorBrowsableState.Never)]
attribute. This prevents users from seeing these methods in their IntelliSense list, while they are hardly ever useful when using theContainer
type. This practice has been in place for many years and works very well.This practice, however, is useful for most types provides by Simple Injector, and might even be useful in Simple Injector's integration libraries.
For that reason, it would be good to introduce a common base class, e.g.
ApiObject
that implements the hiding of these four methods. This allows other object to inherit from that base class and prevents them from having to implement these overrides themselves.The text was updated successfully, but these errors were encountered: