Beispiel #1
0
        public CompositionRoot(IConsoleWriter consoleWriter, ISingletonDemo singletonDemo, IUserLogin userLogin)
        {
            this.consoleWriter = consoleWriter ?? throw new ArgumentNullException("Console writer must be supplied.");
            this.singletonDemo = singletonDemo ?? throw new ArgumentNullException("Singleton Demo must be supplied.");
            this.userLogin     = userLogin ?? throw new ArgumentNullException("User Login must be supplied.");

            consoleWriter.LogMessage("Hello from the CompositionRoot Constructor!");
        }
Beispiel #2
0
        public CompositionRoot(
            IConsoleWriter consoleWriter,
            ISingletonDemo singletonDemo

            )
        {
            _singletonDemo = singletonDemo;
            _consoleWriter = consoleWriter;
            _consoleWriter.LogMessage("Hello from CompositionRoot Constructor!");
        }
Beispiel #3
0
 public ConsoleWriter(ISingletonDemo singletonDemo)
 {
     this.singletonDemo = singletonDemo;
 }
 static void PrintPersonInformation(ISingletonDemo singleton, Person person)
 {
     singleton.PrintInformation($"From { person.ToString() }.");
 }
Beispiel #5
0
 public CompositionRoot(IConsoleWriter consoleWriter, ISingletonDemo singletonDemo)
 {
     this.consoleWriter = consoleWriter;
     this.singletonDemo = singletonDemo;
 }
Beispiel #6
0
 public CompositionRoot(IConsoleWriter consoleWriter, ISingletonDemo singletonDemo)
 {
     this.consoleWriter = consoleWriter;
     this.singletonDemo = singletonDemo;
     consoleWriter.LogMessage("Hello from CompositionRoot Constructor");
 }
Beispiel #7
0
 public CompositionRoot(IConsoleWriter consoleWriter, ISingletonDemo singletonDemo)
 {
     this._consoleWriter = consoleWriter;
     this._singletonDemo = singletonDemo;
     _consoleWriter.LogMessage("This is from CompositionRoot constructor.");
 }