Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            // Pick an auditor
            string     name    = args.Length >= 1 ? args[0] : "default";
            IUIAuditor auditor = CreateAuditor(name);

            // Inject auditor into the consumer class
            Consumer consumer = new Consumer(auditor);

            // Do stuff
            consumer.DoStuff();
        }
 public Consumer(IUIAuditor auditor)
 {
     Auditor = auditor;
 }