I am working on a WCF application and I need to create "routes" so OperationContracts dynamically based on some dlls.
Here's what it looks like
[ServiceContract]
public interface ImyWebService
{
[OperationContract] //Login to web server
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare,
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
Method = "POST",
UriTemplate = @"/login")]
LoginResponse MyLogin(LoginRequest request);
}
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple, MaxItemsInObjectGraph = int.MaxValue)]
public class WebService : ImyWebService
{
public LoginResponse MyLogin(LoginRequest request)
{
}
}
We can see that MyLogin is statistically defined, but I'd like to add other OperationContract during the runtime.
Is that possible? All the solutions I've found yet don't fit well with my use.