public CommandFactoryWithLazyLoading(IPhonebookRepository data, IPrinter printer, IPhoneNumberSanitizer sanitizer) { // TODO: Complete member initialization this.data = data; this.printer = printer; this.sanitizer = sanitizer; }
//! Lazy loading private void InitializeLazyLoadCommandClasses(IPhoneNumberSanitizer sanitizer) { this.addPhoneCommand = new Lazy<AddPhoneCommand>(() => new AddPhoneCommand(this.PhonebookRepository, sanitizer)); this.changePhoneCommand = new Lazy<ChangePhoneCommand>(() => new ChangePhoneCommand(this.PhonebookRepository, sanitizer)); this.deletePhoneCommand = new Lazy<DeletePhoneCommand>(() => new DeletePhoneCommand(this.PhonebookRepository)); this.listPhonesCommand = new Lazy<ListPhonesCommand>(() => new ListPhonesCommand(this.PhonebookRepository)); }
//! Lazy loading private void InitializeLazyLoadCommandClasses(IPhoneNumberSanitizer sanitizer) { this.addPhoneCommand = new Lazy <AddPhoneCommand>(() => new AddPhoneCommand(this.PhonebookRepository, sanitizer)); this.changePhoneCommand = new Lazy <ChangePhoneCommand>(() => new ChangePhoneCommand(this.PhonebookRepository, sanitizer)); this.deletePhoneCommand = new Lazy <DeletePhoneCommand>(() => new DeletePhoneCommand(this.PhonebookRepository)); this.listPhonesCommand = new Lazy <ListPhonesCommand>(() => new ListPhonesCommand(this.PhonebookRepository)); }
public AddPhoneCommand(IPhonebookRepository data, IPrinter printer, IPhoneNumberSanitizer sanitizer) { this.printer = printer; this.data = data; this.sanitizer = sanitizer; }
public CommandFactoryWithLazyLoading(IPhonebookRepository data, IPrinter printer, IPhoneNumberSanitizer sanitizer) { this.data = data; this.sanitizer = sanitizer; this.printer = printer; }
public CommandFactoryWithDictionary(IPhonebookRepository phonebookRepository, IPhoneNumberSanitizer sanitizer) { this.sanitizer = sanitizer; this.InitializeCommandList(phonebookRepository); }
public AddPhoneCommand(IPhonebookRepository phonebookRepository, IPhoneNumberSanitizer sanitizer) : base(phonebookRepository) { this.sanitizer = sanitizer; }
// TODO: Validate Sanitizer public CommandFactoryWithLazyLoading(IPhonebookRepository phonebookRepository, IPhoneNumberSanitizer sanitizer) { this.PhonebookRepository = phonebookRepository; this.InitializeLazyLoadCommandClasses(sanitizer); }
public CommandFactoryWithLazyLoading(IDeletablePhonebookRepository data, IPrinter printer, IPhoneNumberSanitizer sanitizer) { this.data = data; this.printer = printer; this.sanitizer = sanitizer; }
public RemovePhoneCommand(IDeletablePhonebookRepository data, IPrinter printer, IPhoneNumberSanitizer sanitizer) { this.printer = printer; this.data = data; this.sanitizer = sanitizer; }