Exemplo n.º 1
0
        public ICasted ToSelf()
        {
            CastableRegistration <TCastable> .RequiersNotInterface(ServiceType);

            As(Registration.CastTo = ServiceType);

            return(this);
        }
Exemplo n.º 2
0
        public ICasted As <TService>() where TService : TCastable, new()
        {
            var castTo = typeof(TService);

            CastableRegistration <TCastable> .RequiersNotInterface(castTo);

            return(As(Registration.CastTo = castTo));
        }
Exemplo n.º 3
0
        public IReusedWithin AsSingleton()
        {
            var type = Registration.CastTo.IsNull() ? ServiceType : CastTo;

            CastableRegistration <TCastable> .RequiersNotInterface(type);

            As(type);

            return(Registration.AsSingleton());
        }