I want to pass a Generic object to the client, where a wrapper will take care of decoding the object. I know that WCF is not built for such a task.
I currently have the following type:
[DataContract]
public class GenericData
{
[DataMember(Order = 0)]
public object Args { get; set; }
[DataMember(Order = 0)]
public string EventName { get; set; }
}
Where args can be of any type.
I know this is asking for a lot out of the serializer, but I want to know if there is something out there that could help me. Using KnownType is not an option, as I don't necessarily know the type being passed in at runtime.
I looked around and the only solution I can come up with is to pass in a serialized string.