How can I control the name of a generic WCF Message Contract

Viewed 1371

I'm generating a WCF service using the message contract model.

I have created a generic request message contract like so:

[MessageContract]
public Request<T>
{
    [MessageBodyMember]
    public T Details { get; set; }
}

I'm used to using [DataContract(Name="Contract{0}")] to produce readable names for generic data contracts, but this approach does not seem to work for me using message contracts.

Is there a way to achieve the same behaviour using the message contract model?

2 Answers
Related