I have this ServiceContract
[OperationContract(IsOneWay=true)]
void ProcessMessage(Message message);
and these objects
[DataContract]
public class Message
{
[DataMember]
public long Id { get; set; }
[DataMember]
public string Body { get; set; }
}
[DataContract]
public class ExtendedMessage : Message
{
[DataMember]
public NameValueCollection AdditionalData { get; set; }
}
Will WCF be able to handle if I pass in the subclass to the service method? Or will it drop all extra properties that aren't on the base class?
ExtendedMessage msg = new ExtendedMessage();
...
ProcessMessage(msg);