假设我使用以下合同实现了 WCF REST服务。
[ServiceContract]
interface INotesService
{
[OperationContract]
[WebInvoke(Method = "GET",
UriTemplate = "notes/{id}")]
Note GetNote(string id);
[OperationContract]
[WebInvoke(Method = "GET",
UriTemplate = "notes")]
IEnumerable<Note> GetNotes();
}
现在,我在管道中有一个 HttpModule 来进行授权,但是该代码需要知道请求将被分派到哪个方法。如何找到将由 WCF 调用的方法的签名?