Exemple #1
0
        public void RemainingBindingElements2()
        {
            var b = new CustomBinding(
                new BindingElement2(),
                new InterceptorBindingElement3(),
                new BindingElement3());

            Assert.AreEqual(3, new BindingContext(b, new BindingParameterCollection()).RemainingBindingElements.Count, "New BindingContext element count");
            Assert.IsTrue(b.CanBuildChannelFactory <IRequestChannel> (), "supports IRequestChannel?");
        }
Exemple #2
0
        public void RemainingBindingElements()
        {
            var b = new CustomBinding(
                new BinaryMessageEncodingBindingElement(),
                new InterceptorBindingElement2(),
                new HttpTransportBindingElement());

            Assert.AreEqual(3, new BindingContext(b, new BindingParameterCollection()).RemainingBindingElements.Count, "#1");
            Assert.IsTrue(b.CanBuildChannelFactory <IRequestChannel> (), "#2");
        }
Exemple #3
0
        public static void Snippet14()
        {
            // <Snippet14>
            CustomBinding binding = new CustomBinding();

            binding.Elements.Add(new HttpTransportBindingElement());
            Object[] bindingParameters = new Object[2];

            binding.CanBuildChannelFactory <IRequestChannel>(bindingParameters);
            // </Snippet14>
        }
Exemple #4
0
        public static void Snippet13()
        {
            // <Snippet13>
            CustomBinding binding = new CustomBinding();

            binding.Elements.Add(new HttpTransportBindingElement());
            BindingParameterCollection paramCollection = new BindingParameterCollection();

            binding.CanBuildChannelFactory <IRequestChannel>(paramCollection);
            // </Snippet13>
        }