static void Main() { try { ConfigureDatabase(); IWindsorContainer container = new WindsorContainer(); container.AddComponent("logger", typeof(ILogger), typeof(ConsoleLoggerImpl)); container.AddComponent("auditor", typeof(IAuditor), typeof(AuditorImpl)); container.AddComponent("authorization", typeof(IAuthorization), typeof(AuthorizationImpl)); container.AddComponent("repository", typeof(IRepository), typeof(RepositoryImpl)); container.AddComponent("customer_finder", typeof(ICustomerFinder), typeof(CustomerFinderImpl)); ICustomerFinder customerFinder = container.Resolve <ICustomerFinder>(); ICollection <Customer> customers = customerFinder.FindCustomersByName("oren"); foreach (Customer customer in customers) { Console.WriteLine("Got customer: " + customer.Name); } } catch (Exception e) { System.Console.WriteLine(e); } }
public NewsletterService(ICustomerFinder customerFinder) { this.customerFinder = customerFinder; }
public CustomerFinderSorter(ICustomerFinder customerFinder) { this.customerFinder = customerFinder; }
public void SetUp() { this.customerFinder = A.Fake<ICustomerFinder>(); this.testee = new NewsletterService(this.customerFinder); }
public Startup(IConfigurationReader configurationReader, ICustomerFinder customerFinder, IInviter inviter) { this.configurationReader = configurationReader; this.customerFinder = customerFinder; this.inviter = inviter; }
public void SetUp() { this.customerFinder = A.Fake <ICustomerFinder>(); this.testee = new NewsletterService(this.customerFinder); }
public GetCustomerForUserQueryHandler(ICustomerFinder customerFinder) { _customerFinder = customerFinder; }