SmallInjectorDemo/ServiceOne.cs
2018-08-12 20:11:01 +02:00

33 lines
796 B
C#

using System;
namespace SmallInjectorDemo
{
/// <summary>
/// Implementation of <see cref="IServiceOne"/>.
/// </summary>
public class ServiceOne : IServiceOne
{
private const string MyName = nameof(ServiceOne);
private readonly int _rand;
/// <summary>
/// Creates a new instance of <see cref="ServiceOne"/>.
/// </summary>
public ServiceOne()
{
_rand = RandomHelper.NewRandomInteger(10, 99);
Console.WriteLine(MyName + ".ctor\t\tId: " + _rand);
}
/// <inheritdoc />
public override string ToString() => MyName + ".ToString()\tId: " + _rand;
}
/// <summary>
/// Interface for service one.
/// </summary>
public interface IServiceOne
{
}
}