Say I have some code which consumes a class called Subject
, which implements ISubject
.
Would there be any concerns if I were to build a ProxySubject
, which inherits Subject
?
I like this style because it makes it so simple to wrap the real subject: ProxySubject
inherits Subject
and overrides the required fields (mostly relying upon ThisBase.ThatOverridenProperty
). If the targeted fields are not virtual (not overridable), then you can always re-implement ISubject
directly from ProxySubject
.
I did not find any suggestions for doing so; which makes me wonder it might actually not be such a good idea?