在哪里可以找到有关WCF Web API的最新文档? [英] Where can I find up-to-date documentation about the WCF Web API?

查看:144
本文介绍了在哪里可以找到有关WCF Web API的最新文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力与WCF一起以我希望其工作的方式进行REST.显然还有很多其他方面.我听说过 WCF Web Api项目,但是在没有太仔细地看着它.可悲的是,现在我正在查看它,我发现文档已经过时了.就像这篇博文提供了一些不错的信息,但是类已更改,参数已更改,简而言之,设计已更改.

I've been strugling with WCF to do REST the way I want it to work. And apparently so has quite a few others. I've heard about the WCF Web Api project, but wrongly dismissed it without looking too closely at it. Sadly, now that I'm looking at it I find that the documentation is rather outdated. Like, this blog post has some nice information, but classes have changed, parameters have changed, in short, design has changed.

因此,我一直在使用一个古老的示例,该示例如何将Json.NET(newtonsoft)插入为序列化程序,但才意识到,在我将其工作之后,它将无法用于我的IErrorHandler.此外,我对如何遇到了问题将字符串从uri模板反序列化为操作Type参数.

So I've been using an old example of how to plug in Json.NET (newtonsoft) as my serializier, only to realize that after I had it working, it wouldn't work for my IErrorHandler. Further I had a problem with how to Deserialize a string from the uri template to an operation Type parameter.

但是,看来我应该能够通过使用媒体格式化程序扩展点和过时的文档中称为Processor<..>的方法来解决这两个问题(大概还有很多我还没有发现的问题),除非我误解了,否则现在是HttpOperationHandler<..>.

It appears however that I should be able to solve these two problems (and presumably many others that I haven't stumbled over yet) by using the media formatter extension point and what's referred to as Processor<..>s in outdated documentation, which is now HttpOperationHandler<..>s unless I've missunderstood.

我的问题是很基本的,假设我已正确实现,我将无法弄清楚如何正确配置IIS托管的应用程序以使用我的操作处理程序.要求提供有关这种基本操作的说明感觉很愚蠢,所以我想问一下在哪里可以找到有关如何进行此类操作的文档? (当然,欢迎提供说明.)

My problem is rather basic, I can't figure out how to correctly configure my IIS-hosted app to use my operation handler, assuming I've implemented it correctly. Since it feels rather dumb to ask for instructions on such a basic thing, I'll rather ask where I can find some documentation on how to do this sort of thing? (Explanations are welcome of course.)

我不知道存在哪些类,或者使用什么参数命名它们的方法.我可以在对象浏览器中看到所有这些内容.我需要用于总体设计的文档和/或隐式描述诸如以下内容的示例:

I'm not after seing which classes exist, or what their methods are named with what parameters. I can see all that in my object browser. I need documentation for the overall design, and/or examples implicitly describing things like:

  • API中的不同类如何组合在一起?
  • 如何从web.config中进行配置?
  • 我宁愿自定义HttpServiceHostFactory吗?
  • 您打算使用什么框架以及如何使用该框架?
  • 我应该如何扩展以达到什么样的目标?
  • 我应该如何配置才能使扩展生效?

推荐答案

由于缺乏答案,我认为文档还没有准备好.

From the lack of answers I assume the documentation quite simply isn't ready.

我当时在Codeplex网站上的文档标签下寻找该文档,并发现了过时的内容.

I was looking for it on the codeplex site under the Documentation tab, and found outdated stuff.

但是,在对Codeplex有所了解之后,我发现好东西在.说实话,在那儿搜索一点东西很有帮助.

However, after familiarizing myself a bit with Codeplex I found out that the good stuff was in this Discussion section. Searching a bit in there helped a lot to be honest.

关于配置文件的配置,我什么都没找到,所以我假设这将被添加为正式发布之前的最后一件事.这意味着我现在将在自定义HttpServiceHostFactory中使用HttpConfiguration.

Concerning config-file configuration, I didn't find anything, so I'm assuming this will be added as the last thing before official release. Meaning I'll use the HttpConfiguration in a custom HttpServiceHostFactory for now.

关于HttpOperationHandler的技巧是双重的:首先,我在操作中抛出了异常,并且尚未实现全局HttpErrorHandler. (Doh!)其次,我不知道HttpOperationHandler的参数名称是<..>.OnHandle是否必须与操作参数的名称相匹配.

The trick about the HttpOperationHandlers was twofold: Firstly I was throwing an exception in my operation and hadn't implemented a global HttpErrorHandler yet. (Doh!) Secondly I didn't know that the parameter name of HttpOperationHandler<..>.OnHandle had to match the name of the operation parameter.

这篇关于在哪里可以找到有关WCF Web API的最新文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