Ejemplo n.º 1
0
        public ICommandResult Update(ContatoDto dto)
        {
            if (!_contatoRepositorio.ExisteContato(dto.Id))
            {
                return(new CommandResult(false, "O Contato não existe"));
            }

            var nome   = new Nome(dto.Nome, dto.SobreNome);
            var email1 = new EMAIL(dto.Email, ETipoEmail.Principal);
            var email2 = new EMAIL(dto.Email2, ETipoEmail.Secundario);
            var cpf    = new CPF(dto.Cpf);

            var contato = new Contato(nome, dto.Sexo, dto.Idade, dto.DataNascimento, dto.TelefoneComercial,
                                      dto.TelefoneCelular, dto.TelefoneResidencial, dto.TelefoneAdicional,
                                      email1, email2, dto.Rg, cpf, null, null, null, null);

            if (!contato.Validar())
            {
                return(new CommandResult(false, "erro", contato.Erros));
            }

            _contatoRepositorio.Update(contato);

            return(new CommandResult(true, "Contato alterado com sucesso!"));
        }
Ejemplo n.º 2
0
        private void btnCadastrar_Click(object sender, EventArgs e)
        {
            AGENDAMENTOEntities db = new AGENDAMENTOEntities();

            try
            {
                EMAIL email = new EMAIL();
                if (cbxTipoEmail.SelectedIndex == 2)
                {
                    email.TIPO_EMAIL = txtTipoEmail.Text;
                }
                else
                {
                    email.TIPO_EMAIL = cbxTipoEmail.SelectedItem.ToString();
                }
                email.EMAIL1           = txtEmail.Text;
                email.AGENDA_ID_AGENDA = VerAgendamento.idContato;
                db.EMAIL.Add(email);
                db.SaveChanges();
                MessageBox.Show("Email alterado com sucesso", "SUCESSO", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "ERRO", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                db.Dispose();
            }
        }
Ejemplo n.º 3
0
        public Contato(Nome nome, ESexo sexo, int idade, DateTime dataNascimento,
            string telefoneComercial, string telefoneCelular, string telefoneResidencial,
            string telefoneAdcional, EMAIL email, EMAIL email2, string rg, CPF cpf,
            Banco banco, Endereco enderecoPrincipal, Endereco enderecoComercial,
            RedesSociais redesSociais)
        {
            Nome = nome;
            Sexo = sexo;
            Idade = idade;
            DataNascimento = dataNascimento;
            TelefoneComercial = telefoneComercial;
            TelefoneCelular = telefoneCelular;
            TelefoneResidencial = telefoneResidencial;
            TelefoneAdicional = telefoneAdcional;
            Email = email;
            Email2 = email2;
            Rg = rg;
            Cpf = cpf;
            Banco = banco;
            EnderecoPrincipal = enderecoPrincipal;
            EnderecoComercial = enderecoComercial;
            RedesSociais = redesSociais;

            AddErros(nome, email, Email2, cpf, banco);
        }
Ejemplo n.º 4
0
        private bool ValidarCampos()
        {
            bool formatoCorreto = true;

            if (EMAIL.Text != string.Empty)
            {
                if (!isValidEmail(EMAIL.Text))
                {
                    formatoCorreto = false;
                    DisplayAlert("ATENÇÃO", "O E-mail informado é inválido. Por favor verifique.", "OK");
                    EMAIL.Focus();
                    return(formatoCorreto);
                }
                if (CEP.Text != string.Empty)

                {
                    if (!isValidCEP(CEP.Text))

                    {
                        formatoCorreto = false;

                        DisplayAlert("ATENÇÃO", "O CEP Informado é inválido. Por favor verifique.", "OK");

                        CEP.Focus();
                        return(formatoCorreto);
                    }
                }
            }
            return(formatoCorreto);
        }
Ejemplo n.º 5
0
 protected override async Task <ExpandoObject> _RunTestAsync(ExpandoObject parameters, params Func <ExpandoObject, ExpandoObject>[] merge)
 {
     return(await TestHostAsync(parameters, async (p, m) => {
         var e = await base._RunTestAsync(parameters, merge);
         return e.AddOrMerge("langs", EMAIL.RunTests());
     }, _LogError, merge));
 }
Ejemplo n.º 6
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            bool email    = reg.Email_Avaiable(txtEmail.Text);
            bool username = reg.UserName_Avaiable(txtUserName.Text);
            bool mobile   = reg.Mobile_Avaiable(txtMobileCode.Text + txtMobileNumber.Text);

            lblUserNameAvaility.Text = reg.UserNameIcon;
            lblEmailAvaiable.Text    = reg.EmailIcon;
            lblMobileVerify.Text     = reg.MobileIcon;
            lblPassword.Text         = reg.PasswordStrongMessege(txtPassword.Text);
            if (email && username && mobile)
            {
                reg.Input_Email     = txtEmail.Text;
                reg.Input_FirstName = txtFirstName.Text;
                reg.Input_Mobile    = txtMobileCode.Text + txtMobileNumber.Text;
                reg.Input_Packege   = "free";
                reg.Input_Password  = txtPassword.Text;
                reg.Input_SureName  = txtSureName.Text;
                reg.Input_UserName  = txtUserName.Text;
                if (reg.Reg())
                {
                    Cookies cookies = new Cookies();
                    _Cookies = cookies.Add(reg.LoginID, reg.RegID, Request.UserAgent.ToString());

                    foreach (HttpCookie httpCookie in _Cookies)
                    {
                        Response.Cookies.Add(httpCookie);
                    }
                    int i = 0;
                    foreach (string Name in cookies.CookiesName)
                    {
                        Session[Name] = cookies.CookiesValueEncrypt[i]; i++;
                    }
                    //lblResult.Text += "1="+ reg.Message;

                    Notification notification = new Notification();
                    notification.AddNotification("Verify your Email Address.", "../EmailVerify", IconDataFeather.mail, reg.Offset, reg.RegID);

                    //lblResult.Text += "2="+reg.RegID+"/ " + notification.ErrorMessage;

                    EMAIL mAIL = new EMAIL();
                    mAIL.Subject = "Email Confirmation";
                    mAIL.Messege = "please verify your email. please click http://" + Request.Url.AbsoluteUri.ToString().Replace("create_account", "EmailVerify") + "?=" + reg.EmailCode + "&rid=" + reg.RegID;
                    mAIL.Email   = txtEmail.Text;
                    //mAIL.Mail();



                    Response.Redirect("~/CMS/");
                }
                else
                {
                    lblResult.Text = reg.Message;
                }
            }
        }
