Exemple #1
0
 public RedirectContainerSessionChannel(RedirectBindingElement.RedirectContainerChannelFactory <IRequestSessionChannel> factory, EndpointAddress address, Uri via) : base(factory)
 {
     this.innerFactory   = factory.innerFactory;
     this.bindingElement = factory.BindingElement;
     this.RemoteAddress  = address;
     this.Via            = via;
     this.entityMap      = new ConcurrentDictionary <RedirectBindingElement.RedirectContainerChannelFactory <TChannel> .RedirectContainerSessionChannel.EntityLinkKey, RedirectBindingElement.RedirectContainerChannelFactory <TChannel> .RedirectContainerSessionChannel.EntityLinkValue>();
     this.primaryChannel = this.innerFactory.CreateChannel(address, via);
     RedirectBindingElement.RedirectContainerChannelFactory <TChannel> .RedirectContainerSessionChannel.OutputSession outputSession = new RedirectBindingElement.RedirectContainerChannelFactory <TChannel> .RedirectContainerSessionChannel.OutputSession()
     {
         Id = this.primaryChannel.Session.Id
     };
     this.Session = outputSession;
     this.onCorrelatorNotifyCleanup        = new EventHandler(this.OnCorrelatorNotifyCleanup);
     this.correlatorManager                = new ContainerChannelManager(true, this.bindingElement.UseSslStreamSecurity, this.bindingElement.IncludeExceptionDetails, this.bindingElement.EndpointIdentity);
     this.correlatorManager.NotifyCleanup += new EventHandler(this.OnCorrelatorNotifyCleanup);
 }
Exemple #2
0
        private static void UnloadCallback(IAsyncResult result)
        {
            ContainerChannelManager asyncState = (ContainerChannelManager)result.AsyncState;

            try
            {
                asyncState.EndUnloadInstance(result);
            }
            catch (Exception exception1)
            {
                Exception exception = exception1;
                if (Fx.IsFatal(exception))
                {
                    throw;
                }
                MessagingClientEtwProvider.TraceClient(() => MessagingClientEtwProvider.Provider.EventWriteExceptionAsWarning(exception.ToString()));
            }
        }