So most people would have already figured this out, but I thought I would post up about it anyway. The proxies generated by svcutil.exe in Indigo derive from ProxyBase<T> where T is an interface with a ServiceContract attributed.

One of the things that I like to do is figure out how to build up a proxy from scratch to see what all the critical pieces of the service model are from a client perspective (since normally the generated code includes more than it has to). So in the example below I contstruct an instance of MathProxy which derives from ProxyBase<T>, passing in IMath (service contract/interface) as the type parameter.

The type parameter is used to build an InnerProxy which implements the IMath interface. Then all you have to do is create wrapper methods which call that interface. Also note that I pass the contruction call to the protected ProxyBase(Binding) constructor. You need to specify the binding you are going to use up from to correctly configure the proxy.

IndigoProxyFromScratch

I’m looking forward to posting up more about Indigo (and Avalon) as I start understanding the models that support the abstraction.