12 writes to Current
System.ServiceModel.Primitives (12)
System\ServiceModel\Channels\ServiceChannelProxy.cs (6)
181OperationContext.Current = asyncResult.AsyncState as OperationContext; 185OperationContext.Current = originalOperationContext; 190OperationContext.Current = originalOperationContext; 221OperationContext.Current = asyncResult.AsyncState as OperationContext; 225OperationContext.Current = originalOperationContext; 230OperationContext.Current = originalOperationContext;
System\ServiceModel\Dispatcher\ChannelHandler.cs (2)
1118OperationContext.Current = currentOperationContext; 1145OperationContext.Current = existingOperationContext;
System\ServiceModel\Dispatcher\MessageRpc.cs (2)
423OperationContext.Current = OperationContext; 452OperationContext.Current = originalContext;
System\ServiceModel\OperationContextScope.cs (2)
58OperationContext.Current = _currentContext; 82OperationContext.Current = _originalContext;
81 references to Current
Binding.Http.IntegrationTests (6)
BasicHttpBindingTests.4.0.0.cs (2)
263OperationContext.Current.OutgoingMessageProperties.Add(HttpRequestMessageProperty.Name, httpReqMsgProp); 307OperationContext.Current.OutgoingMessageProperties.Add(HttpRequestMessageProperty.Name, httpReqMsgProp);
OperationContextTests.cs (4)
44Assert.Null(OperationContext.Current); 46Assert.NotNull(OperationContext.Current); 47var currentContext = OperationContext.Current; 51Assert.NotEqual(currentContext, OperationContext.Current);
Binding.ReliableSession.IntegrationTests (2)
NetHttpBindingTests.cs (1)
317OperationContext.Current.OutgoingMessageProperties.Add(HttpRequestMessageProperty.Name, httpRequestMessageProperty);
WSHttpBindingTests.cs (1)
317OperationContext.Current.OutgoingMessageProperties.Add(HttpRequestMessageProperty.Name, httpRequestMessageProperty);
Binding.Tcp.IntegrationTests (15)
OperationContextAsyncFlowTests.cs (15)
30Assert.Null(OperationContext.Current); 33Assert.NotNull(OperationContext.Current); 34var currentContext = OperationContext.Current; 38Assert.Equal(currentContext, OperationContext.Current); 65Assert.Null(OperationContext.Current); 68Assert.NotNull(OperationContext.Current); 69var firstContext = OperationContext.Current; 73Assert.Equal(firstContext, OperationContext.Current); 76Assert.NotEqual(firstContext, OperationContext.Current); 77var secondContext = OperationContext.Current; 81Assert.Equal(secondContext, OperationContext.Current); 83Assert.Equal(firstContext, OperationContext.Current); 85Assert.Null(OperationContext.Current); 159var opContext = OperationContext.Current; 164Assert.Equal(opContext, OperationContext.Current);
Client.ClientBase.IntegrationTests (6)
ClientBaseTests.4.0.0.cs (1)
783OperationContext.Current.OutgoingMessageHeaders.Add(header);
SessionTests.cs (5)
248var channel = OperationContext.Current.GetCallbackChannel<ISessionTestsDuplexService>(); 249var c = OperationContext.Current.Channel; 254OperationContext.Current.Channel.Closed += (sender, e) => 258OperationContext.Current.Channel.Closing += (sender, e) => 262OperationContext.Current.Channel.Faulted += (sender, e) =>
Contract.XmlSerializer.IntegrationTests (1)
XmlSerializerFormatTest.4.1.0.cs (1)
91OperationContext.Current.OutgoingMessageHeaders.Add(header);
dotnet-svcutil.xmlserializer.IntegrationTests (1)
src\System.Private.ServiceModel\tests\Scenarios\Contract\XmlSerializer\XmlSerializerFormatTest.4.1.0.cs (1)
91OperationContext.Current.OutgoingMessageHeaders.Add(header);
Security.TransportSecurity.IntegrationTests (12)
Http\ClientCredentialTypeTests.4.1.0.cs (6)
46if (!OperationContext.Current.OutgoingMessageProperties.ContainsKey(HttpRequestMessageProperty.Name)) 49OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = requestMessageProperty; 53requestMessageProperty = (HttpRequestMessageProperty)OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name]; 107if (!OperationContext.Current.OutgoingMessageProperties.ContainsKey(HttpRequestMessageProperty.Name)) 110OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = requestMessageProperty; 114requestMessageProperty = (HttpRequestMessageProperty)OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name];
Https\ClientCredentialTypeTests.4.1.0.cs (6)
61if (!OperationContext.Current.OutgoingMessageProperties.ContainsKey(HttpRequestMessageProperty.Name)) 64OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = requestMessageProperty; 68requestMessageProperty = (HttpRequestMessageProperty)OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name]; 136if (!OperationContext.Current.OutgoingMessageProperties.ContainsKey(HttpRequestMessageProperty.Name)) 139OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = requestMessageProperty; 143requestMessageProperty = (HttpRequestMessageProperty)OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name];
System.ServiceModel.Primitives (38)
System\ServiceModel\Channels\ServiceChannel.cs (5)
528OperationContext context = OperationContext.Current; 752ConcurrencyBehavior.UnlockInstanceBeforeCallout(OperationContext.Current); 773ConcurrencyBehavior.LockInstanceAfterCallout(OperationContext.Current); 968OperationContext operationContext = OperationContext.Current; 1703_operationContext = OperationContext.Current;
System\ServiceModel\Channels\ServiceChannelProxy.cs (4)
180OperationContext originalOperationContext = OperationContext.Current; 197IAsyncResult ar = ServiceChannel.BeginCall(channel, operation, inputParameters, new AsyncCallback(endCallDelegate), OperationContext.Current); 220OperationContext originalOperationContext = OperationContext.Current; 237IAsyncResult ar = ServiceChannel.BeginCall(channel, operation, inputParameters, new AsyncCallback(endCallDelegate), OperationContext.Current);
System\ServiceModel\Diagnostics\TraceUtility.cs (11)
194context = OperationContext.Current; 290if (OperationContext.Current != null && activity != null) 292OperationContext.Current.OutgoingMessageProperties[TraceUtility.AsyncOperationActivityKey] = activity; 299if (OperationContext.Current != null && OperationContext.Current.OutgoingMessageProperties.TryGetValue(TraceUtility.AsyncOperationActivityKey, out data)) 301OperationContext.Current.OutgoingMessageProperties.Remove(TraceUtility.AsyncOperationActivityKey); 308if (OperationContext.Current != null) 310OperationContext.Current.OutgoingMessageProperties[TraceUtility.AsyncOperationStartTimeKey] = new EventTraceActivityTimeProperty(eventTraceActivity, startTime); 319if (OperationContext.Current != null && OperationContext.Current.OutgoingMessageProperties.TryGetValue(TraceUtility.AsyncOperationStartTimeKey, out data)) 321OperationContext.Current.OutgoingMessageProperties.Remove(TraceUtility.AsyncOperationStartTimeKey);
System\ServiceModel\Dispatcher\ChannelHandler.cs (1)
1114OperationContext existingOperationContext = OperationContext.Current;
System\ServiceModel\Dispatcher\DispatchRuntime.cs (4)
372ServiceChannel serviceChannel = OperationContext.Current.InternalServiceChannel; 373OperationContext.Current.OperationCompleted += 401OperationContext.Current.RequestContext.Close(); 402OperationContext.Current.RequestContext = null;
System\ServiceModel\Dispatcher\MessageRpc.cs (1)
411originalContext = OperationContext.Current;
System\ServiceModel\Dispatcher\SyncMethodInvoker.cs (4)
99OperationContext context = OperationContext.Current; 118Guid activityId = TraceUtility.GetReceivedActivityId(OperationContext.Current); 127Guid activityId = ActivityIdHeader.ExtractActivityId(OperationContext.Current.IncomingMessage); 142WcfEventSource.Instance.OperationInvoked(eventTraceActivity, MethodName, TraceUtility.GetCallerInfo(OperationContext.Current));
System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (4)
161OperationContext context = OperationContext.Current; 180Guid activityId = TraceUtility.GetReceivedActivityId(OperationContext.Current); 189Guid activityId = ActivityIdHeader.ExtractActivityId(OperationContext.Current.IncomingMessage); 207TraceUtility.GetCallerInfo(OperationContext.Current));
System\ServiceModel\OperationContextScope.cs (2)
24private readonly OperationContext _originalContext = OperationContext.Current; 68if (OperationContext.Current != _currentContext)
System\ServiceModel\Security\IdentityVerifier.cs (2)
221eventTraceActivity = EventTraceActivityHelper.TryExtractActivity((OperationContext.Current != null) ? OperationContext.Current.IncomingMessage : null);