internal bool AcquireCall(ChannelHandler channel) { lock (this.ThisLock) { return(this.PrivateAcquireCall(channel)); } }
//Called from RPC.DisposeRequestContext for sucessful invoke. //Mode is RCBA.ManualAcknowledgement = false. public IAsyncResult BeginComplete(TimeSpan timeout, Transaction transaction, ChannelHandler channelHandler, AsyncCallback callback, object state) { IAsyncResult result = null; if (transaction != null) { using (TransactionScope scope = new TransactionScope(transaction)) { TransactionOutcomeListener.EnsureReceiveContextAbandonOnTransactionRollback(this.receiveContext, transaction, channelHandler); result = this.receiveContext.BeginComplete( timeout, callback, state); scope.Complete(); } } else { result = this.receiveContext.BeginComplete( timeout, callback, state); } return(result); }
private void Dispatch() { ListenerChannel channel = _channel; SessionIdleManager idleManager = _idleManager; _channel = null; _idleManager = null; try { if (channel != null) { ChannelHandler handler = new ChannelHandler(_listenerBinder.MessageVersion, channel.Binder, this, idleManager); if (!channel.Binder.HasSession) { _channelDispatcher.Channels.Add(channel.Binder.Channel); } if (channel.Binder is DuplexChannelBinder) { DuplexChannelBinder duplexChannelBinder = channel.Binder as DuplexChannelBinder; duplexChannelBinder.ChannelHandler = handler; duplexChannelBinder.DefaultCloseTimeout = this.DefaultCloseTimeout; if (_timeouts == null) { duplexChannelBinder.DefaultSendTimeout = ServiceDefaults.SendTimeout; } else { duplexChannelBinder.DefaultSendTimeout = _timeouts.SendTimeout; } } ChannelHandler.Register(handler); channel = null; idleManager = null; } } catch (Exception e) { if (Fx.IsFatal(e)) { throw; } this.HandleError(e); } finally { if (channel != null) { channel.Binder.Channel.Abort(); if (idleManager != null) { idleManager.CancelTimer(); } } } }
internal void EnsureReceive() { using (ServiceModelActivity.BoundOperation(this.Activity)) { ChannelHandler.Register(this.channelHandler); } }
internal bool AcquireCall(ChannelHandler channel) { lock (this.ThisLock) { return this.PrivateAcquireCall(channel); } }
public AcknowledgementCompleteAsyncResult( ReceiveContext receiveContext, TimeSpan timeout, ref MessageRpc rpc, Transaction transaction, AsyncCallback callback, object state) : base(callback, state) { this.receiveContext = receiveContext; this.currentTransaction = transaction; this.channelHandler = rpc.channelHandler; this.resumableRPC = rpc.Pause(); bool completeThrew = true; try { bool completed = this.Complete(timeout); completeThrew = false; if (completed) { this.resumableRPC = null; rpc.UnPause(); this.Complete(true); } } finally { if (completeThrew) { rpc.UnPause(); } } }
private void Dispatch() { ListenerChannel channel = this.channel; ServiceChannel.SessionIdleManager idleManager = this.idleManager; this.channel = null; this.idleManager = null; try { if (channel != null) { ChannelHandler handler = new ChannelHandler(this.listenerBinder.MessageVersion, channel.Binder, this.throttle, this, channel.Throttle != null, this.wrappedTransaction, idleManager); if (!channel.Binder.HasSession) { this.channelDispatcher.Channels.Add(channel.Binder.Channel); } if (channel.Binder is DuplexChannelBinder) { DuplexChannelBinder binder = channel.Binder as DuplexChannelBinder; binder.ChannelHandler = handler; binder.DefaultCloseTimeout = this.DefaultCloseTimeout; if (this.timeouts == null) { binder.DefaultSendTimeout = ServiceDefaults.SendTimeout; } else { binder.DefaultSendTimeout = this.timeouts.SendTimeout; } } ChannelHandler.Register(handler); channel = null; idleManager = null; } } catch (Exception exception) { if (Fx.IsFatal(exception)) { throw; } this.HandleError(exception); } finally { if (channel != null) { channel.Binder.Channel.Abort(); if ((this.throttle != null) && this.channelDispatcher.Session) { this.throttle.DeactivateChannel(); } if (idleManager != null) { idleManager.CancelTimer(); } } } }
private bool PrivateAcquireCall(ChannelHandler channel) { if (this.calls != null) { return(this.calls.Acquire(channel)); } return(true); }
public void NotifyInvokeReceived() { using (ServiceModelActivity.BoundOperation(this.activity)) { ChannelHandler.Register(this.handler); } this.DidInvokerEnsurePump = true; }
public void NotifyInvokeReceived(RequestContext request) { using (ServiceModelActivity.BoundOperation(_activity)) { ChannelHandler.Register(_handler, request); } this.DidInvokerEnsurePump = true; }
private bool PrivateAcquireDynamic(ChannelHandler channel) { if (this.dynamic != null) { return(this.dynamic.Acquire(channel)); } return(true); }
private bool PrivateAcquireInstanceContext(ChannelHandler channel) { if ((this.instanceContexts != null) && (channel.InstanceContext == null)) { channel.InstanceContextServiceThrottle = this; return(this.instanceContexts.Acquire(channel)); } return(true); }
private void GotCall(object state) { ChannelHandler handler = (ChannelHandler)state; lock (this.ThisLock) { handler.ThrottleAcquiredForCall(); } }
void GotCall(object state) { ChannelHandler channel = (ChannelHandler)state; lock (this.ThisLock) { channel.ThrottleAcquiredForCall(); } }
internal static void Register(ChannelHandler handler, RequestContext request) { BufferedReceiveBinder bufferedBinder = handler.Binder as BufferedReceiveBinder; Fx.Assert(bufferedBinder != null, "ChannelHandler.Binder is not a BufferedReceiveBinder"); bufferedBinder.InjectRequest(request); handler.Register(); }
public RequestInfo(ChannelHandler channelHandler) { this.Endpoint = null; this.ExistingInstanceContext = null; this.Channel = null; this.EndpointLookupDone = false; this.DispatchRuntime = null; this.RequestContext = null; this.ChannelHandler = channelHandler; }
private static void OnStartSyncMessagePump(object state) { ChannelHandler handler = state as ChannelHandler; if (WcfEventSource.Instance.ChannelReceiveStopIsEnabled()) { WcfEventSource.Instance.ChannelReceiveStop(handler.EventTraceActivity, state.GetHashCode()); } handler.SyncMessagePump(); }
public RequestInfo(ChannelHandler channelHandler) { Endpoint = null; ExistingInstanceContext = null; Channel = null; EndpointLookupDone = false; DispatchRuntime = null; RequestContext = null; ChannelHandler = channelHandler; }
internal bool AcquireInstanceContextAndDynamic(ChannelHandler channel, bool acquireInstanceContextThrottle) { lock (this.ThisLock) { if (!acquireInstanceContextThrottle) { return(this.PrivateAcquireDynamic(channel)); } return(this.PrivateAcquireInstanceContext(channel) && this.PrivateAcquireDynamic(channel)); } }
internal bool AcquireInstanceContextAndDynamic(ChannelHandler channel, bool acquireInstanceContextThrottle) { lock (this.ThisLock) { if (!acquireInstanceContextThrottle) { return this.PrivateAcquireDynamic(channel); } return (this.PrivateAcquireInstanceContext(channel) && this.PrivateAcquireDynamic(channel)); } }
void GotInstanceContext(object state) { ChannelHandler channel = (ChannelHandler)state; lock (this.ThisLock) { if (this.PrivateAcquireDynamic(channel)) { channel.ThrottleAcquired(); } } }
internal void DispatchStarted() { lock (this.thisLock) { this.currentConcurrentDispatches++; if ((this.currentConcurrentDispatches == this.currentConcurrentBatches) && (this.currentConcurrentBatches < this.maxConcurrentBatches)) { TransactedBatchContext context = new TransactedBatchContext(this); this.currentConcurrentBatches++; ChannelHandler handler = new ChannelHandler(this.handler, context); ChannelHandler.Register(handler); } } }
internal SharedTransactedBatchContext(ChannelHandler handler, ChannelDispatcher dispatcher, int maxConcurrentBatches) { this.handler = handler; this.maxBatchSize = dispatcher.MaxTransactedBatchSize; this.maxConcurrentBatches = maxConcurrentBatches; this.currentBatchSize = dispatcher.MaxTransactedBatchSize; this.currentConcurrentBatches = 0; this.currentConcurrentDispatches = 0; this.successfullCommits = 0; this.isBatching = true; this.isolationLevel = dispatcher.TransactionIsolationLevel; this.txTimeout = TransactionBehavior.NormalizeTimeout(dispatcher.TransactionTimeout); this.BatchingStateChanged(this.isBatching); }
internal SharedTransactedBatchContext(ChannelHandler handler, ChannelDispatcher dispatcher, int maxConcurrentBatches) { this.handler = handler; this.maxBatchSize = dispatcher.MaxTransactedBatchSize; this.maxConcurrentBatches = maxConcurrentBatches; this.currentBatchSize = dispatcher.MaxTransactedBatchSize; this.currentConcurrentBatches = 0; this.currentConcurrentDispatches = 0; this.successfullCommits = 0; this.isBatching = true; this.isolationLevel = dispatcher.TransactionIsolationLevel; this.txTimeout = TransactionBehavior.NormalizeTimeout(dispatcher.TransactionTimeout); BatchingStateChanged(this.isBatching); }
internal void DispatchStarted() { lock (thisLock) { ++this.currentConcurrentDispatches; if (this.currentConcurrentDispatches == this.currentConcurrentBatches && this.currentConcurrentBatches < this.maxConcurrentBatches) { TransactedBatchContext context = new TransactedBatchContext(this); ++this.currentConcurrentBatches; ChannelHandler newHandler = new ChannelHandler(this.handler, context); ChannelHandler.Register(newHandler); } } }
public IAsyncResult BeginComplete(TimeSpan timeout, Transaction transaction, ChannelHandler channelHandler, AsyncCallback callback, object state) { IAsyncResult result = null; if (transaction != null) { using (TransactionScope scope = new TransactionScope(transaction)) { TransactionOutcomeListener.EnsureReceiveContextAbandonOnTransactionRollback(this.receiveContext, transaction, channelHandler); result = this.receiveContext.BeginComplete(timeout, callback, state); scope.Complete(); return result; } } return this.receiveContext.BeginComplete(timeout, callback, state); }
internal ChannelHandler(ChannelHandler handler, TransactedBatchContext context) { this.messageVersion = handler.messageVersion; this.isManualAddressing = handler.isManualAddressing; this.binder = handler.binder; this.listener = handler.listener; this.wasChannelThrottled = handler.wasChannelThrottled; this.host = handler.host; this.receiveSynchronously = true; this.receiveWithTransaction = true; this.duplexBinder = handler.duplexBinder; this.hasSession = handler.hasSession; this.isConcurrent = handler.isConcurrent; this.receiver = handler.receiver; this.sharedTransactedBatchContext = context.Shared; this.transactedBatchContext = context; this.requestInfo = new RequestInfo(this); }
private static void OnAsyncReplyComplete(IAsyncResult result) { if (result.CompletedSynchronously) { return; } try { var state = (ContinuationState)result.AsyncState; ChannelHandler.AsyncReplyComplete(result, state); } catch (Exception e) { if (Fx.IsFatal(e)) { throw; } } }
internal static void Register(ChannelHandler handler) { handler.Register(); }
public TransactionOutcomeListener(ReceiveContext receiveContext, Transaction transaction, ChannelHandler handler) { this.receiveContext = receiveContext; transaction.TransactionCompleted += new TransactionCompletedEventHandler(this.OnTransactionComplete); this.channelHandler = handler; }
private void ProvideFaultAndReplyFailure(RequestContext request, Exception exception, ref ErrorHandlerFaultInfo faultInfo, out bool replied, out bool replySentAsync) { replied = false; replySentAsync = false; bool requestMessageIsFault = false; try { requestMessageIsFault = request.RequestMessage.IsFault; } #pragma warning suppress 56500 // covered by FxCOP catch (Exception e) { if (Fx.IsFatal(e)) { throw; } // do not propagate non-fatal exceptions } bool enableFaults = false; if (_listener != null) { enableFaults = _listener.ChannelDispatcher.EnableFaults; } else if (_channel != null && _channel.IsClient) { enableFaults = _channel.ClientRuntime.EnableFaults; } if ((!requestMessageIsFault) && enableFaults) { this.ProvideFault(exception, ref faultInfo); if (faultInfo.Fault != null) { Message reply = faultInfo.Fault; try { try { if (this.PrepareReply(request, reply)) { if (_sendAsynchronously) { var state = new ContinuationState { ChannelHandler = this, Channel = _channel, Exception = exception, FaultInfo = faultInfo, Request = request, Reply = reply }; var result = request.BeginReply(reply, ChannelHandler.s_onAsyncReplyComplete, state); if (result.CompletedSynchronously) { ChannelHandler.AsyncReplyComplete(result, state); replied = true; } else { replySentAsync = true; } } else { request.Reply(reply); replied = true; } } } finally { if (!replySentAsync) { reply.Close(); } } } #pragma warning suppress 56500 // covered by FxCOP catch (Exception e) { if (Fx.IsFatal(e)) { throw; } this.HandleError(e); } } } }
private bool PrivateAcquireDynamic(ChannelHandler channel) { if (this.dynamic != null) { return this.dynamic.Acquire(channel); } return true; }
internal MessageRpc(System.ServiceModel.Channels.RequestContext requestContext, Message request, DispatchOperationRuntime operation, ServiceChannel channel, ServiceHostBase host, ChannelHandler channelHandler, bool cleanThread, System.ServiceModel.OperationContext operationContext, System.ServiceModel.InstanceContext instanceContext) { this.Activity = null; this.AsyncResult = null; this.CanSendReply = true; this.Channel = channel; this.channelHandler = channelHandler; this.Correlation = EmptyArray.Allocate(operation.Parent.CorrelationCount); this.CorrelationCallback = null; this.DidDeserializeRequestBody = false; this.TransactionMessageProperty = null; this.TransactedBatchContext = null; this.Error = null; this.ErrorProcessor = null; this.FaultInfo = new ErrorHandlerFaultInfo(request.Version.Addressing.DefaultFaultAction); this.HasSecurityContext = false; this.Host = host; this.Instance = null; this.MessageRpcOwnsInstanceContextThrottle = false; this.NextProcessor = null; this.NotUnderstoodHeaders = null; this.Operation = operation; this.OperationContext = operationContext; this.paused = false; this.ParametersDisposed = false; this.ReceiveContext = null; this.Request = request; this.RequestContext = requestContext; this.RequestContextThrewOnReply = false; this.SuccessfullySendReply = false; this.RequestVersion = request.Version; this.Reply = null; this.ReplyTimeoutHelper = new TimeoutHelper(); this.SecurityContext = null; this.InstanceContext = instanceContext; this.SuccessfullyBoundInstance = false; this.SuccessfullyIncrementedActivity = false; this.SuccessfullyLockedInstance = false; this.switchedThreads = !cleanThread; this.transaction = null; this.InputParameters = null; this.OutputParameters = null; this.ReturnParameter = null; this.isInstanceContextSingleton = InstanceContextProviderBase.IsProviderSingleton(this.Channel.DispatchRuntime.InstanceContextProvider); this.invokeContinueGate = null; if (!operation.IsOneWay && !operation.Parent.ManualAddressing) { this.RequestID = request.Headers.MessageId; this.ReplyToInfo = new System.ServiceModel.Channels.RequestReplyCorrelator.ReplyToInfo(request); } else { this.RequestID = null; this.ReplyToInfo = new System.ServiceModel.Channels.RequestReplyCorrelator.ReplyToInfo(); } this.HostingProperty = AspNetEnvironment.Current.PrepareMessageForDispatch(request); if (DiagnosticUtility.ShouldUseActivity) { this.Activity = TraceUtility.ExtractActivity(this.Request); } if (DiagnosticUtility.ShouldUseActivity || TraceUtility.ShouldPropagateActivity) { this.ResponseActivityId = ActivityIdHeader.ExtractActivityId(this.Request); } else { this.ResponseActivityId = Guid.Empty; } this.InvokeNotification = new MessageRpcInvokeNotification(this.Activity, this.channelHandler); }
internal MessageRpc(RequestContext requestContext, Message request, DispatchOperationRuntime operation, ServiceChannel channel, ServiceHostBase host, ChannelHandler channelHandler, bool cleanThread, OperationContext operationContext, InstanceContext instanceContext, EventTraceActivity eventTraceActivity) { Fx.Assert((operationContext != null), "System.ServiceModel.Dispatcher.MessageRpc.MessageRpc(), operationContext == null"); Fx.Assert(channelHandler != null, "System.ServiceModel.Dispatcher.MessageRpc.MessageRpc(), channelHandler == null"); this.Activity = null; this.EventTraceActivity = eventTraceActivity; this.AsyncResult = null; this.CanSendReply = true; this.Channel = channel; this.channelHandler = channelHandler; this.Correlation = EmptyArray.Allocate(operation.Parent.CorrelationCount); this.CorrelationCallback = null; this.DidDeserializeRequestBody = false; this.TransactionMessageProperty = null; this.TransactedBatchContext = null; this.Error = null; this.ErrorProcessor = null; this.FaultInfo = new ErrorHandlerFaultInfo(request.Version.Addressing.DefaultFaultAction); this.HasSecurityContext = false; this.Host = host; this.Instance = null; this.MessageRpcOwnsInstanceContextThrottle = false; this.NextProcessor = null; this.NotUnderstoodHeaders = null; this.Operation = operation; this.OperationContext = operationContext; this.paused = false; this.ParametersDisposed = false; this.ReceiveContext = null; this.Request = request; this.RequestContext = requestContext; this.RequestContextThrewOnReply = false; this.SuccessfullySendReply = false; this.RequestVersion = request.Version; this.Reply = null; this.ReplyTimeoutHelper = new TimeoutHelper(); this.SecurityContext = null; this.InstanceContext = instanceContext; this.SuccessfullyBoundInstance = false; this.SuccessfullyIncrementedActivity = false; this.SuccessfullyLockedInstance = false; this.switchedThreads = !cleanThread; this.transaction = null; this.InputParameters = null; this.OutputParameters = null; this.ReturnParameter = null; this.isInstanceContextSingleton = InstanceContextProviderBase.IsProviderSingleton(this.Channel.DispatchRuntime.InstanceContextProvider); this.invokeContinueGate = null; if (!operation.IsOneWay && !operation.Parent.ManualAddressing) { this.RequestID = request.Headers.MessageId; this.ReplyToInfo = new RequestReplyCorrelator.ReplyToInfo(request); } else { this.RequestID = null; this.ReplyToInfo = new RequestReplyCorrelator.ReplyToInfo(); } this.HostingProperty = AspNetEnvironment.Current.GetHostingProperty(request, true); if (DiagnosticUtility.ShouldUseActivity) { this.Activity = TraceUtility.ExtractActivity(this.Request); } if (DiagnosticUtility.ShouldUseActivity || TraceUtility.ShouldPropagateActivity) { this.ResponseActivityId = ActivityIdHeader.ExtractActivityId(this.Request); } else { this.ResponseActivityId = Guid.Empty; } this.InvokeNotification = new MessageRpcInvokeNotification(this.Activity, this.channelHandler); if (this.EventTraceActivity == null && FxTrace.Trace.IsEnd2EndActivityTracingEnabled) { if (this.Request != null) { this.EventTraceActivity = EventTraceActivityHelper.TryExtractActivity(this.Request, true); } } }
private void Dispatch() { ListenerChannel channel = _channel; SessionIdleManager idleManager = _idleManager; _channel = null; _idleManager = null; try { if (channel != null) { ChannelHandler handler = new ChannelHandler(_listenerBinder.MessageVersion, channel.Binder, this, idleManager); if (!channel.Binder.HasSession) { _channelDispatcher.Channels.Add(channel.Binder.Channel); } if (channel.Binder is DuplexChannelBinder) { DuplexChannelBinder duplexChannelBinder = channel.Binder as DuplexChannelBinder; duplexChannelBinder.ChannelHandler = handler; duplexChannelBinder.DefaultCloseTimeout = this.DefaultCloseTimeout; if (_timeouts == null) duplexChannelBinder.DefaultSendTimeout = ServiceDefaults.SendTimeout; else duplexChannelBinder.DefaultSendTimeout = _timeouts.SendTimeout; } ChannelHandler.Register(handler); channel = null; idleManager = null; } } catch (Exception e) { if (Fx.IsFatal(e)) { throw; } this.HandleError(e); } finally { if (channel != null) { channel.Binder.Channel.Abort(); if (idleManager != null) { idleManager.CancelTimer(); } } } }
internal static void Register(ChannelHandler handler, RequestContext request) { (handler.Binder as BufferedReceiveBinder).InjectRequest(request); handler.Register(); }
internal ChannelHandler(ChannelHandler handler, TransactedBatchContext context) { this.messageVersion = handler.messageVersion; this.isManualAddressing = handler.isManualAddressing; this.binder = handler.binder; this.listener = handler.listener; this.wasChannelThrottled = handler.wasChannelThrottled; this.host = handler.host; this.receiveSynchronously = true; this.receiveWithTransaction = true; this.duplexBinder = handler.duplexBinder; this.hasSession = handler.hasSession; this.isConcurrent = handler.isConcurrent; this.receiver = handler.receiver; this.sharedTransactedBatchContext = context.Shared; this.transactedBatchContext = context; this.requestInfo = new RequestInfo(this); this.sendAsynchronously = handler.sendAsynchronously; this.sessionOpenNotification = handler.sessionOpenNotification; this.needToCreateSessionOpenNotificationMessage = handler.needToCreateSessionOpenNotificationMessage; this.shouldRejectMessageWithOnOpenActionHeader = handler.shouldRejectMessageWithOnOpenActionHeader; }
public static void EnsureReceiveContextAbandonOnTransactionRollback(ReceiveContext receiveContext, Transaction transaction, ChannelHandler channelHandler) { new TransactionOutcomeListener(receiveContext, transaction, channelHandler); }
public bool ChannelHandlerOwnsInstanceContextThrottle; // if true, we are responsible for instance/dynamic throttle public RequestInfo(ChannelHandler channelHandler) { this.Endpoint = null; this.ExistingInstanceContext = null; this.Channel = null; this.EndpointLookupDone = false; this.DispatchRuntime = null; this.RequestContext = null; this.ChannelHandler = channelHandler; this.ChannelHandlerOwnsCallThrottle = false; this.ChannelHandlerOwnsInstanceContextThrottle = false; }
public MessageRpcInvokeNotification(ServiceModelActivity activity, ChannelHandler handler) { _activity = activity; _handler = handler; }
bool PrivateAcquireCall(ChannelHandler channel) { return (this.calls == null) || this.calls.Acquire(channel); }
internal MessageRpc(RequestContext requestContext, Message request, DispatchOperationRuntime operation, ServiceChannel channel, ChannelHandler channelHandler, bool cleanThread, OperationContext operationContext, InstanceContext instanceContext, EventTraceActivity eventTraceActivity) { Fx.Assert((operationContext != null), "System.ServiceModel.Dispatcher.MessageRpc.MessageRpc(), operationContext == null"); Fx.Assert(channelHandler != null, "System.ServiceModel.Dispatcher.MessageRpc.MessageRpc(), channelHandler == null"); this.Activity = null; this.EventTraceActivity = eventTraceActivity; this.AsyncResult = null; this.CanSendReply = true; this.Channel = channel; this.channelHandler = channelHandler; this.Correlation = EmptyArray <object> .Allocate(operation.Parent.CorrelationCount); this.DidDeserializeRequestBody = false; this.Error = null; this.ErrorProcessor = null; this.FaultInfo = new ErrorHandlerFaultInfo(request.Version.Addressing.DefaultFaultAction); this.HasSecurityContext = false; this.Instance = null; this.MessageRpcOwnsInstanceContextThrottle = false; this.NextProcessor = null; this.NotUnderstoodHeaders = null; this.Operation = operation; this.OperationContext = operationContext; _paused = false; this.ParametersDisposed = false; this.Request = request; this.RequestContext = requestContext; this.RequestContextThrewOnReply = false; this.SuccessfullySendReply = false; this.RequestVersion = request.Version; this.Reply = null; this.ReplyTimeoutHelper = new TimeoutHelper(); this.SecurityContext = null; this.InstanceContext = instanceContext; this.SuccessfullyBoundInstance = false; this.SuccessfullyIncrementedActivity = false; this.SuccessfullyLockedInstance = false; _switchedThreads = !cleanThread; this.InputParameters = null; this.OutputParameters = null; this.ReturnParameter = null; _isInstanceContextSingleton = false; _invokeContinueGate = null; if (!operation.IsOneWay && !operation.Parent.ManualAddressing) { this.RequestID = request.Headers.MessageId; this.ReplyToInfo = new RequestReplyCorrelator.ReplyToInfo(request); } else { this.RequestID = null; this.ReplyToInfo = new RequestReplyCorrelator.ReplyToInfo(); } if (DiagnosticUtility.ShouldUseActivity) { this.Activity = TraceUtility.ExtractActivity(this.Request); } if (DiagnosticUtility.ShouldUseActivity || TraceUtility.ShouldPropagateActivity) { this.ResponseActivityId = ActivityIdHeader.ExtractActivityId(this.Request); } else { this.ResponseActivityId = Guid.Empty; } this.InvokeNotification = new MessageRpcInvokeNotification(this.Activity, this.channelHandler); if (this.EventTraceActivity == null && FxTrace.Trace.IsEnd2EndActivityTracingEnabled) { if (this.Request != null) { this.EventTraceActivity = EventTraceActivityHelper.TryExtractActivity(this.Request, true); } } }
bool PrivateAcquireDynamic(ChannelHandler channel) { return (this.dynamic == null) || this.dynamic.Acquire(channel); }
public MessageRpcInvokeNotification(ServiceModelActivity activity, ChannelHandler handler) { this.activity = activity; this.handler = handler; }
bool PrivateAcquireInstanceContext(ChannelHandler channel) { if ((this.instanceContexts != null) && (channel.InstanceContext == null)) { channel.InstanceContextServiceThrottle = this; return this.instanceContexts.Acquire(channel); } else { return true; } }
private bool PrivateAcquireCall(ChannelHandler channel) { if (this.calls != null) { return this.calls.Acquire(channel); } return true; }