For example, could a WCF Service act as a factory for other WCF Services ? E.g.:
[ServiceContract(Namespace = "Foo")]
interface IThing
{
[OperationContract]
void DoSomething();
}
[ServiceContract(Namespace = "Foo")]
interface IMakeThings
{
[OperationContract]
IThing Create(string initializationData);
}
Similarly can an interface take another interface as a parameter ?
[ServiceContract(Namespace = "Foo")]
interface IUseThings
{
[OperationContract]
void UseThing(IThing target);
}
Would this require adjusting known types ?
All the interfaces would be defined up front and known to both the client and the service.
No. When you're going over the web you're not dealing with references like you might in C# so you won't be able to return an object that is not serializable. Even then, only the data that is marked as DataMember will come across.
Yes. You would have to adjust known types, but again, that would be an interface to a DataContract not an OperationContract
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With