Example #1
0
        public void ApplyDispatchBehavior()
        {
            // It cannot be applied to service endpoint dispatcher.
            IEndpointBehavior eb = new CallbackBehaviorAttribute()
            {
                ConcurrencyMode = ConcurrencyMode.Multiple, ValidateMustUnderstand = false
            };
            var cd = ContractDescription.GetContract(typeof(IFoo));
            var se = new ServiceEndpoint(cd);
            var ed = new EndpointDispatcher(new EndpointAddress("http://localhost:" + NetworkHelpers.FindFreePort()), "IFoo", "urn:foo");

            eb.ApplyDispatchBehavior(se, ed);
        }