Castle.MicroKernel.DefaultKernel
public class DefaultKernel : MarshalByRefObject, IKernel, IKernelEvents, IDisposable, IKernelInternal
Default implementation of IKernel. This implementation is complete and also support a kernel hierarchy (sub containers).
namespace Castle.MicroKernel
{
public class DefaultKernel : MarshalByRefObject, IKernel, IKernelEvents, IDisposable, IKernelInternal
{
public IComponentModelBuilder ComponentModelBuilder { get; set; }
public virtual IConfigurationStore ConfigurationStore { get; set; }
public GraphNode[] GraphNodes { get; }
public IHandlerFactory HandlerFactory { get; }
public virtual IKernel Parent { get; set; }
public IProxyFactory ProxyFactory { get; set; }
public IReleasePolicy ReleasePolicy { get; set; }
public IDependencyResolver Resolver { get; }
protected IConversionManager ConversionSubSystem { get; }
protected INamingSubSystem NamingSubSystem { get; }
public ILogger Logger { get; set; }
[Obsolete("Use Resolve(key, new Arguments()) instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual object this[string key] { get; }
[Obsolete("Use Resolve(service) instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual object this[Type service] { get; }
public event HandlerDelegate HandlerRegistered;
public event HandlersChangedDelegate HandlersChanged;
public event ComponentDataDelegate ComponentRegistered;
public event ComponentInstanceDelegate ComponentCreated;
public event ComponentInstanceDelegate ComponentDestroyed;
public event EventHandler AddedAsChildKernel;
public event EventHandler RegistrationCompleted;
public event EventHandler RemovedAsChildKernel;
public event ComponentModelDelegate ComponentModelCreated;
public event DependencyDelegate DependencyResolving;
public event ServiceDelegate EmptyCollectionResolving;
public DefaultKernel();
public DefaultKernel(IDependencyResolver resolver, IProxyFactory proxyFactory);
public DefaultKernel(IProxyFactory proxyFactory);
public DefaultKernel(SerializationInfo info, StreamingContext context);
public void GetObjectData(SerializationInfo info, StreamingContext context);
public virtual void Dispose();
public virtual void AddChildKernel(IKernel childKernel);
public virtual IHandler AddCustomComponent(ComponentModel model);
public virtual IKernel AddFacility(IFacility facility);
public IKernel AddFacility<T>() where T : IFacility, new;
public IKernel AddFacility<T>(Action<T> onCreate) where T : IFacility, new;
public void AddHandlerSelector(IHandlerSelector selector);
public void AddHandlersFilter(IHandlersFilter filter);
public virtual void AddSubSystem(string name, ISubSystem subsystem);
public virtual IHandler[] GetAssignableHandlers(Type service);
public virtual IFacility[] GetFacilities();
public virtual IHandler GetHandler(string name);
public virtual IHandler GetHandler(Type service);
public virtual IHandler[] GetHandlers(Type service);
public virtual ISubSystem GetSubSystem(string name);
public virtual bool HasComponent(string name);
public virtual bool HasComponent(Type serviceType);
public IKernel Register(params IRegistration[] registrations);
public virtual void ReleaseComponent(object instance);
public virtual void RemoveChildKernel(IKernel childKernel);
public virtual ILifestyleManager CreateLifestyleManager(ComponentModel model, IComponentActivator activator);
public virtual IComponentActivator CreateComponentActivator(ComponentModel model);
protected CreationContext CreateCreationContext(IHandler handler, Type requestedType, IDictionary additionalArguments, CreationContext parent, IReleasePolicy policy);
protected void DisposeHandler(IHandler handler);
protected virtual void RegisterSubSystems();
protected object ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy);
protected virtual IHandler WrapParentHandler(IHandler parentHandler);
public IDisposable OptimizeDependencyResolution();
protected virtual void RaiseAddedAsChildKernel();
protected virtual void RaiseComponentCreated(ComponentModel model, object instance);
protected virtual void RaiseComponentDestroyed(ComponentModel model, object instance);
protected virtual void RaiseComponentModelCreated(ComponentModel model);
protected virtual void RaiseComponentRegistered(string key, IHandler handler);
protected virtual void RaiseDependencyResolving(ComponentModel client, DependencyModel model, object dependency);
protected virtual void RaiseHandlerRegistered(IHandler handler);
protected virtual void RaiseHandlersChanged();
protected virtual void RaiseRegistrationCompleted();
protected virtual void RaiseRemovedAsChildKernel();
public virtual void AddComponent(string key, Type classType);
public void AddComponent(string key, Type classType, LifestyleType lifestyle);
public void AddComponent(string key, Type classType, LifestyleType lifestyle, bool overwriteLifestyle);
public virtual void AddComponent(string key, Type serviceType, Type classType);
public void AddComponent(string key, Type serviceType, Type classType, LifestyleType lifestyle);
public void AddComponent(string key, Type serviceType, Type classType, LifestyleType lifestyle, bool overwriteLifestyle);
public void AddComponent<T>();
public void AddComponent<T>(LifestyleType lifestyle);
public void AddComponent<T>(LifestyleType lifestyle, bool overwriteLifestyle);
public void AddComponent<T>(Type serviceType);
public void AddComponent<T>(Type serviceType, LifestyleType lifestyle);
public void AddComponent<T>(Type serviceType, LifestyleType lifestyle, bool overwriteLifestyle);
public void AddComponentInstance(string key, object instance);
public void AddComponentInstance(string key, Type serviceType, object instance);
public void AddComponentInstance(string key, Type serviceType, Type classType, object instance);
public void AddComponentInstance<T>(object instance);
public void AddComponentInstance<T>(Type serviceType, object instance);
public virtual void AddComponentWithExtendedProperties(string key, Type classType, IDictionary extendedProperties);
public virtual void AddComponentWithExtendedProperties(string key, Type serviceType, Type classType, IDictionary extendedProperties);
public virtual IKernel AddFacility(string key, IFacility facility);
public IKernel AddFacility<T>(string key) where T : IFacility, new;
public IKernel AddFacility<T>(string key, Action<T> onCreate) where T : IFacility, new;
public object Resolve(string key, IDictionary arguments);
public object Resolve(string key, object argumentsAsAnonymousType);
public virtual object Resolve(string key, Type service);
public virtual object Resolve(string key, Type service, IDictionary arguments);
public T Resolve<T>(IDictionary arguments);
public T Resolve<T>(object argumentsAsAnonymousType);
public T Resolve<T>();
public T Resolve<T>(string key);
public T Resolve<T>(string key, IDictionary arguments);
public object Resolve(Type service);
public object Resolve(Type service, IDictionary arguments);
public object Resolve(Type service, object argumentsAsAnonymousType);
public Array ResolveAll(Type service);
public Array ResolveAll(Type service, IDictionary arguments);
public Array ResolveAll(Type service, object argumentsAsAnonymousType);
public TService[] ResolveAll<TService>(object argumentsAsAnonymousType);
public TService[] ResolveAll<TService>(IDictionary arguments);
public TService[] ResolveAll<TService>();
}
}