public HttpCookieSessionChannelFactory(
     HttpCookieSessionBindingElement bindingElement, BindingContext context)
     : base(context.Binding)
 {
     this.exchangeTerminateMessage = bindingElement.ExchangeTerminateMessage;
     this.innerChannelFactory      = context.BuildInnerChannelFactory <IRequestChannel>();
 }
Пример #2
0
        protected override void InitializeFrom(BindingElement bindingElement)
        {
            base.InitializeFrom(bindingElement);

            HttpCookieSessionBindingElement httpCookieBindingElement = (HttpCookieSessionBindingElement)bindingElement;

            this.SessionTimeout           = httpCookieBindingElement.SessionTimeout;
            this.ExchangeTerminateMessage = httpCookieBindingElement.ExchangeTerminateMessage;
        }
Пример #3
0
        protected override BindingElement CreateBindingElement()
        {
            HttpCookieSessionBindingElement bindingElement =
                new HttpCookieSessionBindingElement();

            bindingElement.ExchangeTerminateMessage = exchangeTerminateMessage;
            bindingElement.SessionTimeout           = sessionTimeout;
            ApplyConfiguration(bindingElement);

            return(bindingElement);
        }
        public HttpCookieSessionBinding()
            : base()
        {
            sessionElement = new HttpCookieSessionBindingElement();

            transportElement = new HttpTransportBindingElement();
            transportElement.AllowCookies = true;

            encodingElement = new TextMessageEncodingBindingElement();
            encodingElement.MessageVersion = MessageVersion.Soap11WSAddressing10;
        }
Пример #5
0
        public override void ApplyConfiguration(BindingElement bindingElement)
        {
            base.ApplyConfiguration(bindingElement);

            HttpCookieSessionBindingElement typedBindingElement =
                (HttpCookieSessionBindingElement)bindingElement;

            this.sessionTimeout = typedBindingElement.SessionTimeout;

            this.exchangeTerminateMessage =
                typedBindingElement.ExchangeTerminateMessage;
        }
 public HttpCookieReplySessionChannelListener(
     HttpCookieSessionBindingElement bindingElement, BindingContext context)
     : base(context.Binding)
 {
     this.innerChannelListener     = context.BuildInnerChannelListener <IReplyChannel>();;
     this.sessionTimeout           = bindingElement.SessionTimeout;
     this.exchangeTerminateMessage = bindingElement.ExchangeTerminateMessage;
     this.channelMapping           = new Dictionary <string, HttpCookieReplySessionChannel>();
     this.channelQueue             = new InputQueue <IReplySessionChannel>();
     this.onReceiveRequest         = new AsyncCallback(OnReceiveRequest);
     this.onInnerChannelClosed     = new EventHandler(OnInnerChannelClosed);
     this.onItemDequeued           = new ItemDequeuedCallback(OnItemDequeued);
 }
        void IPolicyImportExtension.ImportPolicy(MetadataImporter importer,
                                                 PolicyConversionContext context)
        {
            foreach (XmlElement assertion in context.GetBindingAssertions())
            {
                if (assertion.Name == HttpCookiePolicyStrings.HttpCookiePolicyElement &&
                    assertion.NamespaceURI == HttpCookiePolicyStrings.Namespace)
                {
                    HttpCookieSessionBindingElement bindingElement =
                        new HttpCookieSessionBindingElement();

                    XmlAttribute attribute =
                        assertion.Attributes[HttpCookiePolicyStrings.ExchangeTerminateAttribute];

                    if (attribute != null)
                    {
                        bindingElement.ExchangeTerminateMessage = true;
                    }

                    context.BindingElements.Add(bindingElement);
                    break;
                }
            }
        }
Пример #8
0
 protected HttpCookieSessionBindingElement(HttpCookieSessionBindingElement other)
     : base(other)
 {
     sessionTimeout           = other.sessionTimeout;
     exchangeTerminateMessage = other.exchangeTerminateMessage;
 }