示例#1
0
 internal SecurityBindingElement CreateMessageSecurity()
 {
     if (_mode == BasicHttpSecurityMode.Message ||
         _mode == BasicHttpSecurityMode.TransportWithMessageCredential)
     {
         return(_messageSecurity.CreateMessageSecurity(this.Mode == BasicHttpSecurityMode.TransportWithMessageCredential));
     }
     else
     {
         return(null);
     }
 }
示例#2
0
        internal SecurityBindingElement CreateMessageSecurity()
        {
            if (_mode == BasicHttpSecurityMode.Message)
            {
                throw ExceptionHelper.PlatformNotSupported();
            }

            if (_mode == BasicHttpSecurityMode.TransportWithMessageCredential)
            {
                return(_messageSecurity.CreateMessageSecurity(_mode == BasicHttpSecurityMode.TransportWithMessageCredential));
            }

            return(null);
        }