public SecurityStandardsManager(MessageSecurityVersion messageSecurityVersion, SecurityTokenSerializer tokenSerializer) { if (messageSecurityVersion == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("messageSecurityVersion")); if (tokenSerializer == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("tokenSerializer"); this.messageSecurityVersion = messageSecurityVersion; this.tokenSerializer = tokenSerializer; if (messageSecurityVersion.SecureConversationVersion == SecureConversationVersion.WSSecureConversation13) this.secureConversationDriver = new WSSecureConversationDec2005.DriverDec2005(); else this.secureConversationDriver = new WSSecureConversationFeb2005.DriverFeb2005(); if (this.SecurityVersion == SecurityVersion.WSSecurity10 || this.SecurityVersion == SecurityVersion.WSSecurity11) { this.idManager = WSSecurityJan2004.IdManager.Instance; } else { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("messageSecurityVersion", SR.GetString(SR.MessageSecurityVersionOutOfRange))); } this.wsUtilitySpecificationVersion = WSUtilitySpecificationVersion.Default; if (messageSecurityVersion.MessageSecurityTokenVersion.TrustVersion == TrustVersion.WSTrust13) this.trustDriver = new WSTrustDec2005.DriverDec2005(this); else this.trustDriver = new WSTrustFeb2005.DriverFeb2005(this); }
public SecurityStandardsManager(MessageSecurityVersion messageSecurityVersion, SecurityTokenSerializer tokenSerializer) { if (messageSecurityVersion == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("messageSecurityVersion")); } if (tokenSerializer == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("tokenSerializer"); } _messageSecurityVersion = messageSecurityVersion; _tokenSerializer = tokenSerializer; if (messageSecurityVersion.SecureConversationVersion == SecureConversationVersion.WSSecureConversation13) { _secureConversationDriver = new WSSecureConversationDec2005.DriverDec2005(); } else { _secureConversationDriver = new WSSecureConversationFeb2005.DriverFeb2005(); } if (this.SecurityVersion == SecurityVersion.WSSecurity10 || this.SecurityVersion == SecurityVersion.WSSecurity11) { _idManager = WSSecurityJan2004.IdManager.Instance; } else { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("messageSecurityVersion", SRServiceModel.MessageSecurityVersionOutOfRange)); } _wsUtilitySpecificationVersion = WSUtilitySpecificationVersion.Default; if (messageSecurityVersion.MessageSecurityTokenVersion.TrustVersion == TrustVersion.WSTrust13) { _trustDriver = new WSTrustDec2005.DriverDec2005(this); } else { _trustDriver = new WSTrustFeb2005.DriverFeb2005(this); } }