Exemplo n.º 1
0
    void normalize()
    {
        Str.NormalizeStringStandard(ref this.Company);
        Str.NormalizeStringStandard(ref this.FullName);
        Str.NormalizeString(ref this.MailAddress, true, true, false, false);

        if (MailUtil.IsPersonal(this.Company))
        {
            this.Company = "";
        }

        if (Str.IsEmptyStr(this.MailAddress) || Str.CheckMailAddress(this.MailAddress) == false)
        {
            throw new Exception("Mail Address '" + this.MailAddress + "' is incorrect.");
        }
    }
Exemplo n.º 2
0
    public void FromCsv(Csv csv)
    {
        UserList.Clear();

        foreach (CsvEntry?e in csv.Items)
        {
            if (e == null)
            {
                continue;
            }

            if (e.Count >= 4)
            {
                try
                {
                    MailUser u = new MailUser(e);

                    this.UserList.Add(u);
                }
                catch
                {
                }
            }
            else if (e.Count == 1)
            {
                try
                {
                    string mail = e[0];

                    if (Str.CheckMailAddress(mail))
                    {
                        MailUser u = new MailUser(mail, mail, "", "ja", new List <KeyValuePair <string, string> >());

                        this.UserList.Add(u);
                    }
                }
                catch
                {
                }
            }
        }
    }
Exemplo n.º 3
0
     public void Normalize()
     {
         if (Str.CheckMailAddress(this.AcmeContactEmail) == false)
         {
             this.AcmeContactEmail = GenDefaultContactEmail();
         }
         if (this.AcmeServiceDirectoryUrl._IsEmpty())
         {
             this.AcmeServiceDirectoryUrl = AcmeDefaultUrl;
         }
         this.ReloadIntervalMsecs = Math.Max(this.ReloadIntervalMsecs, 1000);
         if (AcmeAllowedFqdnList == null)
         {
             AcmeAllowedFqdnList = new string[1] {
                 "*"
             }
         }
         ;
         if (this.MaxAcmeCerts <= 0)
         {
             this.MaxAcmeCerts = CoresConfig.CertVaultSettings.DefaultMaxAcmeCerts;
         }
     }
 }
Exemplo n.º 4
0
 public static bool CheckMailAddress(this string str) => Str.CheckMailAddress(str);