33 lines
796 B
C#
33 lines
796 B
C#
using System;
|
|
|
|
namespace SmallInjectorDemo
|
|
{
|
|
/// <summary>
|
|
/// Implementation of <see cref="IServiceTwo"/>.
|
|
/// </summary>
|
|
public class ServiceTwo : IServiceTwo
|
|
{
|
|
private const string MyName = nameof(ServiceTwo);
|
|
private readonly int _rand;
|
|
|
|
/// <summary>
|
|
/// Creates a new instance of <see cref="ServiceTwo"/>.
|
|
/// </summary>
|
|
public ServiceTwo()
|
|
{
|
|
_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 two.
|
|
/// </summary>
|
|
public interface IServiceTwo
|
|
{
|
|
|
|
}
|
|
} |