Ejemplo n.º 7
0
 public Aluno(Guid alunoid, string nome, DateTime datanascimento, string cpf, string telefone, string email, string informacoesadicionais)
 {
     AlunoId                = alunoid;
     Nome                   = nome;
     DataNascimento         = datanascimento;
     CPF                    = new CPF(cpf);
     Telefone               = new TELEFONE(telefone);
     Email                  = new EMAIL(email);
     InformacoersAdicionais = informacoesadicionais;
 }
Ejemplo n.º 8
0
        private void InsertToDB()
        {
            try
            {
                EMPLOYEE emp = new EMPLOYEE()
                {
                    NAME_E = Name,
                    RATING = Convert.ToByte(Rating)
                };
                EMAIL eMAIL = new EMAIL()
                {
                    ADRESS = Email
                };
                emp.EMAIL1 = eMAIL;
                PHOTO pHOTO = new PHOTO()
                {
                    IMAGEDATA = Photo,
                };
                emp.PHOTO1     = pHOTO;
                emp.DEPARTMENT = (from i in ctx.DEPARTMENT
                                  where i.D_NAME == Department
                                  select i.ID).FirstOrDefault();
                emp.CATHEDRA = (from i in ctx.CATHEDRA
                                where i.C_NAME == Cathedra && i.DEPARTMENT.D_NAME == Department
                                select i.ID).FirstOrDefault();
                DEGREE dEGREE = new DEGREE()
                {
                    YEAR_GOT = Int32.Parse(Year)
                };

                dEGREE.NAME_D = (from i in ctx.DEGREELIST
                                 where i.D_NAME == Degree
                                 select i.ID).FirstOrDefault();
                emp.DEGREE1 = dEGREE;

                ctx.EMPLOYEE.Add(emp);
            }
            catch (Exception)
            {
                MessageBox.Show("Fatal error while adding new employee");
                return;
            }

            try
            {
                ctx.SaveChanges();
                MessageBox.Show("Вітання! Співробітник доданий до БД успішно");
                parentForm.Close();
            }
            catch (Exception)
            {
                MessageBox.Show("Can't save changes to DB");
            }
        }
