My WCF Webservice uses the new System.AddIn namespace to support addins.
I want to expose the class returned by every add-in to my webservice. I believe lots of people would want to do this!
There are some obstacles;
- The class returned to the host is derived from the abstract view class.
- The webservice contract needs a class, right, an abstract class or interface as parameter or return type is not allowed.
- And the class in question is the host view adapter, which should not be referenced (to keep the independent versioning intact)
- There will be thousands of objects in an hierarchical array so creating a new object of each would impact performance
sounds like you have the wrong idea....
I have to say I am not familiar with the .Addin namespace but I work with soap webservices and am starting to work with WCF bits.
"Web Services" are about passing "Messagaes" not "Objects"
thats #1 to get clear.
for example if I need to work with a "customer" then I have a customer class that is built to be "serialized" by design. that class will have properties that may be marked to exclude them from serialization so that I am only passing what I have to pass to communicates
the "state" of a customer to the other side of the pipe.
the client can then de-serialize the data into a local "customer" object work with it and then send the "flattened out" data back to the server.
*IF* you have to pass an "Object Graph" (thats what you are describing btw) then you want to look at say Remoting and at binary serialization.
but passing an object graph can be a hassle...