public void Main() { AbstractCustomer customer1 = CustomerFactory.GetCustomer("Rob"); AbstractCustomer customer2 = CustomerFactory.GetCustomer("Joe"); AbstractCustomer customer3 = CustomerFactory.GetCustomer("Julie"); AbstractCustomer customer4 = CustomerFactory.GetCustomer("Laura"); Console.WriteLine(customer1.GetName()); Console.WriteLine(customer2.GetName()); Console.WriteLine(customer3.GetName()); Console.WriteLine(customer4.GetName()); }
static void Main(string[] args) { AbstractCustomer customer1 = CustomerFactory.GetCustomer("Rob"); AbstractCustomer customer2 = CustomerFactory.GetCustomer("Bob"); AbstractCustomer customer3 = CustomerFactory.GetCustomer("Julie"); AbstractCustomer customer4 = CustomerFactory.GetCustomer("Laura"); Console.WriteLine("Customers"); Console.WriteLine(customer1.Name); Console.WriteLine(customer2.Name); Console.WriteLine(customer3.Name); Console.WriteLine(customer4.Name); Console.ReadKey(); }
private void btNullObjectPattern_Click(object sender, EventArgs e) { string str = ""; AbstractCustomer customer1 = CustomerFactory.getCustomer("Rob"); AbstractCustomer customer2 = CustomerFactory.getCustomer("Bob"); AbstractCustomer customer3 = CustomerFactory.getCustomer("Julie"); AbstractCustomer customer4 = CustomerFactory.getCustomer("Laura"); str += "Customers"; str += customer1.getName() + "\r\n"; str += customer2.getName() + "\r\n"; str += customer3.getName() + "\r\n"; str += customer4.getName() + "\r\n"; tbOutWindow.Text = str; }
public async Task <string> Post([FromBody] AbstractCustomer customer) { return(await _customerManager.InsertAsync(customer)); }