Exemple #1
0
        internal static new ChannelProtectionRequirements GetProtectionRequirements(BindingContext context)
        {
            AddressingVersion             wSAddressing10 = AddressingVersion.WSAddressing10;
            MessageEncodingBindingElement messageEncodingBindingElement = ClientMessageUtility.CreateInnerEncodingBindingElement(context);

            if (messageEncodingBindingElement != null)
            {
                wSAddressing10 = messageEncodingBindingElement.MessageVersion.Addressing;
            }
            return(RelayedOnewayTransportBindingElement.GetProtectionRequirements(wSAddressing10));
        }
Exemple #2
0
        public override T GetProperty <T>(BindingContext context)
            where T : class
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (typeof(T) != typeof(ChannelProtectionRequirements))
            {
                return(base.GetProperty <T>(context));
            }
            ChannelProtectionRequirements protectionRequirements = RelayedOnewayTransportBindingElement.GetProtectionRequirements(context);

            protectionRequirements.Add(context.GetInnerProperty <ChannelProtectionRequirements>() ?? new ChannelProtectionRequirements());
            return((T)protectionRequirements);
        }