Beispiel #1
0
 public Phone CreatePhone()
 {
     var phone = new Phone();
     phone.Brand = "Apple";
     phone.Model = "iPhone 4";
     phone.Os = OS.iOS;
     phone.Price = 1000;
     phone.AssemblyDate = DateTime.Now;
     return phone;
 }
 public Phone CreatePhone()
 {
     var phone = new Phone();
     phone.Brand = "HTC";
     phone.Model = "DesireHD";
     phone.Os = OS.Android;
     phone.Price = 800;
     phone.AssemblyDate = DateTime.Now;
     return phone;
 }
Beispiel #3
0
 public Phone CreatePhone()
 {
     var phone = new Phone();
     phone.Brand = "HTC";
     phone.Model = "HD7";
     phone.Os = OS.WP7;
     phone.Price = 900;
     phone.AssemblyDate = DateTime.Now;
     return phone;
 }
Beispiel #4
0
 public string Generate(Phone phone)
 {
     done++;
     return phone.Brand.Length.ToString() + Convert.ToString(phone.Brand.GetHashCode()) + done + phone.Model.Length.ToString() + phone.AssemblyDate.Ticks;
 }