Holger Börchers 291eafeeba
All checks were successful
build (7.0.x)
added unit tests
2023-03-29 21:47:10 +02:00

27 lines
686 B
C#

using SmallInjectorDemo.Interfaces;
namespace SmallInjectorDemo;
/// <inheritdoc />
/// <summary>
/// Implementation of <see cref="T:SmallInjectorDemo.IServiceTwo" />.
/// </summary>
public class ServiceTwo : IServiceTwo
{
private readonly IClock _clock;
private readonly string _id;
/// <summary>
/// Creates a new instance of <see cref="ServiceTwo"/>.
/// </summary>
public ServiceTwo(IClock clock)
{
_clock = clock;
_id = Guid.NewGuid().EncodeBase64String();
Console.WriteLine(Helper.WriteMethodString(clock, _id));
}
/// <inheritdoc />
public override string ToString() => Helper.WriteMethodString(_clock, _id);
}