Ejemplo n.º 9
0
        public void LanguageRunTest()
        {
            AggregateException errors = new AggregateException();
            var testResults           = EMAIL.RunTests(exc => errors = exc);

            testResults.ForEach(tr => Console.WriteLine(tr.ToJson()));
            errors.InnerExceptions.ForEach(error => Console.WriteLine(error.ToMessages() + "\n\n"));
            Assert.AreEqual(4, errors.InnerExceptions.Count);
            ExceptionAssert.Propagates <AggregateException>(() => EMAIL.RunTests(), exc => {
                Assert.AreEqual(4, exc.InnerExceptions.Count);
            });
        }
Ejemplo n.º 10
0
 private void SendEmail(EMAIL Customer, List <CAMPAIGN> Campaigns, string Subject, List <CAMPAIGN> FutureCampaigns)
 {
     try
     {
         FashionZone.BL.Util.Mailer.SendMailer(Customer, Campaigns, Subject, FutureCampaigns);
         log("Mail to " + Customer.Email1 + " sent.");
     }
     catch (Exception ex)
     {
         log("Error sending newsletter to " + Customer.Email1 + " - " + ex.Message);
     }
 }
Ejemplo n.º 11
0
        public static void SendMailer(EMAIL Email, List <CAMPAIGN> Campaigns, String Subject, List <CAMPAIGN> FutureCampaigns)
        {
            MailMessage mail = new MailMessage();

            mail.To.Add(new MailAddress(Email.Email1));
            mail.Subject    = Subject;
            mail.IsBodyHtml = true;
            mail.Body       = Transfomer.GenerateNewsletter(null, Campaigns, FutureCampaigns);
            mail.From       = new MailAddress("*****@*****.**", "FZone");
            SmtpClient client = new SmtpClient();

            //client.EnableSsl = true;
            client.Timeout = 5000;
            client.Send(mail);
        }
Ejemplo n.º 12
0
        internal async Task <int> SignUpAsync(IDapperHelper db)
        {
            EMAIL = EmailReplace(EMAIL);

            if (EMAIL.IsNull())
            {
                throw new Exception("이메일을 정확히 입력해주세요");
            }
            if (PASSWORD.IsNull())
            {
                throw new Exception("비밀번호를 정확히 입력해주세요");
            }
            if (USER_NAME.IsNull())
            {
                throw new Exception("닉네임을 정확히 입력해주세요");
            }

            EMAIL     = EMAIL.Trim();
            PASSWORD  = PASSWORD.Trim();
            USER_NAME = USER_NAME.Trim();

            if (PASSWORD.Length < 8)
            {
                throw new Exception("비밀번호를 8자이상 입력해주세요");
            }

            //이메일 중복 확인
            if ((await db.GetQueryFromXmlAsync <int>("User.xml", "GetCheckEmail", this)).FirstOrDefault() > 0)
            {
                throw new Exception("이미 사용중인 이메일 입니다");
            }

            await CheckUserNameAsync(db);

            //U_ID 가져옴
            this.U_ID = (await db.GetQueryFromXmlAsync <uint>("User.xml", "GetSignUp_Uid", new { })).FirstOrDefault();

            //PASSWORD 암호화
            PASSWORD = HMacSha256.GetHMac(PASSWORD, U_ID.ToString());

            //Insert
            return(await db.ExecuteFromXmlAsync("User.xml", "InsertSignUp", this));
        }
