Beispiel #1
0
 public void Initialize(string title = "(no title)", EGenre genre = EGenre.None, List <Actor> actors = null)
 {
     Title  = title;
     Genre  = genre;
     Actors = actors ?? new List <Actor> {
         new Actor()
     };                                                 //new List<Actor>()
 }
Beispiel #2
0
 public void Initialize(string title = "(no title)", EGenre genre = EGenre.Action, List <Actor> actors = null)
 {
     Title  = title;
     Genre  = genre;
     Actors = actors ?? new List <Actor> {
         new Actor()
     };                                                          //?? is the null operator, it says if left side is null, then use the right
 }
 public Serie(int id, EGenre genre, string title, string description, int year)
 {
     Id          = id;
     Title       = title;
     Description = description;
     Year        = year;
     Removed     = false;
 }
Beispiel #4
0
 public void Initialize(string t            = "(no title)", EGenre genre = EGenre.Action,
                        List <Actor> actors = null)
 {
     Title  = t;
     Genre  = genre;
     Actors = actors ?? new List <Actor> {
         new Actor()
     };
 }
Beispiel #5
0
 public UpdatePersonCommand(Guid id, string name, DateTime birthDate, EGenre genre, ICollection <Address> address, ICollection <Phone> phone, string phototgraph = null)
 {
     this.Id         = id;
     this.Name       = name;
     this.BirthDate  = birthDate;
     this.Genre      = genre;
     this.Photograph = phototgraph;
     this.Phone      = phone;
     this.Address    = address;
 }
 public CreatePersonCommand(string name, string cpf, DateTime birthDate, EGenre genre, ICollection <Address> address, ICollection <Phone> phone, string phototgraph = null)
 {
     this.Name       = name;
     this.CPF        = cpf;
     this.BirthDate  = birthDate;
     this.Genre      = genre;
     this.Photograph = phototgraph;
     this.Phone      = phone;
     this.Address    = address;
 }
 public CreatePersonCommand(string name, string cpf, DateTime birthDate, EGenre genre, ICollection<Address> address, ICollection<Phone> phone, string phototgraph = null)
 {
     this.Name = name;
     this.CPF = cpf;
     this.BirthDate = birthDate;
     this.Genre = genre;
     this.Photograph = phototgraph;
     this.Phone = phone;
     this.Address = address;
 }
Beispiel #8
0
 public Game(int id, EGenre genre, string name, string description, int relYear, string dev, string publi, int price)
 {
     this.Id          = id;
     this.Genre       = genre;
     this.Name        = name;
     this.Description = description;
     this.ReleaseYear = relYear;
     this.Developer   = dev;
     this.Publisher   = publi;
     this.Price       = price;
     this.Available   = true;
 }
Beispiel #9
0
 public Person(string name, string cpf, DateTime birthDate, EGenre genre, ICollection <Address> address, ICollection <Phone> phone, string phototgraph = null)
 {
     this.Id         = Guid.NewGuid();
     this.Name       = name;
     this.CPF        = cpf;
     this.BirthDate  = birthDate;
     this.Genre      = genre;
     this.Photograph = phototgraph;
     this.Phone      = new List <Phone>();
     phone.ToList().ForEach(x => AddPhone(x));
     this.Address = new List <Address>();
     address.ToList().ForEach(x => AddAddress(x));
 }
Beispiel #10
0
 public Person(string name, string cpf, DateTime birthDate, EGenre genre, ICollection<Address> address, ICollection<Phone> phone, string phototgraph = null)
 {
     this.Id = Guid.NewGuid();
     this.Name = name;
     this.CPF = cpf;
     this.BirthDate = birthDate;
     this.Genre = genre;
     this.Photograph = phototgraph;
     this.Phone = new List<Phone>();
     phone.ToList().ForEach(x => AddPhone(x));
     this.Address = new List<Address>();
     address.ToList().ForEach(x => AddAddress(x));
 }
Beispiel #11
0
 public void Initialize(
     string title        = "(default title)",
     EGenre genre        = EGenre.Action,
     List <Actor> actors = null  //new List<Actor>() //{Actors.Add(new Actor())}
     )
 {
     Title  = title;
     Genre  = genre;
     Actors = actors ?? new List <Actor> {
         new Actor()
     };                                                  //reference values may not be used as default values as they may not exist at runtime, the compiler will not accept these
     //  ^null operator, if the value to the left is null, use the value to the right
 }
 public DonatorUser(Guid id,
                    Guid userId,
                    string name,
                    EGenre genre,
                    bool activedBloodNotification,
                    bool activedHairNotification,
                    bool activedBreastMilkNotification,
                    Guid?hairId  = null,
                    Guid?bloodId = null)
 {
     Id     = id;
     UserId = userId;
     Name   = name;
     Genre  = genre;
     ActivedBloodNotification      = activedBloodNotification;
     ActivedHairNotification       = activedHairNotification;
     ActivedBreastMilkNotification = activedBreastMilkNotification;
     HairId  = hairId;
     BloodId = bloodId;
 }
Beispiel #13
0
 public RegisterNewDonatorUserCommand(string name,
                                      EGenre genre,
                                      string email,
                                      string password,
                                      string confirmPassword,
                                      bool activedBloodNotification,
                                      bool activedHairNotification,
                                      bool activedBreastMilkNotification,
                                      Guid?hairId  = null,
                                      Guid?bloodId = null)
 {
     Name                          = name;
     Genre                         = genre;
     Email                         = email;
     Password                      = password;
     ConfirmPassword               = confirmPassword;
     ActivedBloodNotification      = activedBloodNotification;
     ActivedHairNotification       = activedHairNotification;
     ActivedBreastMilkNotification = activedBreastMilkNotification;
     HairId                        = hairId;
     BloodId                       = bloodId;
 }
Beispiel #14
0
 public MovieClass(string t, EGenre genre, List <Actor> actors)
 {
     Initialize(t, genre, actors);
 }
Beispiel #15
0
 public Multilogy(string content, string name, string author, EGenre ganre) : base(content, name, author)
 {
     novels = new List <Novel>();
 }
Beispiel #16
0
 public Movie(string title, EGenre genre)
 {
     Initialize(title, genre);
 }
Beispiel #17
0
 public Novel(string content, string name, string author, EGenre ganre) : base(content, name, author)
 {
     this.ganre = ganre;
 }
Beispiel #18
0
 public Movie(string title, EGenre genre)
 {
     Initialize(genre: genre, title: title); //named parameters (not by position)
 }
 public static bool ChangeGenreScopeIsValid(this Person person, EGenre genre)
 {
     return(AssertionConcern.IsSatisfiedBy(
                AssertionConcern.AssertArgumentNotNull(genre, Errors.InvalidGenre)
                ));
 }
Beispiel #20
0
 public MovieClass(string t, EGenre genre)
 {
     Initialize(genre: genre, t: t);
 }
Beispiel #21
0
 public Movie(string title, EGenre genre, List <Actor> actors)
 {
     Initialize(title, genre, actors);
 }
Beispiel #22
0
 public Movie(string title, EGenre genre)
 {
     Initialize(genre: genre, title: title);
 }
 public static bool ChangeGenreScopeIsValid(this Person person, EGenre genre)
 {
     return AssertionConcern.IsSatisfiedBy(
                     AssertionConcern.AssertArgumentNotNull(genre, Errors.InvalidGenre)
         );
 }