RegistrationDiagnosticsInfo
Details about a registration.
using System;
using System.Runtime.CompilerServices;
namespace Stashbox.Registration
{
public readonly struct RegistrationDiagnosticsInfo
{
public readonly Type ServiceType;
public readonly Type ImplementationType;
public readonly object Name;
public RegistrationDiagnosticsInfo(Type serviceType, Type implementationType, object name)
{
this = default(RegistrationDiagnosticsInfo);
ServiceType = serviceType;
ImplementationType = implementationType;
Name = name;
}
public override string ToString()
{
DefaultInterpolatedStringHandler val = default(DefaultInterpolatedStringHandler);
val..ctor(12, 3);
val.AppendFormatted(ServiceType.GetDiagnosticsView());
val.AppendLiteral(" => ");
val.AppendFormatted(ImplementationType.GetDiagnosticsView());
val.AppendLiteral(", name: ");
val.AppendFormatted<object>(Name);
return val.ToStringAndClear();
}
}
}