I have a service interface that requires different attributes in different situations. In short there are two options:
[DispatchByBodyElementBehavior]
public interface FooPortType
{
[OperationContractAttribute(Action = "", ReplyAction = "*")]
FooResponse GetResponse(FooRequest request);
}
and
public interface FooPortType
{
[OperationContractAttribute(Action = "FooAction", ReplyAction = "*")]
FooResponse GetResponse(FooRequest request);
}
I could distinguish between the two using compiler options, but I was wondering if there is some way to do this at runtime, for example based on an option in the config file.
Thanks.
Update I'm trying to solve this by changing the attributes at runtime, but ran into problems there, as well (followup question). I'll update this question as I find out more.