A lot of comments.

This commit is contained in:
Holger Boerchers
2018-08-12 13:44:42 +02:00
parent 7326ff6684
commit c381375dbd
7 changed files with 94 additions and 35 deletions

View File

@@ -1,15 +1,19 @@
using System;
namespace Playground
namespace SmallInjectorDemo
{
internal static class Program
{
private static void Main()
{
Console.WriteLine("Small dependency injection example.");
Console.WriteLine();
var injector = new SmallInjector();
Console.WriteLine("Register " + nameof(ServiceOne));
injector.RegisterType<ServiceOne, IServiceOne>(true);
Console.WriteLine("Register " + nameof(ServiceTwo));
injector.RegisterType<ServiceTwo, IServiceTwo>(true);
Console.WriteLine("Register " + nameof(UsefulClass));
injector.RegisterType<UsefulClass>(false);
Console.WriteLine();