What's the most portable way to make a Silverlight & Regular .NET REST client

前端 未结 5 817
臣服心动
臣服心动 2021-02-10 04:42

I\'m trying to get a Server application to expose some status information using WCF. In particular I\'m after using WCF services with RESTful \"API\". I\'m hitting somewhat of a

5条回答
  •  生来不讨喜
    2021-02-10 05:05

    I almost hate to suggest it but would you feel comfortable with reimplementing the WebChannelFactory class?

    From a cursory glance through the Silverlight API it looks like you won't get much help from Microsoft out of the box. You'd need to reimplement a channel class and a factory for it.

    Perhaps another way to create the channel and to isolate yourself from the platform-specific code is to create a custom implementation of it? Specifically what I mean is, you create yet another factory class, and the factory class either calls to the WebChannelFactory when it's available, or goes through the hoops of setting it up for you.

    Sorry I don't have a more in-depth suggestion. :)

提交回复
热议问题