سؤال

I got some wcf service. I got also:

[DataContract]
public abstract class BaseClass
{

}

[DataContract]
public class ClassA : BaseClass
{
    [DataMember]
    //some data members
}

[DataContract]
public class ClassB : BaseClass
{
    [DataMember]
    //some data members
}

I got method

[OperationContract]

public void SendData(BaseClass[] data);

So i need to pass Array of ClassA and ClassB to my service. How should i mark my classes to make it visible in service metadata, and overall make that right?

هل كانت مفيدة؟

المحلول

Look into KnownTypeAttribute.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top