public Customer(CustomerData newCustomer) { if (newCustomer != null) { newCustomer.ID = ICustomerInformation.GenerateNewCustomerNumber(); } myCustomer = newCustomer; customerAccounts = new List <Account>(); }
private static void Main(string[] args) { WindsorContainerWrapper containerWrapper = new WindsorContainerWrapper(new WindsorContainer(), new MainAssemblyProvider(), new PluginRegistration()); containerWrapper.RegistrationLogger = new ConsoleLogger(); containerWrapper.Install(); IWindsorContainer container = containerWrapper.WindsorContainer; do { Console.Write("Customer Key: "); Console.ReadLine(); //ContextUtilities.ContextValidationString = Console.ReadLine(); ICustomerInformation customerInformation = container.Resolve <ICustomerInformation>(); IConsoleWriter consoleWriter = container.Resolve <IConsoleWriter>(); consoleWriter.WriteCustomerInformation(customerInformation); } while (Console.ReadLine() != "exit".ToLower()); }
public void WriteCustomerInformation(ICustomerInformation information) { Console.WriteLine(information.CustomerName); Console.WriteLine(information.Location); Console.WriteLine(information.CustomerJoinDate.ToString(formatter.GetFormat())); }