public static void Main() { ILogger logger = new FileLogger(); Repository repository = new Repository(logger); RepositoryConsumer consumer = new RepositoryConsumer(repository); ISpamFilter spamFilter = new MySpamFilter(logger); // Logger je proslijeđen konstrukoru klase MySpamFilter EmailService emailService = new CodeBlocks.EmailService(spamFilter, logger); Bootstrap.Configure(); }
public void Run() { ILogger logger = new FileLogger(); Repository repository = new Repository(logger); RepositoryConsumer consumer = new RepositoryConsumer(repository); }