Exemple #1
0
        public Evenement(string titel, string beschrijving, List <Moment> momenten, Locatie locatie, Categorie categorie, Gallerij gallerij, List <String> socialMedia, string profielFoto, string omslagFoto, double?prijs)
        {
            if (titel != null || titel.Length > 0)
            {
                Titel = titel;
            }
            else
            {
                throw new ArgumentException("De titel mag niet leeg zijn.");
            }

            if (beschrijving != null || beschrijving.Length > 0)
            {
                Beschrijving = beschrijving;
            }
            else
            {
                throw new ArgumentException("De beschrijving mag niet leeg zijn.");
            }

            if (momenten != null)
            {
                Moment = momenten;
            }

            if (locatie != null)
            {
                Locatie = locatie;
            }
            else
            {
                throw new ArgumentException("De locatie mag niet leeg zijn.");
            }

            Categorie = categorie;

            /* Properties die null mogen zijn */
            Gallerij    = gallerij;
            SocialMedia = socialMedia;
            ProfielFoto = profielFoto;
            OmslagFoto  = omslagFoto;
            Prijs       = prijs;
        }
Exemple #2
0
 public Evenement(string titel, string beschrijving, List <Moment> momenten, Locatie locatie, Categorie categorie)
     : this(titel, beschrijving, momenten, locatie, categorie, null, null, null, null, null)
 {
 }