My application sometimes wants to process objects it gets from a web service, but sometimes wants to process purely local objects. In either case, the objects implement the same protocol. For example, both locally created and ws created objects have a "title" property that I want to read.
I would like to have a shared definition of this common protocol, and I would like to call the same method names on both kinds of objects. Let's say the objects are called "chunks". If I try to make a Chunk class, abstract class, or interface, or derivations from those, and share a definition (Add Reference) and code to it in both the web service and the local code, I get problems. No matter how I approach it, I seem to end up with "can't implement the interface" type errors on one end or the other.
What's the right way to define this common behavior on each side of my system?