/// IDataErrorInfo
 public string this[string propertyName] {
     get {
         string result = String.Empty;
         if (propertyName == "ServerPath")
         {
             result = ServerPathValidation();
         }
         if (propertyName == "AgentPath")
         {
             result = AgentPathValidation();
         }
         if (propertyName == "BackupPath")
         {
             result = BackupPathValidation();
         }
         if (propertyName == "Hostname")
         {
             if (string.IsNullOrEmpty(Hostname))
             {
                 return("Enter valid hostname");
             }
             if (_hostname != GetCertificate.GetCertIssuedTo())
             {
                 return("Hostname doesn't match certificate");
             }
         }
         if (propertyName == "DexServerPort")
         {
             if (string.IsNullOrEmpty(_dexServerPort))
             {
                 return(result);
             }
             var isNumeric = int.TryParse(_dexServerPort, out int n);
             if (!isNumeric)
             {
                 result = "Must be valid port";
             }
         }
         if (propertyName == "CertThumbprint")
         {
             return(CertThumbprintValidation());
         }
         if (propertyName == "BackupState")
         {
             //if (string.IsNullOrEmpty(backupState))
             //{
             //    result = "needs backup";
             //}
         }
         return(result);
     }
 }
        public string CertThumbprintValidation()
        {
            var result = string.Empty;

            if (string.IsNullOrEmpty(certThumbprint))
            {
                return("Enter Thumbprint");
            }
            else if (!CertThumbprintIsValid(certThumbprint))
            {
                return("Enter valid thumbprint");
            }

            else if (!GetCertificate.CertificateFound(certThumbprint))
            {
                result = "Cert not found in Trusted Root";
            }
            GetCertificate.SetCertificateWithThumbprint(certThumbprint);
            Hostname = GetCertificate.GetCertIssuedTo();

            return(result);
        }