public ICasted ToSelf() { CastableRegistration <TCastable> .RequiersNotInterface(ServiceType); As(Registration.CastTo = ServiceType); return(this); }
public ICasted As <TService>() where TService : TCastable, new() { var castTo = typeof(TService); CastableRegistration <TCastable> .RequiersNotInterface(castTo); return(As(Registration.CastTo = castTo)); }
public IReusedWithin AsSingleton() { var type = Registration.CastTo.IsNull() ? ServiceType : CastTo; CastableRegistration <TCastable> .RequiersNotInterface(type); As(type); return(Registration.AsSingleton()); }