Пример #1
0
 private static void CreateCustomer(Guid id, int age, string firstName, string lastName, BirthDate birthDate)
 {
     try
     {
         System.Diagnostics.Debugger.Break();
         Console.Out.WriteLine(new AttributedCustomer(
                                   id, age, firstName, lastName, birthDate).ToString());
     }
     catch (ArgumentNullException)
     {
         Console.Out.WriteLine("ArgumentNullException");
     }
 }
Пример #2
0
 private static void CreateCustomerWithDefinedToString(Guid id, int age, string firstName, string lastName, BirthDate birthDate)
 {
     try
     {
         Console.Out.WriteLine(new AttributedCustomerWithDefinedToString(
                                   id, age, firstName, lastName, birthDate).ToString());
     }
     catch (ArgumentNullException)
     {
         Console.Out.WriteLine("ArgumentNullException");
     }
 }
Пример #3
0
 public AttributedCustomer(Guid id, [NotNull] int age,
                           [NotNull] string firstName, [NotNull] string lastName, BirthDate birthDate)
     : this()
 {
     this.Id        = id;
     this.Age       = age;
     this.FirstName = firstName;
     this.LastName  = lastName;
     this.BirthDate = birthDate;
 }