Ejemplo n.º 13
0
 public Lead(Nome nome, EMAIL email, string rg, string orgaoEmissor, DateTime?dataExpedicao,
             string nomeMae, string score, string telComercial, string telCelular, string telResidencial,
             WebSite webSite, DateTime?dataNascimento, Banco banco, CNPJ cnpj, string nomeEmpresa,
             Endereco endereco, RedesSociais redesSociais)
 {
     Nome                = nome;
     Email               = email;
     Rg                  = rg;
     OrgaoEmissor        = orgaoEmissor;
     DataExpedicao       = dataExpedicao;
     NomeMae             = nomeMae;
     Score               = score;
     TelefoneResidencial = telResidencial;
     TelefoneComercial   = telComercial;
     TelefoneCelular     = telCelular;
     WebSite             = webSite;
     DataNascimento      = dataExpedicao;
     Cnpj                = cnpj;
     NomeEmpresa         = nomeEmpresa;
     Enderco             = endereco;
     RedesSociais        = redesSociais;
 }
Ejemplo n.º 14
0
        public ActionResult EmailCreate(EmailSendModel data)
        {
            if (!ModelState.IsValid)
            {
                return(View());
            }

            using (THUONGMAIDIENTUEntities db = new THUONGMAIDIENTUEntities())
            {
                EMAIL e = new EMAIL();
                e.EmailTitle   = data.title;
                e.EmailContent = data.content;
                db.EMAILs.Add(e);
                db.SaveChanges();
                foreach (var customer in db.CUSTOMERs.ToList())
                {
                    CUSTOMER_EMAIL c = new CUSTOMER_EMAIL();
                    c.IdCustomer = customer.IdCustomer;

                    e.CUSTOMER_EMAIL.Add(c);
                    try
                    {
                        SendMail.Send(data.title, data.content, customer, e.IdEmail);
                        c.IsRead = false;
                    }
                    catch (Exception ex)
                    {
                    }
                }
                db.SaveChanges();
            }



            return(RedirectToAction("Email"));
        }
Ejemplo n.º 15
0
        public ICommandResult Create(ContatoDto dto)
        {
            if (_contatoRepositorio.ExisteCpf(dto.Cpf))
            {
                return(new CommandResult(false, "O Cpf ja está cadastrado"));
            }

            if (_contatoRepositorio.ExisteEmail(dto.Email))
            {
                return(new CommandResult(false, "O Email ja está cadastradoo"));
            }

            var nome         = new Nome(dto.Nome, dto.SobreNome);
            var email1       = new EMAIL(dto.Email, ETipoEmail.Principal);
            var email2       = new EMAIL(dto.Email2, ETipoEmail.Secundario);
            var cpf          = new CPF(dto.Cpf);
            var redesSociais = new RedesSociais(dto.Twitter, dto.Skype, dto.Youtube, dto.FaceBook, dto.GooglePlus, dto.Linkedin, dto.Instagram);

            var contato = new Contato(nome, dto.Sexo, dto.Idade, dto.DataNascimento, dto.TelefoneComercial,
                                      dto.TelefoneCelular, dto.TelefoneResidencial, dto.TelefoneAdicional,
                                      email1, email2, dto.Rg, cpf, null, null, null, redesSociais);

            if (!contato.Validar())
            {
                return(new CommandResult(false, "erro", contato.Erros));
            }

            if (!cpf.Validar())
            {
                return(new CommandResult(false, "Erros na entidade", cpf.Erros));
            }

            var id = _contatoRepositorio.Create(contato);

            return(new CommandResult(true, "Contato criado com sucesso!", id));
        }
