public void Apply(Component component, ComponentRegistration registration) { AbstractConfigurationRunner.Kernel.Register( Castle.MicroKernel.Registration.Component.For(interceptorType).OnlyNewServices() ); registration.Interceptors(InterceptorReference.ForType(interceptorType)).First .OverWrite(); }
public override void Apply(Component component, ComponentRegistration registration) { if (factoryMethod == null) { base.Apply(component, registration); } else { registration.UsingFactoryMethod(factoryMethod); } }
void IComponentExtension.Apply(Component component, ComponentRegistration registration) { if (!string.IsNullOrEmpty(startMethod)) { registration.StartUsingMethod(startMethod); } if (!string.IsNullOrEmpty(stopMethod)) { registration.StopUsingMethod(stopMethod); } }
public virtual void Apply(Component component, ComponentRegistration registration) { registration.AddDescriptor(this); }
public static bool TryGetComponentByName(string name, out Component component) { component = null; foreach (INeedSecondPassRegistration secondPassRegistration in NeedSecondPassRegistrations) { Component c = secondPassRegistration as Component; if (c == null) continue; if (c.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase)) { component = c; return true; } } return false; }
public ComponentReference(Component component) : this(component.Name) { }
public virtual void Apply(Component component, ComponentRegistration registration) { registration.LifeStyle.Is(lifestyle); }
public override void Apply(Component component, ComponentRegistration registration) { registration.LifeStyle.Custom(customLifestyleType); }
public override void Apply(Component component, ComponentRegistration registration) { registration.LifeStyle.PooledWithSize(initialPoolSize.GetValueOrDefault(), maxPoolSize.GetValueOrDefault()); }
public Extend(string name, params IComponentExtension[] extensions) { component = BooReader.GetComponentByName(name); BooReader.NeedSecondPassRegistrations.Add(this); component.RegisterExtensions(extensions); }
public virtual void Apply(Component component, ComponentRegistration registration) { registration.OnCreate(onCreate); }