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