the normal way in wcf is to define all methods in the service-class.
[ServiceContract]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
public class RestService
{
[WebGet(UriTemplate = "/uriTemplate", ResponseFormat = WebMessageFormat.Json)]
public Stream GetSomething()
{
...
}
}
Is it possible to extract these methodes into classes and put these classes into the r开发者_高级运维oot-service-class?
精彩评论