CodePlexProject Hosting for Open Source Software
An unexpected error has occured.
There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Voted
No files are attached
jberd126 wrote Oct 6, 2011 at 5:58 PM
public class UriTemplateHandler : HttpOperationHandler { protected override sealed object[] OnHandle(object[] input) { ... Uri uri = requestMessage.RequestUri; int numberOfParameters = this.OutputParameters.Count; object[] output = new object[numberOfParameters]; if (uri != null) { UriTemplateMatch match = this.UriTemplate.Match(this.BaseAddress, uri); if (match == null) { throw Fx.Exception.AsError( new InvalidOperationException( Http.SR.UriTemplateDoesNotMatchUri( uri.ToString(), this.UriTemplate.ToString()))); } // BEGIN added var webOperationContext = System.ServiceModel.Web.WebOperationContext.Current; if(webOperationContext != null) { webOperationContext.IncomingRequest.UriTemplateMatch = match; } // END added for (int i = 0; i < numberOfParameters; i++) { output[i] = match.BoundVariables[i]; } } return output; } }
Sign in to add a comment or to set email notifications
Keyboard shortcuts are available for this page.