1 instantiation of WebOperationContext
System.ServiceModel.Web (1)
System\ServiceModel\Web\WebOperationContext.cs (1)
61
return new
WebOperationContext
(OperationContext.Current);
66 references to WebOperationContext
System.Data.Services (3)
System\Data\Services\DataService.cs (1)
377
if (!System.ServiceModel.Web.
WebOperationContext
.Current.OutgoingResponse.SuppressEntityBody)
System\Data\Services\HttpContextServiceHost.cs (2)
38
private readonly
WebOperationContext
operationContext;
62
this.operationContext =
WebOperationContext
.Current;
System.ServiceModel.Web (63)
System\ServiceModel\Description\WebHttpBehavior.cs (1)
1320
UriTemplateMatch match =
WebOperationContext
.Current.IncomingRequest.UriTemplateMatch;
System\ServiceModel\Dispatcher\ContentTypeSettingClientMessageFormatter.cs (2)
66
if (string.IsNullOrEmpty(
WebOperationContext
.Current.OutgoingRequest.ContentType))
68
WebOperationContext
.Current.OutgoingRequest.ContentType = contentType;
System\ServiceModel\Dispatcher\ContentTypeSettingDispatchMessageFormatter.cs (2)
58
if (string.IsNullOrEmpty(
WebOperationContext
.Current.OutgoingResponse.ContentType))
60
WebOperationContext
.Current.OutgoingResponse.ContentType = contentType;
System\ServiceModel\Dispatcher\FormatSelectingMessageInspector.cs (5)
74
string acceptHeader =
WebOperationContext
.Current.IncomingRequest.Accept;
119
IList<ContentType> acceptHeaderElements =
WebOperationContext
.Current.IncomingRequest.GetAcceptHeaderElements();
156
string contentTypeStr =
WebOperationContext
.Current.IncomingRequest.ContentType;
193
WebOperationContext
.Current.OutgoingResponse.Format = format;
203
OutgoingWebResponseContext outgoingResponse =
WebOperationContext
.Current.OutgoingResponse;
System\ServiceModel\Dispatcher\HelpPage.cs (6)
51
Uri baseUri = UriTemplate.RewriteUri(OperationContext.Current.Channel.LocalAddress.Uri,
WebOperationContext
.Current.IncomingRequest.Headers[HttpRequestHeader.Host]);
61
return
WebOperationContext
.Current.CreateTextResponse(helpPage, "text/html");
66
Uri requestUri = UriTemplate.RewriteUri(
WebOperationContext
.Current.IncomingRequest.UriTemplateMatch.RequestUri,
WebOperationContext
.Current.IncomingRequest.Headers[HttpRequestHeader.Host]);
73
Uri baseUri = UriTemplate.RewriteUri(OperationContext.Current.Channel.LocalAddress.Uri,
WebOperationContext
.Current.IncomingRequest.Headers[HttpRequestHeader.Host]);
85
return
WebOperationContext
.Current.CreateTextResponse(helpPage, "text/html");
System\ServiceModel\Dispatcher\HttpUnhandledOperationInvoker.cs (12)
55
Message redirectResult =
WebOperationContext
.Current.CreateStreamResponse(s => HelpHtmlBuilder.CreateTransferRedirectPage(to.AbsoluteUri, newLocation.AbsoluteUri).Save(s, SaveOptions.OmitDuplicateNamespaces), Atom10Constants.HtmlMediaType);
56
WebOperationContext
.Current.OutgoingResponse.Location = newLocation.AbsoluteUri;
57
WebOperationContext
.Current.OutgoingResponse.StatusCode = HttpStatusCode.TemporaryRedirect;
58
WebOperationContext
.Current.OutgoingResponse.ContentType = HtmlContentType;
76
Uri helpUri = this.HelpUri != null ? UriTemplate.RewriteUri(this.HelpUri,
WebOperationContext
.Current.IncomingRequest.Headers[HttpRequestHeader.Host]) : null;
82
WebOperationContext
.Current.OutgoingResponse.Headers[HttpResponseHeader.Allow] = allowedMethodsData.AllowHeader;
84
result =
WebOperationContext
.Current.CreateStreamResponse(s => HelpHtmlBuilder.CreateMethodNotAllowedPage(helpUri).Save(s, SaveOptions.OmitDuplicateNamespaces), Atom10Constants.HtmlMediaType);
88
result =
WebOperationContext
.Current.CreateStreamResponse(s => HelpHtmlBuilder.CreateEndpointNotFound(helpUri).Save(s, SaveOptions.OmitDuplicateNamespaces), Atom10Constants.HtmlMediaType);
91
WebOperationContext
.Current.OutgoingResponse.StatusCode = uriMatched ? HttpStatusCode.MethodNotAllowed : HttpStatusCode.NotFound;
92
WebOperationContext
.Current.OutgoingResponse.ContentType = HtmlContentType;
114
WebOperationContext
.Current.IncomingRequest.Method, OperationContext.Current.IncomingMessageHeaders.To)));
119
WebOperationContext
.Current.IncomingRequest.Method, OperationContext.Current.IncomingMessageHeaders.To)), TraceEventType.Warning);
System\ServiceModel\Dispatcher\JavascriptCallbackMessageInspector.cs (1)
77
Message nullJsonMessage =
WebOperationContext
.Current.CreateJsonResponse<object>(null);
System\ServiceModel\Dispatcher\MultiplexingDispatchMessageFormatter.cs (2)
54
WebOperationContext
currentContext =
WebOperationContext
.Current;
System\ServiceModel\Dispatcher\SingleBodyParameterMessageFormatter.cs (4)
164
WebOperationContext
currentContext =
WebOperationContext
.Current;
189
WebOperationContext
currentContext =
WebOperationContext
.Current;
System\ServiceModel\Dispatcher\UriTemplateClientFormatter.cs (4)
86
if (
WebOperationContext
.Current != null)
90
WebOperationContext
.Current.OutgoingRequest.SuppressEntityBody = true;
92
if (this.method != WebHttpBehavior.WildcardMethod &&
WebOperationContext
.Current.OutgoingRequest.Method != null)
94
WebOperationContext
.Current.OutgoingRequest.Method = this.method;
System\ServiceModel\Dispatcher\WebErrorHandler.cs (8)
59
WebOperationContext
context =
WebOperationContext
.Current;
66
if (isXmlSerializerFaultFormat &&
WebOperationContext
.Current.OutgoingResponse.Format == WebMessageFormat.Json)
127
WebOperationContext
.Current.OutgoingResponse.StatusCode = HttpStatusCode.BadRequest;
136
if (
WebOperationContext
.Current != null)
138
helpUri = this.webHttpBehavior.HelpUri != null ? UriTemplate.RewriteUri(this.webHttpBehavior.HelpUri,
WebOperationContext
.Current.IncomingRequest.Headers[HttpRequestHeader.Host]) : null;
152
HttpResponseMessageProperty responseProperty = GetResponseProperty(
WebOperationContext
.Current, response);
161
static HttpResponseMessageProperty GetResponseProperty(
WebOperationContext
currentContext, Message response)
System\ServiceModel\Web\IncomingWebRequestContext.cs (3)
194
WebOperationContext
.Current.OutgoingResponse.LastModified = lastModified;
291
WebOperationContext
.Current.OutgoingResponse.ETag = entityTag;
331
WebOperationContext
.Current.OutgoingResponse.ETag = entityTag;
System\ServiceModel\Web\WebOperationContext.cs (13)
41
if (operationContext.Extensions.Find<
WebOperationContext
>() == null)
48
public static
WebOperationContext
Current
56
WebOperationContext
existing = OperationContext.Current.Extensions.Find<
WebOperationContext
>();
108
AddContentType(
WebOperationContext
.DefaultJsonMediaType, this.OutgoingResponse.BindingWriteEncoding);
126
AddContentType(
WebOperationContext
.DefaultXmlMediaType, this.OutgoingResponse.BindingWriteEncoding);
138
AddContentType(
WebOperationContext
.DefaultXmlMediaType, this.OutgoingResponse.BindingWriteEncoding);
159
AddContentType(
WebOperationContext
.DefaultXmlMediaType, this.OutgoingResponse.BindingWriteEncoding);
172
AddContentType(
WebOperationContext
.DefaultXmlMediaType, this.OutgoingResponse.BindingWriteEncoding);
184
AddContentType(
WebOperationContext
.DefaultAtomMediaType, this.OutgoingResponse.BindingWriteEncoding);
196
AddContentType(
WebOperationContext
.DefaultAtomMediaType, this.OutgoingResponse.BindingWriteEncoding);
208
AddContentType(
WebOperationContext
.DefaultAtomMediaType, this.OutgoingResponse.BindingWriteEncoding);
214
return CreateTextResponse(text,
WebOperationContext
.DefaultTextMediaType, Encoding.UTF8);