开发者

WCF: Extract service-methods into classes

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