UnknownRegistrationConfigurator
Represents the fluent service registration api.
using System;
namespace Stashbox.Registration.Fluent
{
public class UnknownRegistrationConfigurator : RegistrationConfigurator
{
internal bool RegistrationShouldBeSkipped { get; set; }
internal UnknownRegistrationConfigurator(Type serviceType, Type implementationType)
: base(serviceType, implementationType)
{
}
public UnknownRegistrationConfigurator SetImplementationType(Type implementationType)
{
if (!implementationType.Implements(base.ServiceType))
throw new ArgumentException($"""{implementationType}""{base.ServiceType}""");
base.ImplementationType = implementationType;
return this;
}
public UnknownRegistrationConfigurator Skip()
{
RegistrationShouldBeSkipped = true;
return this;
}
}
}