Ejemplo n.º 1
0
        public static DecorationRegistration <BasedOnDescriptor> Decorated(this BasedOnDescriptor extended)
        {
            DecoratorApplier decoratorApplier = new DecoratorApplier();
            var decorationRegistration        = new DecorationRegistration <BasedOnDescriptor>(extended, decoratorApplier);

            extended.Configure(registration => registration.GetResolveExtensions().Add(decoratorApplier));

            return(decorationRegistration);
        }
 public static BasedOnDescriptor LifestylePerWebRequest(this BasedOnDescriptor descriptor)
 {
     return(descriptor.Configure(c => c.LifestylePerWebRequest()));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Allows customized configurations of each matching type.
 /// </summary>
 /// <param name="configurer">The configuration action.</param>
 /// <returns></returns>
 public BasedOnDescriptor Configure(Action <ComponentRegistration> configurer)
 {
     return(basedOn.Configure(configurer));
 }