Exemplo n.º 1
0
        public DBMock()
        {
            Destinatari = new List <Destinatario>();
            //Lista di destinatari
            Destinatario u1 = new Destinatario(1, "Luca Stornaiuolo", new DateTime(1985, 4, 20), "*****@*****.**", true, false);
            Destinatario u2 = new Destinatario(2, "Gaetano Ferraro", null, "*****@*****.**", false, false);
            Destinatario u3 = new Destinatario(3, "Rosalia Abate", new DateTime(1984, 6, 2), null, false, false);

            Destinatari.Add(u1);
            Destinatari.Add(u2);
            Destinatari.Add(u3);
        }
Exemplo n.º 2
0
        public static Dictionary <string, string> ToDictionary(Destinatario destinatario, Dictionary <string, string> input = null)
        {
            Dictionary <string, string> result = new Dictionary <string, string>();

            if (input != null)
            {
                result = new Dictionary <string, string>(input);
            }
            result.Add("ID", destinatario.Id.ToString());
            result.Add("USERNAME", destinatario.Username);
            result.Add("BIRTHDATE", destinatario.Birthday.ToString());
            result.Add("EMAIL", destinatario.Email);
            result.Add("ISADMIN", destinatario.IsAdmin.ToString());
            result.Add("ISDELETED", destinatario.IsDeleted.ToString());
            return(result);
        }
Exemplo n.º 3
0
 public override void Build()
 {
     //costruisce l'oggetto
     Destinatario d = _input as Destinatario;
     //  _result = new Mail(d.Username,"Buon Compleanno "+d.Username, "nato il "+ d.Data ).ToString();
 }