I have the following code:
[ServiceContract(Name = "Save{0}")]
public ISave<T> where T : BusinessObject
{
[OperationContract(Name = "Save")]
void Save(T obj);
}
public class SaveCustomer : ISave<Customer>
{
public void Save(Customer obj) { ... }
}
The problem I have is that my WCF app using IIS/WAS does not like the name I gave. It doesn't automatically fill it in. I saw this stackoverflow question, which has answers as to why the names don't automatically format. Instead of waiting for Microsoft to allow for formatted names, I was seeing if I could replace the functionality that gets the name with my own.
I'm just unsure of which class I need to extend (ServiceHost
, ServiceHostFactory
, DataContractSerializer
, etc.), or even what method I have to override to get a more friendly name. Also, since I don't even know what class I have to create, I have no idea where I could tell my app to use it (Global.asax member? svc file? attribute?).