//
        internal static bool TryCreate(SecurityBindingElement sbe, NetMsmqSecurityMode mode, out NetMsmqSecurity security)
        {
            security = null;
            MessageSecurityOverMsmq messageSecurity;

            if (!MessageSecurityOverMsmq.TryCreate(sbe, out messageSecurity))
            {
                messageSecurity = null;
            }
            security = new NetMsmqSecurity(mode, null, messageSecurity);
            return(sbe == null || Config.SecurityElement.AreBindingsMatching(security.CreateMessageSecurity(), sbe, false));
        }
 internal static bool TryCreate(SecurityBindingElement sbe, NetMsmqSecurityMode mode, out NetMsmqSecurity security)
 {
     MessageSecurityOverMsmq msmq;
     security = null;
     if (!MessageSecurityOverMsmq.TryCreate(sbe, out msmq))
     {
         msmq = null;
     }
     security = new NetMsmqSecurity(mode, null, msmq);
     if (sbe != null)
     {
         return SecurityElementBase.AreBindingsMatching(security.CreateMessageSecurity(), sbe, false);
     }
     return true;
 }
Exemple #3
0
        internal static bool TryCreate(SecurityBindingElement sbe, NetMsmqSecurityMode mode, out NetMsmqSecurity security)
        {
            MessageSecurityOverMsmq msmq;

            security = null;
            if (!MessageSecurityOverMsmq.TryCreate(sbe, out msmq))
            {
                msmq = null;
            }
            security = new NetMsmqSecurity(mode, null, msmq);
            if (sbe != null)
            {
                return(SecurityElementBase.AreBindingsMatching(security.CreateMessageSecurity(), sbe, false));
            }
            return(true);
        }
 //
 internal static bool TryCreate(SecurityBindingElement sbe, NetMsmqSecurityMode mode, out NetMsmqSecurity security)
 {
     security = null;
     MessageSecurityOverMsmq messageSecurity;
     if (!MessageSecurityOverMsmq.TryCreate(sbe, out messageSecurity))
         messageSecurity = null;
     security = new NetMsmqSecurity(mode, null, messageSecurity);
     return sbe == null || Config.SecurityElement.AreBindingsMatching(security.CreateMessageSecurity(), sbe, false);
 }