Removed Useful class

This commit is contained in:
Holger Boerchers 2018-08-17 10:22:29 +02:00
parent d7e6dcc3b2
commit 0400b9ff4c

View File

@ -1,41 +0,0 @@
using System;
namespace SmallInjectorDemo
{
/// <summary>
/// A very useful class.
/// </summary>
public class UsefulClass
{
private readonly IServiceOne _service1;
private readonly IServiceTwo _service2;
private readonly int _rand;
/// <summary>
/// Creates a new instance of <see cref="UsefulClass"/>.
/// </summary>
/// <param name="service1">injected service one.</param>
/// <param name="service2">injected service two.</param>
public UsefulClass(IServiceOne service1, IServiceTwo service2)
{
_service1 = service1;
_service2 = service2;
_rand = RandomHelper.NewRandomInteger(10, 99);
Console.WriteLine(nameof(UsefulClass) + ".ctor\tId: " + _rand);
}
/// <summary>
/// Test the injected services.
/// </summary>
public void TestTheServices()
{
Console.WriteLine(ToString());
Console.WriteLine(_service1.ToString());
Console.WriteLine(_service2.ToString());
}
/// <inheritdoc />
public override string ToString() => nameof(UsefulClass) + ".ToString()\tId: " + _rand;
}
}