Example #1
0
        public virtual void AddCertificate(string thumbprint, string subject)
        {
            Tracing.Information("[UserAccount.AddCertificate] called for accountID: {0}", this.ID);

            if (String.IsNullOrWhiteSpace(thumbprint))
            {
                Tracing.Error("[UserAccount.AddCertificate] failed -- null thumbprint");
                throw new ArgumentNullException("thumbprint");
            }
            if (String.IsNullOrWhiteSpace(subject))
            {
                Tracing.Error("[UserAccount.AddCertificate] failed -- null subject");
                throw new ArgumentNullException("subject");
            }

            var cert = new UserCertificate {
                User = this, Thumbprint = thumbprint, Subject = subject
            };

            this.Certificates.Add(cert);

            this.AddEvent(new CertificateAddedEvent {
                Account = this, Certificate = cert
            });
        }
Example #2
0
 protected internal abstract void RemoveCertificate(UserCertificate item);
 protected internal abstract void RemoveCertificate(UserCertificate item);
Example #4
0
 protected internal abstract void AddCertificate(UserCertificate item);
 protected internal abstract void AddCertificate(UserCertificate item);