Ejemplo n.º 16
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public async Task Execute(IJobExecutionContext context)
        {
            string logJobName = context.JobDetail.Description;

            LogManager.Configuration.Variables["JobName"] = logJobName; // context.JobDetail.Key.Name;

            DateTime time   = DateTime.Now;
            string   format = "MMM ddd d HH:mm yyyy"; // Use this format.

            try
            {
                lock (lockObj)
                {
                    nlogger.Info("Starting Cron Job : " + context.JobDetail.Key.Name + " @ " + time);

                    Console.ForegroundColor = ConsoleColor.White;
                    Console.WriteLine(time.ToString(format));
                    Console.ForegroundColor = ConsoleColor.Yellow;
                    Console.Out.WriteLineAsync("Starting Cron Job : " + context.JobDetail.Key.Name + " @ " + time);
                    // await Console.Out.WriteLineAsync("Starting Cron Job : " + context.JobDetail.Key.Name + " @ " + time);
                    Console.ForegroundColor = ConsoleColor.White;
                }

                EMAIL      email   = new EMAIL();
                HttpClient client1 = new HttpClient();
                HttpClient client2 = new HttpClient();
                client1.Timeout = TimeSpan.FromMinutes(15);
                client2.Timeout = TimeSpan.FromMinutes(15);
                string reportName   = "";
                string customerName = "";
                string recipients   = "";
                string subject      = "";

                string urlParameters          = "";
                string URL                    = "";
                HttpResponseMessage response1 = new HttpResponseMessage();
                HttpResponseMessage response2 = new HttpResponseMessage();
                string returnMessage;

                // 1. Extarct the ReportID and TemplateID from context.JobDetail.Key.Name
                string jobKeyName = context.JobDetail.Key.Name.Replace("JOB-", "");
                int    reportID   = Convert.ToInt32(jobKeyName.Split('-').First());
                int    tempalteID = Convert.ToInt32(jobKeyName.Split('-').Last());

                // 2. Generate Reports Body
                nlogger.Info("Requesting report information ...");
                URL = ReportingService.BaseURL + "Reports/GenerateReport?reportID=" + reportID.ToString() + "&templateID=" + tempalteID.ToString() + "&sendEmail=true";
                client1.BaseAddress = new Uri(URL);
                response1           = client1.GetAsync(urlParameters).Result;
                ResultGeneric result = new ResultGeneric();
                if (response1.IsSuccessStatusCode)
                {
                    using (HttpContent content1 = response1.Content)
                    {
                        Task <string> resultTemp1 = content1.ReadAsStringAsync();
                        returnMessage = resultTemp1.Result;
                        result        = JsonConvert.DeserializeObject <ResultGeneric>(returnMessage);

                        if (result.ReturnCode == 0)
                        {
                            // Here is Body of the report ... we may want to log this along with some other information
                            email.Body = result.StringReturnValue;

                            // 3. Get reportID information by report ID  - We may want to get more information about this report.
                            // like:
                            // mail was sent to
                            // Report Name
                            ResultReports reports = new ResultReports();
                            URL = ReportingService.BaseURL + "Reports/GetReportByID?reportID=" + reportID.ToString();
                            client2.BaseAddress = new Uri(URL);
                            response2           = client2.GetAsync(urlParameters).Result;
                            if (response2.IsSuccessStatusCode)
                            {
                                using (HttpContent content2 = response2.Content)
                                {
                                    Task <string> resultTemp2 = content2.ReadAsStringAsync();
                                    returnMessage = resultTemp2.Result;
                                    reports       = JsonConvert.DeserializeObject <ResultReports>(returnMessage);
                                }
                                reportName   = reports.ReturnValue[0].ReportName.Trim();
                                customerName = reports.ReturnValue[0].CustomerName;
                                recipients   = reports.ReturnValue[0].EmailRecipients.Trim();
                                subject      = reports.ReturnValue[0].EmailSubject.Trim();
                            }
                            lock (lockObj)
                            {
                                if (result.Message.Contains("This Report has not been implemented yet."))
                                {
                                    nlogger.Info("The Report \"" + reportName.Trim() + "\" has not been implemented yet.");
                                    Console.ForegroundColor = ConsoleColor.Red;
                                    Console.WriteLine("The Report \"" + reportName.Trim() + "\" has not been implemented yet.");
                                    Console.ForegroundColor = ConsoleColor.White;
                                }
                                else
                                {
                                    nlogger.Info("Email Report was sent successfully.");
                                    nlogger.Info("     Report ID :" + reportID.ToString());
                                    nlogger.Info("     Customer Name :" + customerName);
                                    nlogger.Info("     Report Name :" + reportName);
                                    nlogger.Info("     Recipients :" + recipients);
                                    nlogger.Info("     Subject :" + subject);

                                    Console.ForegroundColor = ConsoleColor.DarkCyan;
                                    Console.WriteLine("Email Report was sent successfully.");
                                    Console.WriteLine("     Report ID :" + reportID.ToString());
                                    Console.WriteLine("     Customer Name :" + customerName);
                                    Console.WriteLine("     Report Name :" + reportName);
                                    Console.WriteLine("     Recipients :" + recipients);
                                    Console.WriteLine("     Subject :" + subject);
                                    //Console.WriteLine("Report Body:" + result.StringReturnValue);
                                    Console.ForegroundColor = ConsoleColor.White;
                                }
                            }
                        }
                        else
                        {
                            // No Report found ...
                            lock (lockObj)
                            {
                                nlogger.Error("Error:" + "\r\n" + response1.ReasonPhrase + "\r\n" + response1.RequestMessage);

                                Console.ForegroundColor = ConsoleColor.Red;
                                Console.WriteLine("Error:" + "\r\n" + response1.ReasonPhrase + "\r\n" + response1.RequestMessage);
                                Console.ForegroundColor = ConsoleColor.White;
                            }
                        }
                    }
                }
                else
                {
                    // Error generating Report
                    lock (lockObj)
                    {
                        nlogger.Error("Error:" + "\r\n" + response1.ReasonPhrase + "\r\n" + response1.RequestMessage);

                        Console.ForegroundColor = ConsoleColor.Red;
                        Console.WriteLine("Error:" + "\r\n" + response1.ReasonPhrase + "\r\n" + response1.RequestMessage);
                        Console.ForegroundColor = ConsoleColor.White;
                    }
                }
            }
            catch (IOException ex)
            {
                lock (lockObj)
                {
                    LogManager.Configuration.Variables["JobName"] = logJobName;
                    // context.JobDetail.Key.Name;
                    // Extract some information from this exception, and then
                    // throw it to the parent method.
                    if (ex.Source != null)
                    {
                        nlogger.Fatal("IOException source: {0}", ex.Source);
                        Console.WriteLine("IOException source: {0}", ex.Source);
                    }
                }
                throw;
            }
        }
