0

When creating a service reference from a WSDL, all of the proxy classes specifically inherit from object. This makes little to no sense as they would inherit from object anyway, without it being specified. The fact that it is specified makes it impossible to change the base class of the proxy class via a custom partial add-on:

// Generated service reference proxy class.
public partial class Something : object, System.ComponentModel.INotifyPropertyChanged { ... }

// My partial to extend functionality.
public partial class Something : MySomethingBaseClass { ... }

Can't do this because my new partial implementation specifies a different base class than object. So, why is object there at all?!

Josh M.
  • 26,437
  • 24
  • 119
  • 200
  • The question is, why do you want to introduce a class in the inheritance chain that isn't there according to the WSDL? You'll break serialization. Explain why you would want to change it. If you're just curious, the former statement is your answer. :P Related: [How to extend WCF returned class properly?](http://stackoverflow.com/questions/2876714/how-to-extend-wcf-returned-class-properly), [Why does wcf generated proxy derives from object](http://stackoverflow.com/questions/30842278/why-does-wcf-generated-proxy-derives-from-object). – CodeCaster Aug 11 '15 at 22:05
  • Thanks for the links. In this case I have two identical proxy classes from two separate services which I wanted to "union" and add common logic to. I've already set them to share an interface but wanted to do more than that. – Josh M. Aug 11 '15 at 22:14

0 Answers0