示例#1
0
 public IdentityClient()
 {
     Application    = new ApplicationSection();
     Authentication = new AuthenticationSection();
     Account        = new AccountSection();
     Email          = new EmailSection();
 }
示例#2
0
 internal IdentityClient(IdentityClientConfiguration config)
 {
     Configuration = config;
     HttpHelper.Configure(config.ApplicationId, config.Address);
     Application    = new ApplicationSection();
     Authentication = new AuthenticationSection();
     Email          = new EmailSection();
 }
        /// <summary>
        /// Конструктор
        /// </summary>
        /// <param name="path"></param>
        public Config(string path)
        {
            Path = path;
            CreateFileIfNotExists();

            Common  = new CommonSection(this);
            Charts  = new ChartsSection(this);
            Experts = new ExpertsSection(this);
            Objects = new ObjectsSection(this);
            Email   = new EmailSection(this);
            StartUp = new StartUpSection(this);
            Tester  = new TesterSection(this);
        }
示例#4
0
        private static string TreatEmptyMailAddress(string fullEmail, EmailSection emailSection)
        {
            if (string.IsNullOrWhiteSpace(fullEmail))
            {
                return(string.Empty);
            }

            try
            {
                var mailAdress = new MailAddress(fullEmail);
                return(emailSection == EmailSection.Address ? mailAdress.Address : mailAdress.DisplayName);
            }
            catch (Exception exception) when(exception is ArgumentNullException || exception is FormatException)
            {
                return(string.Empty);
            }
        }