7 instantiations of OperationContext
System.ServiceModel (6)
System\ServiceModel\Channels\PeerSecurityHelpers.cs (1)
764using (OperationContextScope scope = new OperationContextScope(new OperationContext((ServiceHostBase)null)))
System\ServiceModel\Dispatcher\ChannelHandler.cs (4)
455currentOperationContext = new OperationContext(request, message, channel, this.host); 1458OperationContext currentOperationContext = new OperationContext(this.host); 1537OperationContext currentOperationContext = new OperationContext(this.host); 1622OperationContext currentOperationContext = new OperationContext(this.host);
System\ServiceModel\OperationContextScope.cs (1)
26this.PushContext(new OperationContext(channel));
System.ServiceModel.Activities (1)
System\ServiceModel\Activities\InternalSendMessage.cs (1)
1446instance.OperationContext = (contextChannel == null) ? null : new OperationContext(contextChannel);
440 references to OperationContext
SMSvcHost (5)
System\ServiceModel\Activation\WorkerProcess.cs (5)
187this.connectionDuplicator = OperationContext.Current.GetCallbackChannel<IConnectionDuplicator>(); 207object property = OperationContext.Current.IncomingMessage.Properties[ConnectionMessageProperty.Name]; 257foreach (IChannel channel in OperationContext.Current.InstanceContext.IncomingChannels) 363OperationContext.Current.InstanceContext.Abort(); 368InstanceContext serviceInstance = OperationContext.Current.InstanceContext;
System.Data.Services (4)
System\Data\Services\DelegateBodyWriter.cs (2)
78var ctx = System.ServiceModel.OperationContext.Current;
System\Data\Services\HttpContextServiceHost.cs (2)
200if (OperationContext.Current.IncomingMessageProperties.TryGetValue(XmlConstants.MicrosoftDataServicesRequestUri, out property)) 302if (OperationContext.Current.IncomingMessageProperties.TryGetValue(XmlConstants.MicrosoftDataServicesRootUri, out property))
System.ServiceModel (182)
System\ServiceModel\Channels\BufferedReceiveMessageProperty.cs (1)
49public void RegisterForReplay(OperationContext operationContext)
System\ServiceModel\Channels\ContextExchangeCorrelationHelper.cs (1)
44public static string GetContextCorrelationData(OperationContext operationContext)
System\ServiceModel\Channels\PeerSecurityHelpers.cs (2)
905OperationContext opContext = OperationContext.Current;
System\ServiceModel\Channels\PeerService.cs (5)
147IPeerNeighbor neighbor = (IPeerNeighbor)getNeighborCallback(OperationContext.Current.GetCallbackChannel<IPeerProxy>()); 156OperationContext.Current.IncomingMessage); 177OperationContext.Current.IncomingMessage.Headers.Action); 328OperationContext current = OperationContext.Current;
System\ServiceModel\Channels\ServiceChannel.cs (9)
578OperationContext context = OperationContext.Current; 815ConcurrencyBehavior.UnlockInstanceBeforeCallout(OperationContext.Current); 836ConcurrencyBehavior.LockInstanceAfterCallout(OperationContext.Current); 1030OperationContext operationContext = OperationContext.Current; 1244void AddMessageProperties(Message message, OperationContext context) 1891OperationContext operationContext; 1905this.operationContext = OperationContext.Current;
System\ServiceModel\Channels\ServiceChannelFactory.cs (2)
383OperationContext current = OperationContext.Current;
System\ServiceModel\Channels\ServiceChannelProxy.cs (12)
257OperationContext originalOperationContext = OperationContext.Current; 258OperationContext.Current = asyncResult.AsyncState as OperationContext; 265OperationContext.Current = originalOperationContext; 269return Task.Factory.FromAsync(beginCallDelegate, endCallDelegate, channel, operation, inputParameters, OperationContext.Current); 276OperationContext originalOperationContext = OperationContext.Current; 277OperationContext.Current = asyncResult.AsyncState as OperationContext; 284OperationContext.Current = originalOperationContext; 288return Task<T>.Factory.FromAsync<ServiceChannel, ProxyOperationRuntime, object[]>(beginCallDelegate, endCallDelegate, channel, operation, inputParameters, OperationContext.Current);
System\ServiceModel\Channels\SharedConnectionListener.cs (1)
756EventTraceActivity eventTraceActivity = EventTraceActivityHelper.TryExtractActivity(OperationContext.Current.IncomingMessage);
System\ServiceModel\Diagnostics\PerformanceCounters.cs (2)
834OperationContext currentContext = OperationContext.Current;
System\ServiceModel\Diagnostics\TraceUtility.cs (15)
587internal static Guid GetReceivedActivityId(OperationContext operationContext) 951static internal string GetCallerInfo(OperationContext context) 1041static internal void MessageFlowAtMessageReceived(Message message, OperationContext context, EventTraceActivity eventTraceActivity, bool createNewActivityId) 1071context = OperationContext.Current; 1079internal static string GetAnnotation(OperationContext context) 1153if (OperationContext.Current != null && activity != null) 1155OperationContext.Current.OutgoingMessageProperties[TraceUtility.AsyncOperationActivityKey] = activity; 1162if (OperationContext.Current != null && OperationContext.Current.OutgoingMessageProperties.TryGetValue(TraceUtility.AsyncOperationActivityKey, out data)) 1164OperationContext.Current.OutgoingMessageProperties.Remove(TraceUtility.AsyncOperationActivityKey); 1171if (OperationContext.Current != null) 1173OperationContext.Current.OutgoingMessageProperties[TraceUtility.AsyncOperationStartTimeKey] = new EventTraceActivityTimeProperty(eventTraceActivity, startTime); 1182if (OperationContext.Current != null && OperationContext.Current.OutgoingMessageProperties.TryGetValue<EventTraceActivityTimeProperty>(TraceUtility.AsyncOperationStartTimeKey, out data)) 1184OperationContext.Current.OutgoingMessageProperties.Remove(TraceUtility.AsyncOperationStartTimeKey);
System\ServiceModel\Dispatcher\AsyncMethodInvoker.cs (7)
72Guid activityId = TraceUtility.GetReceivedActivityId(OperationContext.Current); 81Guid activityId = ActivityIdHeader.ExtractActivityId(OperationContext.Current.IncomingMessage); 175if (null != OperationContext.Current) 177Guid activityId = TraceUtility.GetReceivedActivityId(OperationContext.Current); 253OperationContext context = OperationContext.Current; 261TD.OperationInvoked(eventTraceActivity, methodName, TraceUtility.GetCallerInfo(OperationContext.Current));
System\ServiceModel\Dispatcher\ChannelHandler.cs (17)
383bool DispatchAndReleasePump(RequestContext request, bool cleanThread, OperationContext currentOperationContext) 940bool HandleRequest(RequestContext request, OperationContext currentOperationContext) 1455OperationContext existingOperationContext = OperationContext.Current; 1458OperationContext currentOperationContext = new OperationContext(this.host); 1459OperationContext.Current = currentOperationContext; 1486OperationContext.Current = existingOperationContext; 1533OperationContext existingOperationContext = OperationContext.Current; 1537OperationContext currentOperationContext = new OperationContext(this.host); 1538OperationContext.Current = currentOperationContext; 1574OperationContext.Current = existingOperationContext; 1618OperationContext existingOperationContext = OperationContext.Current; 1622OperationContext currentOperationContext = new OperationContext(this.host); 1623OperationContext.Current = currentOperationContext; 1679OperationContext.Current = existingOperationContext;
System\ServiceModel\Dispatcher\ConcurrencyBehavior.cs (2)
129internal static void UnlockInstanceBeforeCallout(OperationContext operationContext) 156internal static void LockInstanceAfterCallout(OperationContext operationContext)
System\ServiceModel\Dispatcher\DispatchOperationRuntime.cs (1)
647OperationContext.Current.ClaimsPrincipal = claimsPrincipal;
System\ServiceModel\Dispatcher\DispatchRuntime.cs (4)
823ServiceChannel serviceChannel = OperationContext.Current.InternalServiceChannel; 824OperationContext.Current.OperationCompleted += 852OperationContext.Current.RequestContext.Close(); 853OperationContext.Current.RequestContext = null;
System\ServiceModel\Dispatcher\IInstanceTransaction.cs (1)
12Transaction GetTransactionForInstance(OperationContext operationContext);
System\ServiceModel\Dispatcher\ImmutableDispatchRuntime.cs (1)
714void AddMessageProperties(Message message, OperationContext context, ServiceChannel replyChannel)
System\ServiceModel\Dispatcher\InstanceBehavior.cs (2)
260OperationContext current = OperationContext.Current;
System\ServiceModel\Dispatcher\MessageRpc.cs (5)
31internal readonly OperationContext OperationContext; 83OperationContext operationContext, InstanceContext instanceContext, EventTraceActivity eventTraceActivity) 606OperationContext originalContext; 607OperationContext.Holder contextHolder; 610contextHolder = OperationContext.CurrentHolder;
System\ServiceModel\Dispatcher\SecurityImpersonationBehavior.cs (1)
130ClaimsPrincipal claimsPrincipal = OperationContext.Current.ClaimsPrincipal;
System\ServiceModel\Dispatcher\SyncMethodInvoker.cs (5)
127OperationContext context = OperationContext.Current; 146Guid activityId = TraceUtility.GetReceivedActivityId(OperationContext.Current); 155Guid activityId = ActivityIdHeader.ExtractActivityId(OperationContext.Current.IncomingMessage); 170TD.OperationInvoked(eventTraceActivity, this.MethodName, TraceUtility.GetCallerInfo(OperationContext.Current));
System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (2)
214OperationContext.EnableAsyncFlow(); 245OperationContext.DisableAsyncFlow();
System\ServiceModel\InstanceContext.cs (2)
133get { return OperationContext.Current != null ? OperationContext.Current.InstanceContext : null; }
System\ServiceModel\OperationContext.cs (19)
16public sealed class OperationContext : IExtensibleObject<OperationContext> 21static AsyncLocal<OperationContext> currentAsyncLocalContext = new AsyncLocal<OperationContext>(); 26ExtensionCollection<OperationContext> extensions; 94public static OperationContext Current 98return ShouldUseAsyncLocalContext ? OperationContext.currentAsyncLocalContext.Value : CurrentHolder.Context; 105OperationContext.currentAsyncLocalContext.Value = value; 118Holder holder = OperationContext.currentContext; 122OperationContext.currentContext = holder; 132return !ServiceModelAppSettings.DisableOperationContextAsyncFlow && CurrentHolder.Context == null && OperationContext.currentAsyncLocalContext.Value != null && OperationContext.currentAsyncLocalContext.Value.isAsyncFlowEnabled; 156public IExtensionCollection<OperationContext> Extensions 162this.extensions = new ExtensionCollection<OperationContext>(this); 365internal static void EnableAsyncFlow(OperationContext oc) 376if (OperationContext.Current != null && OperationContext.Current.isAsyncFlowEnabled) 378OperationContext.Current.isAsyncFlowEnabled = false; 470OperationContext context; 472public OperationContext Context
System\ServiceModel\OperationContextScope.cs (10)
18OperationContext currentContext; 20readonly OperationContext originalContext = OperationContext.Current; 29public OperationContextScope(OperationContext context) 63void PushContext(OperationContext context) 65bool isAsyncFlowEnabled = OperationContext.ShouldUseAsyncLocalContext; 71OperationContext.EnableAsyncFlow(this.currentContext); 75OperationContext.Current = this.currentContext; 86if (OperationContext.Current != this.currentContext) 90OperationContext.Current = this.originalContext;
System\ServiceModel\Security\IdentityModelServiceAuthorizationManager.cs (17)
48protected override ReadOnlyCollection<IAuthorizationPolicy> GetAuthorizationPolicies(OperationContext operationContext) 125if (includeTransportTokens && (OperationContext.Current != null) && 126(OperationContext.Current.IncomingMessageProperties != null) && 127(OperationContext.Current.IncomingMessageProperties.Security != null) && 128(OperationContext.Current.IncomingMessageProperties.Security.TransportToken != null)) 131OperationContext.Current.IncomingMessageProperties.Security.TransportToken.SecurityToken; 134OperationContext.Current.IncomingMessageProperties.Security.TransportToken.SecurityTokenPolicies; 422if ((OperationContext.Current != null) && 423(OperationContext.Current.IncomingMessageProperties != null) && 424(OperationContext.Current.IncomingMessageProperties.Security != null)) 426SecurityMessageProperty securityMessageProperty = OperationContext.Current.IncomingMessageProperties.Security; 549if (OperationContext.Current != null && 550OperationContext.Current.Host != null && 551OperationContext.Current.Host.Description != null && 552OperationContext.Current.Host.Description.Behaviors != null) 554serviceCredentials = OperationContext.Current.Host.Description.Behaviors.Find<ServiceCredentials>(); 642protected override bool CheckAccessCore(OperationContext operationContext)
System\ServiceModel\Security\IdentityVerifier.cs (2)
280eventTraceActivity = EventTraceActivityHelper.TryExtractActivity((OperationContext.Current != null) ? OperationContext.Current.IncomingMessage : null);
System\ServiceModel\Security\ImpersonateOnSerializingReplyMessageProperty.cs (4)
105if (OperationContext.Current != null) 107EndpointDispatcher endpointDispatcher = OperationContext.Current.EndpointDispatcher; 131if (OperationContext.Current != null) 133EndpointDispatcher endpointDispatcher = OperationContext.Current.EndpointDispatcher;
System\ServiceModel\Security\NegotiationTokenAuthenticator.cs (4)
621if (OperationContext.Current.SessionId == null) 631IChannel channel = OperationContext.Current.Channel; 646if (OperationContext.Current.SessionId == null) 656IChannel channel = OperationContext.Current.Channel;
System\ServiceModel\Security\ReceiveSecurityHeader.cs (2)
330this.eventTraceActivity = EventTraceActivityHelper.TryExtractActivity((OperationContext.Current != null) ? OperationContext.Current.IncomingMessage : null);
System\ServiceModel\Security\SecuritySessionSecurityTokenAuthenticator.cs (2)
836ILogonTokenCacheManager logonManager = OperationContext.Current.EndpointDispatcher.ChannelDispatcher.Listener.GetProperty<ILogonTokenCacheManager>(); 837Collection<ISecurityContextSecurityTokenCache> sctCaches = OperationContext.Current.EndpointDispatcher.ChannelDispatcher.Listener.GetProperty<Collection<ISecurityContextSecurityTokenCache>>();
System\ServiceModel\Security\WSTrustServiceContract.cs (15)
153if (OperationContext.Current != null && OperationContext.Current.Host != null && 154OperationContext.Current.Host.Description != null) 156ServiceCredentials serviceCreds = OperationContext.Current.Host.Description.Behaviors.Find<ServiceCredentials>(); 177this.GetSecurityHeaderTokenResolver(OperationContext.Current.RequestContext) 294Fx.Assert(OperationContext.Current != null, ""); 295Fx.Assert(OperationContext.Current.RequestContext != null, ""); 323response = Message.CreateMessage(OperationContext.Current.RequestContext.RequestMessage.Version, 362Principal = OperationContext.Current.ClaimsPrincipal as ClaimsPrincipal, 559Fx.Assert(OperationContext.Current != null, ""); 560Fx.Assert(OperationContext.Current.RequestContext != null, ""); 585OperationContext.Current.RequestContext.RequestMessage.Version, 673ServiceDebugBehavior debugBehavior = OperationContext.Current.Host.Description.Behaviors.Find<ServiceDebugBehavior>(); 686FaultException faultException = OperationContext.Current.Host.Credentials.ExceptionMapper.FromException(ex, (requestEnvelopeVersion == EnvelopeVersion.Soap11) ? soap11Namespace : soap12Namespace, trustNamespace); 1438return Message.CreateMessage(OperationContext.Current.RequestContext.RequestMessage.Version,
System\ServiceModel\ServiceAuthorizationManager.cs (4)
25public virtual bool CheckAccess(OperationContext operationContext, ref Message message) 30public virtual bool CheckAccess(OperationContext operationContext) 54protected virtual ReadOnlyCollection<IAuthorizationPolicy> GetAuthorizationPolicies(OperationContext operationContext) 82protected virtual bool CheckAccessCore(OperationContext operationContext)
System\ServiceModel\ServiceSecurityContext.cs (2)
75OperationContext operationContext = OperationContext.Current;
System\ServiceModel\Transactions\WsatProxy.cs (1)
142using (new OperationContextScope((OperationContext)null))
System.ServiceModel.Activation (1)
System\ServiceModel\ServiceHostingEnvironment.cs (1)
475FxTrace.Trace.SetAnnotation(() => System.ServiceModel.Diagnostics.TraceUtility.GetAnnotation(OperationContext.Current));
System.ServiceModel.Activities (47)
System\ServiceModel\Activities\CorrelationRequestContext.cs (3)
23public OperationContext OperationContext 75public void ReceiveReply(OperationContext operationContext, Message reply) 82public void ReceiveAsyncReply(OperationContext operationContext, Message reply, Exception replyException)
System\ServiceModel\Activities\Description\WorkflowInstanceManagementBehavior.cs (1)
256protected override bool CheckAccessCore(OperationContext operationContext)
System\ServiceModel\Activities\Description\WorkflowOperationBehavior.cs (2)
162protected override IAsyncResult OnBeginServiceOperation(WorkflowServiceInstance workflowInstance, OperationContext operationContext, 183public Transaction GetTransactionForInstance(OperationContext operationContext)
System\ServiceModel\Activities\Dispatcher\BufferedReceiveManager.cs (1)
32public bool BufferReceive(OperationContext operationContext, ReceiveContext receiveContext, string bookmarkName, BufferedReceiveState state, bool retry)
System\ServiceModel\Activities\Dispatcher\ControlOperationInvoker.cs (11)
187OperationContext operationContext, object[] inputs, Transaction currentTransaction, IInvokeReceivedNotification notification, 200protected void GetInstanceKeys(OperationContext operationContext, out InstanceKey instanceKey, out ICollection<InstanceKey> additionalKeys) 287OperationContext operationContext; 304this.operationContext = OperationContext.Current; 981OperationContext operationContext; 988object[] inputs, OperationContext operationContext, Transaction currentTransaction, IInvokeReceivedNotification notification, 1082OperationContext current; 1084public OperationContextScopeHelper(OperationContext newContext) 1086this.current = OperationContext.Current; 1087OperationContext.Current = newContext; 1092OperationContext.Current = this.current;
System\ServiceModel\Activities\InternalReceiveMessage.cs (2)
724OperationContext operationContext = instance.GetOperationContext(); 1164internal OperationContext GetOperationContext()
System\ServiceModel\Activities\InternalSendMessage.cs (13)
1816OperationContext oldContext = OperationContext.Current; 1821OperationContext.Current = this.instance.OperationContext; 1862OperationContext.Current = oldContext; 1906OperationContext oldContext = OperationContext.Current; 1913OperationContext.Current = thisPtr.instance.OperationContext; 1952OperationContext.Current = oldContext; 1972OperationContext oldContext = OperationContext.Current; 1976OperationContext.Current = thisPtr.instance.OperationContext; 2004OperationContext.Current = oldContext; 2394public OperationContext OperationContext
System\ServiceModel\Activities\IReceiveMessageCallback.cs (1)
11void OnReceiveMessage(OperationContext operationContext, ExecutionProperties activityExecutionProperties);
System\ServiceModel\Activities\ISendMessageCallback.cs (1)
9void OnSendMessage(OperationContext operationContext);
System\ServiceModel\Activities\WorkflowGetInstanceContext.cs (1)
30public OperationContext OperationContext
System\ServiceModel\Activities\WorkflowHostingEndpoint.cs (3)
62protected internal virtual Guid OnGetInstanceId(object[] inputs, OperationContext operationContext) 68object[] inputs, OperationContext operationContext, 76protected internal virtual Bookmark OnResolveBookmark(object[] inputs, OperationContext operationContext,
System\ServiceModel\Activities\WorkflowOperationContext.cs (8)
69WorkflowOperationContext(object[] inputs, OperationContext operationContext, string operationName, 148public OperationContext OperationContext 200public static IAsyncResult BeginProcessRequest(WorkflowServiceInstance workflowInstance, OperationContext operationContext, string operationName, 791OperationContext currentOperationContext; 793public OperationContextScopeHelper(OperationContext operationContext) 795this.currentOperationContext = OperationContext.Current; 796OperationContext.Current = operationContext; 801OperationContext.Current = this.currentOperationContext;
System.ServiceModel.Discovery (96)
System\ServiceModel\Discovery\AnnouncementClient.cs (4)
581if (DiscoveryUtility.IsCompatible(OperationContext.Current, clientChannel)) 584this.originalMessageId = OperationContext.Current.OutgoingMessageHeaders.MessageId; 595OperationContext.Current.OutgoingMessageHeaders.MessageId = new UniqueId(); 607OperationContext.Current.OutgoingMessageHeaders.MessageId = this.originalMessageId;
System\ServiceModel\Discovery\AnnouncementSendsAsyncResult.cs (1)
40OperationContext.Current.OutgoingMessageHeaders.MessageId = this.messageIds[index];
System\ServiceModel\Discovery\ByeOperationAsyncResult.cs (2)
65UniqueId messageId = OperationContext.Current.IncomingMessageHeaders.MessageId; 79eventTraceActivity = EventTraceActivityHelper.TryExtractActivity(OperationContext.Current.IncomingMessage);
System\ServiceModel\Discovery\DiscoveryClient.cs (22)
557OperationContext operationContext = OperationContext.Current; 639OperationContext operationContext = OperationContext.Current; 706OperationContext operationContext = OperationContext.Current; 817Fx.Assert(OperationContext.Current != null, "OperationContext.Current cannot be null."); 818Fx.Assert(OperationContext.Current.OutgoingMessageHeaders != null, "OperationContext.Current.OutgoingMessageHeaders cannot be null."); 821OperationContext.Current.OutgoingMessageHeaders.MessageId, 864Fx.Assert(OperationContext.Current != null, "OperationContext.Current cannot be null."); 865Fx.Assert(OperationContext.Current.OutgoingMessageHeaders != null, "OperationContext.Current.OutgoingMessageHeaders cannot be null."); 869OperationContext.Current.OutgoingMessageHeaders.MessageId, 1281if (DiscoveryUtility.IsCompatible(OperationContext.Current, clientChannel)) 1284this.originalMessageId = OperationContext.Current.OutgoingMessageHeaders.MessageId; 1285this.originalReplyTo = OperationContext.Current.OutgoingMessageHeaders.ReplyTo; 1286this.originalTo = OperationContext.Current.OutgoingMessageHeaders.To; 1297OperationContext.Current.OutgoingMessageHeaders.MessageId = new UniqueId(); 1300OperationContext.Current.OutgoingMessageHeaders.ReplyTo = clientChannel.LocalAddress; 1301OperationContext.Current.OutgoingMessageHeaders.To = clientChannel.RemoteAddress.Uri; 1312OperationContext.Current.OutgoingMessageHeaders.MessageId = this.originalMessageId; 1313OperationContext.Current.OutgoingMessageHeaders.ReplyTo = this.originalReplyTo; 1314OperationContext.Current.OutgoingMessageHeaders.To = this.originalTo;
System\ServiceModel\Discovery\DiscoveryOperationContext.cs (8)
18readonly OperationContext operationContext; 25public DiscoveryOperationContext(OperationContext operationContext) 70public void AddressDuplexResponseMessage(OperationContext responseOperationContext) 78public void AddressRequestResponseMessage(OperationContext responseOperationContext) 84static DiscoveryOperationContextExtension GetDiscoveryOperationContextExtension(OperationContext operationContext) 97static DiscoveryMessageProperty GetDiscoveryMessageProperty(OperationContext operationContext) 110static MessageHeaders GetOutgoingMessageHeaders(OperationContext operationContext) 129void AddDiscoveryMessageProperty(OperationContext responseOperationContext)
System\ServiceModel\Discovery\DiscoveryOperationContextExtension.cs (5)
11public class DiscoveryOperationContextExtension : IExtension<OperationContext> 61void IExtension<OperationContext>.Attach(OperationContext owner) 65void IExtension<OperationContext>.Detach(OperationContext owner)
System\ServiceModel\Discovery\DiscoveryOperationContextExtensionInitializer.cs (1)
44OperationContext.Current.Extensions.Add(this.discoveryOperationContextExtension);
System\ServiceModel\Discovery\DiscoveryService.cs (3)
257if (OperationContext.Current.IncomingMessageHeaders.MessageId == null) 278OperationContext context = OperationContext.Current;
System\ServiceModel\Discovery\DiscoveryUtility.cs (1)
106public static bool IsCompatible(OperationContext context, IContextChannel channel)
System\ServiceModel\Discovery\HelloOperationAsyncResult.cs (2)
68eventTraceActivity = EventTraceActivityHelper.TryExtractActivity(OperationContext.Current.IncomingMessage); 71UniqueId messageId = OperationContext.Current.IncomingMessageHeaders.MessageId;
System\ServiceModel\Discovery\ProbeDuplexAsyncResult.cs (5)
54this.context = new DiscoveryOperationContext(OperationContext.Current); 260bool isDuplicate = this.discoveryServiceImpl.IsDuplicate(OperationContext.Current.IncomingMessageHeaders.MessageId); 267OperationContext.Current.IncomingMessageHeaders.MessageId.ToString()); 283this.context.AddressDuplexResponseMessage(OperationContext.Current); 313this.context.AddressDuplexResponseMessage(OperationContext.Current);
System\ServiceModel\Discovery\ProbeRequestResponseAsyncResult.cs (4)
44this.context = new DiscoveryOperationContext(OperationContext.Current); 71this.context.AddressRequestResponseMessage(OperationContext.Current); 104bool isDuplicate = this.discoveryServiceImpl.IsDuplicate(OperationContext.Current.IncomingMessageHeaders.MessageId); 111OperationContext.Current.IncomingMessageHeaders.MessageId.ToString());
System\ServiceModel\Discovery\ResolveDuplexAsyncResult.cs (5)
47this.context = new DiscoveryOperationContext(OperationContext.Current); 213this.context.AddressDuplexResponseMessage(OperationContext.Current); 230bool isDuplicate = this.discoveryServiceImpl.IsDuplicate(OperationContext.Current.IncomingMessageHeaders.MessageId); 237OperationContext.Current.IncomingMessageHeaders.MessageId.ToString()); 253this.context.AddressDuplexResponseMessage(OperationContext.Current);
System\ServiceModel\Discovery\ResolveRequestResponseAsyncResult.cs (4)
39this.context = new DiscoveryOperationContext(OperationContext.Current); 74this.context.AddressRequestResponseMessage(OperationContext.Current); 102bool isDuplicate = this.discoveryServiceImpl.IsDuplicate(OperationContext.Current.IncomingMessageHeaders.MessageId); 109OperationContext.Current.IncomingMessageHeaders.MessageId.ToString());
System\ServiceModel\Discovery\UdpReplyToBehavior.cs (5)
85if (OperationContext.Current.IncomingMessageProperties.TryGetValue(RemoteEndpointMessageProperty.Name, out messageProperty)) 98OperationContext.Current.IncomingMessageHeaders.ReplyTo = AnnonymousAddress; 103if (NetworkInterfaceMessageProperty.TryGet(OperationContext.Current.IncomingMessageProperties, out udpMessageProperty)) 116OperationContext.Current.IncomingMessageProperties[DiscoveryMessageProperty.Name] = discoveryMessageProperty; 133if (OperationContext.Current.OutgoingMessageProperties.TryGetValue(
System\ServiceModel\Discovery\Version11\DiscoveryInnerClientAdhoc11.cs (6)
122OperationContext.Current.IncomingMessageHeaders.RelatesTo, 133OperationContext.Current.IncomingMessageHeaders.MessageId.ToString()); 151OperationContext.Current.IncomingMessageHeaders.RelatesTo, 161OperationContext.Current.IncomingMessageHeaders.MessageId.ToString()); 179OperationContext.Current.IncomingMessageHeaders.RelatesTo, 189OperationContext.Current.IncomingMessageHeaders.MessageId.ToString());
System\ServiceModel\Discovery\Version11\DiscoveryInnerClientManaged11.cs (4)
131OperationContext.Current.IncomingMessageHeaders.RelatesTo, 138this.responseReceiver.PostFindCompletedAndRemove(OperationContext.Current.IncomingMessageHeaders.RelatesTo, false, null); 151OperationContext.Current.IncomingMessageHeaders.RelatesTo, 157this.responseReceiver.PostResolveCompletedAndRemove(OperationContext.Current.IncomingMessageHeaders.RelatesTo, false, null);
System\ServiceModel\Discovery\VersionApril2005\DiscoveryInnerClientApril2005.cs (4)
123OperationContext.Current.IncomingMessageHeaders.RelatesTo, 142OperationContext.Current.IncomingMessageHeaders.RelatesTo, 160OperationContext.Current.IncomingMessageHeaders.RelatesTo, 170OperationContext.Current.IncomingMessageHeaders.MessageId.ToString());
System\ServiceModel\Discovery\VersionCD1\DiscoveryInnerClientAdhocCD1.cs (6)
122OperationContext.Current.IncomingMessageHeaders.RelatesTo, 133OperationContext.Current.IncomingMessageHeaders.MessageId.ToString()); 151OperationContext.Current.IncomingMessageHeaders.RelatesTo, 161OperationContext.Current.IncomingMessageHeaders.MessageId.ToString()); 178OperationContext.Current.IncomingMessageHeaders.RelatesTo, 188OperationContext.Current.IncomingMessageHeaders.MessageId.ToString());
System\ServiceModel\Discovery\VersionCD1\DiscoveryInnerClientManagedCD1.cs (4)
131OperationContext.Current.IncomingMessageHeaders.RelatesTo, 138this.responseReceiver.PostFindCompletedAndRemove(OperationContext.Current.IncomingMessageHeaders.RelatesTo, false, null); 151OperationContext.Current.IncomingMessageHeaders.RelatesTo, 157this.responseReceiver.PostResolveCompletedAndRemove(OperationContext.Current.IncomingMessageHeaders.RelatesTo, false, null);
System.ServiceModel.Routing (14)
System\ServiceModel\Routing\MessageRpc.cs (3)
41public MessageRpc(Message message, OperationContext operationContext, bool impersonationRequired) 105public OperationContext OperationContext 251this.nullContextScope = new OperationContextScope((OperationContext)null);
System\ServiceModel\Routing\ProcessMessagesAsyncResult.cs (1)
52MessageRpc messageRpc = new MessageRpc(message, OperationContext.Current, this.channelExtension.ImpersonationRequired);
System\ServiceModel\Routing\ProcessRequestAsyncResult.cs (1)
32this.messageRpc = new MessageRpc(message, OperationContext.Current, service.ChannelExtension.ImpersonationRequired);
System\ServiceModel\Routing\RoutingEndpointTrait.cs (1)
11public RoutingEndpointTrait(Type routerContract, ServiceEndpoint endpoint, OperationContext operationContext)
System\ServiceModel\Routing\RoutingService.cs (6)
44OperationContext operationContext; 54this.operationContext = OperationContext.Current; 280TD.RoutingServiceProcessingFailure(this.eventTraceActivity, OperationContext.Current.Channel.LocalAddress.ToString(), exception); 297TD.RoutingServiceProcessingFailure(this.eventTraceActivity, OperationContext.Current.Channel.LocalAddress.ToString(), exception); 314TD.RoutingServiceProcessingFailure(this.eventTraceActivity, OperationContext.Current.Channel.LocalAddress.ToString(), exception); 331TD.RoutingServiceProcessingFailure(this.eventTraceActivity, OperationContext.Current.Channel.LocalAddress.ToString(), exception);
System\ServiceModel\Routing\SendOperation.cs (2)
21OperationContext operationContext; 24public SendOperation(IEnumerable<ServiceEndpoint> endpoints, Type routerContract, OperationContext operationContext)
System.ServiceModel.Web (40)
System\ServiceModel\Description\WebHttpBehavior.cs (2)
1318!OperationContext.Current.OutgoingMessageProperties.TryGetValue<JavascriptCallbackResponseMessageProperty>(JavascriptCallbackResponseMessageProperty.Name, out javascriptProperty)) 1332OperationContext.Current.OutgoingMessageProperties.Add(JavascriptCallbackResponseMessageProperty.Name, javascriptProperty);
System\ServiceModel\Dispatcher\ContentTypeSettingClientMessageFormatter.cs (2)
64if (OperationContext.Current != null && OperationContext.Current.HasOutgoingMessageProperties)
System\ServiceModel\Dispatcher\ContentTypeSettingDispatchMessageFormatter.cs (2)
56if (OperationContext.Current != null && OperationContext.Current.HasOutgoingMessageProperties)
System\ServiceModel\Dispatcher\FormatSelectingMessageInspector.cs (1)
67MessageProperties messageProperties = OperationContext.Current.IncomingMessageProperties;
System\ServiceModel\Dispatcher\HelpOperationInvoker.cs (1)
37UriTemplateMatch match = (UriTemplateMatch)OperationContext.Current.IncomingMessageProperties[IncomingWebRequestContext.UriTemplateMatchResultsPropertyName];
System\ServiceModel\Dispatcher\HelpPage.cs (2)
51Uri baseUri = UriTemplate.RewriteUri(OperationContext.Current.Channel.LocalAddress.Uri, WebOperationContext.Current.IncomingRequest.Headers[HttpRequestHeader.Host]); 73Uri baseUri = UriTemplate.RewriteUri(OperationContext.Current.Channel.LocalAddress.Uri, WebOperationContext.Current.IncomingRequest.Headers[HttpRequestHeader.Host]);
System\ServiceModel\Dispatcher\HttpUnhandledOperationInvoker.cs (4)
101OperationContext.Current.IncomingMessageHeaders.To))); 106OperationContext.Current.IncomingMessageHeaders.To)), TraceEventType.Warning); 114WebOperationContext.Current.IncomingRequest.Method, OperationContext.Current.IncomingMessageHeaders.To))); 119WebOperationContext.Current.IncomingRequest.Method, OperationContext.Current.IncomingMessageHeaders.To)), TraceEventType.Warning);
System\ServiceModel\Dispatcher\MultiplexingDispatchMessageFormatter.cs (2)
76if (OperationContext.Current != null) 78MessageProperties messageProperties = OperationContext.Current.IncomingMessageProperties;
System\ServiceModel\Dispatcher\UriTemplateClientFormatter.cs (2)
81bool userSetTheToOnOutgoingHeaders = (OperationContext.Current != null && OperationContext.Current.OutgoingMessageHeaders.To != null);
System\ServiceModel\Dispatcher\WebErrorHandler.cs (2)
62if (OperationContext.Current.IncomingMessageProperties.TryGetValue<string>(WebHttpDispatchOperationSelector.HttpOperationNamePropertyName, out operationName)) 94if (OperationContext.Current.OutgoingMessageProperties.TryGetValue<HttpResponseMessageProperty>(HttpResponseMessageProperty.Name, out property) &&
System\ServiceModel\Web\CachingParameterInspector.cs (3)
89OperationContext.Current.IncomingMessage.Version == MessageVersion.None) 117if (OperationContext.Current.ServiceSecurityContext == null) 123return OperationContext.Current.ServiceSecurityContext.IsAnonymous;
System\ServiceModel\Web\IncomingWebRequestContext.cs (2)
30OperationContext operationContext; 32internal IncomingWebRequestContext(OperationContext operationContext)
System\ServiceModel\Web\IncomingWebResponseContext.cs (2)
17OperationContext operationContext; 18internal IncomingWebResponseContext(OperationContext operationContext)
System\ServiceModel\Web\OutgoingWebRequestContext.cs (2)
16OperationContext operationContext; 17internal OutgoingWebRequestContext(OperationContext operationContext)
System\ServiceModel\Web\OutgoingWebResponseContext.cs (2)
25OperationContext operationContext; 26internal OutgoingWebResponseContext(OperationContext operationContext)
System\ServiceModel\Web\WebOperationContext.cs (9)
23public class WebOperationContext : IExtension<OperationContext> 31OperationContext operationContext; 33public WebOperationContext(OperationContext operationContext) 52if (OperationContext.Current == null) 56WebOperationContext existing = OperationContext.Current.Extensions.Find<WebOperationContext>(); 61return new WebOperationContext(OperationContext.Current); 85public void Attach(OperationContext owner) 89public void Detach(OperationContext owner) 346WebHttpDispatchOperationSelector selector = OperationContext.Current.EndpointDispatcher.DispatchRuntime.OperationSelector as WebHttpDispatchOperationSelector;
System.WorkflowServices (51)
System\ServiceModel\Activities\Description\WorkflowRuntimeEndpoint.cs (2)
48protected override Guid OnGetInstanceId(object[] inputs, OperationContext operationContext) 65protected override Bookmark OnResolveBookmark(object[] inputs, OperationContext operationContext, WorkflowHostingResponseContext responseContext, out object value)
System\ServiceModel\Dispatcher\DurableErrorHandler.cs (3)
21if (OperationContext.Current == null) 26DurableMessageDispatchInspector.SuppressContextOnReply(OperationContext.Current); 27OperationContext.Current.InstanceContext.IncomingChannels.Clear();
System\ServiceModel\Dispatcher\DurableMessageDispatchInspector.cs (2)
19public static void SuppressContextOnReply(OperationContext operationContext) 90DurableInstance durableInstance = OperationContext.Current.InstanceContext.Extensions.Find<DurableInstance>();
System\ServiceModel\Dispatcher\DurableOperationContext.cs (9)
38OperationContext operationContext = OperationContext.Current; 48OperationContext operationContext = OperationContext.Current; 63OperationContext operationContext = OperationContext.Current; 112class IsInOperation : IExtension<OperationContext> 114public void Attach(OperationContext owner) 118public void Detach(OperationContext owner)
System\ServiceModel\Dispatcher\DurableRuntimeValidator.cs (4)
42OperationContext.Current != null && 43OperationContext.Current.EndpointDispatcher != null && 44OperationContext.Current.EndpointDispatcher.DispatchRuntime != null, 48this.concurrencyMode = OperationContext.Current.EndpointDispatcher.DispatchRuntime.ConcurrencyMode;
System\ServiceModel\Dispatcher\ServiceDurableInstance.cs (7)
774OperationContext operationContext; 784this.operationContext = OperationContext.Current; 877OperationContext oldOperationContext = OperationContext.Current; 878OperationContext.Current = startResult.operationContext; 909OperationContext.Current = oldOperationContext; 946Fx.Assert(OperationContext.Current != null, "Operation context should not be null at this point.");
System\ServiceModel\Dispatcher\ServiceOperationInvoker.cs (2)
121OperationContext operationContext; 132this.operationContext = OperationContext.Current;
System\ServiceModel\Dispatcher\WorkflowOperationAsyncResult.cs (6)
289Fx.Assert(OperationContext.Current != null, "Called from non service thread"); 292if (OperationContext.Current.IncomingMessageProperties != null 293&& ContextMessageProperty.TryGet(OperationContext.Current.IncomingMessageProperties, out incomingContextProperties)) 305Fx.Assert(OperationContext.Current != null, "Called from non service thread"); 310if (!ContextMessageProperty.TryGet(OperationContext.Current.OutgoingMessageProperties, out context)) 312new ContextMessageProperty(this.outgoingContextProperties).AddOrReplaceInMessageProperties(OperationContext.Current.OutgoingMessageProperties);
System\ServiceModel\Dispatcher\WorkflowOperationInvoker.cs (2)
247Fx.Assert(OperationContext.Current != null, "Not in service dispatch thread"); 251if (!this.serviceAuthorizationManager.CheckAccess(OperationContext.Current))
System\ServiceModel\Dispatcher\WorkflowRequestContext.cs (9)
31OperationContext operationContext; 50this.operationContext = OperationContext.Current; 86if (OperationContext.Current == null) 91if (OperationContext.Current.ServiceSecurityContext != null) 93this.authorizationContext = OperationContext.Current.ServiceSecurityContext.AuthorizationContext; 147OperationContext.Current = this.operationContext; 175OperationContext current = OperationContext.Current; 176OperationContext.Current = this.operationContext;
System\Workflow\Activities\PrincipalPermissionServiceAuthorizationManager.cs (1)
21public override bool CheckAccess(OperationContext operationContext)
System\Workflow\Runtime\Hosting\ChannelManagerService.cs (4)
164Fx.Assert(OperationContext.Current != null, "Can be called within a valid OperationContext Scope"); 172new ContextMessageProperty(logicalChannel.Context).AddOrReplaceInMessageProperties(OperationContext.Current.OutgoingMessageProperties); 243Fx.Assert(OperationContext.Current != null, "Can be called from valid OperationContextScope"); 250MessageProperties properties = OperationContext.Current.IncomingMessageProperties;