public bool HasSameEndPoint(CredentialSettings that) { // argument checks if (that == null) { return(false); } return(AreSameEndPoints(this.EndPoint, that.EndPoint)); }
public CredentialSettings(CredentialSettings src) : base(src) { // argument checks if (src == null) { throw new ArgumentNullException(nameof(src)); } // clone members this.EndPoint = src.EndPoint; this.UserName = src.UserName; this.Password = src.Password; this.Persistence = src.Persistence; this.EnableAssumptionMode = src.EnableAssumptionMode; return; }
public override bool Equals(object obj) { // argument checks CredentialSettings that = obj as CredentialSettings; if (that == null) { return(false); } return( this.EnableAssumptionMode == that.EnableAssumptionMode && this.Persistence == that.Persistence && AreSameEndPoints(this.EndPoint, that.EndPoint) && AreSameUserNames(this.UserName, that.UserName) && AreSamePasswords(this.Password, that.Password) ); }
public void AddCredential(CredentialSettings credential) { // argument checks if (credential == null) { throw new ArgumentNullException(nameof(credential)); } IEnumerable <CredentialSettings> credentials = this.credentials; if (credentials == null) { this.credentials = new CredentialSettings[] { credential }; } else { List <CredentialSettings> list = new List <CredentialSettings>(credentials); list.Add(credential); this.credentials = list; } return; }