SmallInjectorDemo/UsefulClass.cs
Holger Boerchers 7326ff6684 Initial commit
2018-08-12 13:23:44 +02:00

29 lines
786 B
C#

using System;
namespace Playground
{
public class UsefulClass
{
private readonly IServiceOne _service;
private readonly IServiceTwo _service2;
private readonly Guid _guid;
public UsefulClass(IServiceOne service, IServiceTwo service2)
{
_service = service;
_service2 = service2;
_guid = Guid.NewGuid();
Console.WriteLine(nameof(UsefulClass) + ".ctor\tId: " + _guid);
}
public void TestTheServices()
{
Console.WriteLine(ToString());
Console.WriteLine(_service.ToString());
Console.WriteLine(_service2.ToString());
}
public override string ToString() => nameof(UsefulClass) + ".ToString()\tId: " + _guid;
}
}