Ejemplo n.º 17
0
        /// <summary>
        /// Method used to add a property to the instance. Will be placed in the correct class Property.
        /// </summary>
        /// <param name="input">The vCard.Property to add.</param>
        public void AddProperty(Props.IProperty input)
        {
            if (input == null || input.IsValueNull)
            {
                return;
            }

            switch (input.Property)
            {
            case KnownProperties.ADR:
                ADR.AddIfNotNull(input as Props.ADR);
                break;

            case KnownProperties.ANNIVERSARY:
                ANNIVERSARY = input as Props.ANNIVERSARY;
                break;

            case KnownProperties.BDAY:
                BDAY = input as Props.BDAY;
                break;

            case KnownProperties.CALADRURI:
                CALADRURI.AddIfNotNull(input as Props.CALADRURI);
                break;

            case KnownProperties.CALURI:
                CALURI.AddIfNotNull(input as Props.CALURI);
                break;

            case KnownProperties.CATEGORIES:
                CATEGORIES.AddIfNotNull(input as Props.CATEGORIES);
                break;

            case KnownProperties.CLIENTPIDMAP:
                CLIENTPIDMAP.AddIfNotNull(input as Props.CLIENTPIDMAP);
                break;

            case KnownProperties.EMAIL:
                EMAIL.AddIfNotNull(input as Props.EMAIL);
                break;

            case KnownProperties.FBURL:
                FBURL.AddIfNotNull(input as Props.FBURL);
                break;

            case KnownProperties.FN:
                FN.AddIfNotNull(input as Props.FN);
                break;

            case KnownProperties.GENDER:
                GENDER = input as Props.GENDER;
                break;

            case KnownProperties.GEO:
                GEO.AddIfNotNull(input as Props.GEO);
                break;

            case KnownProperties.IMPP:
                IMPP.AddIfNotNull(input as Props.IMPP);
                break;

            case KnownProperties.KEY:
                KEY.AddIfNotNull(input as Props.KEY);
                break;

            case KnownProperties.KIND: {
                char k = (input as Props.KIND).Value.ToLower()[0];
                if (k == 'i')
                {
                    KIND = Kinds.Individual;
                }
                else if (k == 'g')
                {
                    KIND = Kinds.Group;
                }
                else if (k == 'o')
                {
                    KIND = Kinds.Org;
                }
                else if (k == 'l')
                {
                    KIND = Kinds.Location;
                }
                else
                {
                    KIND = Kinds.Individual;
                }
                break;
            }

            case KnownProperties.LANG:
                LANG.AddIfNotNull(input as Props.LANG);
                break;

            case KnownProperties.LOGO:
                LOGO.AddIfNotNull(input as Props.LOGO);
                break;

            case KnownProperties.MEMBER:
                MEMBER.AddIfNotNull(input as Props.MEMBER);
                break;

            case KnownProperties.N:
                N = input as Props.N;
                break;

            case KnownProperties.NICKNAME:
                NICKNAME.AddIfNotNull(input as Props.NICKNAME);
                break;

            case KnownProperties.NOTE:
                NOTE.AddIfNotNull(input as Props.NOTE);
                break;

            case KnownProperties.ORG:
                ORG.AddIfNotNull(input as Props.ORG);
                break;

            case KnownProperties.PHOTO:
                PHOTO.AddIfNotNull(input as Props.PHOTO);
                break;

            case KnownProperties.PRODID:
                PRODID = input as Props.PRODID;
                break;

            case KnownProperties.RELATED:
                RELATED.AddIfNotNull(input as Props.RELATED);
                break;

            case KnownProperties.REV:
                REV = input as Props.REV;
                break;

            case KnownProperties.ROLE:
                ROLE.AddIfNotNull(input as Props.ROLE);
                break;

            case KnownProperties.SOUND:
                SOUND.AddIfNotNull(input as Props.SOUND);
                break;

            case KnownProperties.SOURCE:
                SOURCE.AddIfNotNull(input as Props.SOURCE);
                break;

            case KnownProperties.TEL:
                TEL.AddIfNotNull(input as Props.TEL);
                break;

            case KnownProperties.TITLE:
                TITLE.AddIfNotNull(input as Props.TITLE);
                break;

            case KnownProperties.TZ:
                TZ.AddIfNotNull(input as Props.TZ);
                break;

            case KnownProperties.UID:
                UID = input as Props.UID;
                break;

            case KnownProperties.URL:
                URL.AddIfNotNull(input as Props.URL);
                break;

            case KnownProperties.VERSION:
                VERSION = input as Props.VERSION;
                break;

            case KnownProperties.XML:
                XML.AddIfNotNull(input as Props.XML);
                break;

            default:
                return;
            }
        }
        public void Should_fail_validation_when_format_is_invalid()
        {
            const string EMAIL = "invalid_email_format";

            EMAIL.IsValidEmail().Should().BeFalse();
        }
        public void Should_pass_validation_with_good_email()
        {
            const string EMAIL = EmailData.EXISTING_CONTACT_EMAIL;

            EMAIL.IsValidEmail().Should().BeTrue();
        }
Ejemplo n.º 20
0
 public IHttpActionResult RunTest() => Ok(EMAIL.RunTests());