27 lines
686 B
C#
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);
|
|
}
|