public object BeforeCall(string operationName, object[] inputs) { string methodName = WebOperationContext.Current.IncomingRequest.UriTemplateMatch.QueryParameters[callback]; if (methodName != null) { //System.ServiceModel.OperationContext.Current.OutgoingMessageProperties["wrapper"] = inputs[0]; JSONPMessageProperty property = new JSONPMessageProperty() { MethodName = methodName }; OperationContext.Current.OutgoingMessageProperties.Add(JSONPMessageProperty.Name, property); } return null; }
public object BeforeCall(string operationName, object[] inputs) { string methodName = WebOperationContext.Current.IncomingRequest.UriTemplateMatch.QueryParameters[callback]; string headerType = WebOperationContext.Current.IncomingRequest.Accept; JSONPMessageProperty property = new JSONPMessageProperty() { MethodName = methodName, HeaderType = headerType }; OperationContext.Current.OutgoingMessageProperties.Add(JSONPMessageProperty.Name, property); return null; }
public object BeforeCall(string operationName, object[] inputs) { if (WebOperationContext.Current != null) { string methodName = WebOperationContext.Current.IncomingRequest.UriTemplateMatch.QueryParameters[callback]; if (methodName != null) { var property = new JSONPMessageProperty { MethodName = methodName }; OperationContext.Current.OutgoingMessageProperties.Add(Name, property); } } return null; }