Castle.MicroKernel.Context.CreationContext
Used during a component request, passed along to the whole process.
This allow some data to be passed along the process, which is used
to detected cycled dependency graphs and now it's also being used
to provide arguments to components.
namespace Castle.MicroKernel.Context
{
public class CreationContext : MarshalByRefObject, ISubDependencyResolver
{
public class ResolutionContext : IDisposable
{
public Burden Burden { get; }
public CreationContext Context { get; }
public IHandler Handler { get; }
public ResolutionContext(CreationContext context, IHandler handler, bool requiresDecommission, bool trackContext);
public void AttachBurden(Burden burden);
public Burden CreateBurden(bool trackedExternally);
public object GetContextualProperty(object key);
public void SetContextualProperty(object key, object value);
public void Dispose();
}
public Arguments AdditionalArguments { get; }
public Type[] GenericArguments { get; }
public IHandler Handler { get; }
public bool HasAdditionalArguments { get; }
public virtual bool IsResolving { get; }
public IReleasePolicy ReleasePolicy { get; set; }
public Type RequestedType { get; }
public CreationContext(Type requestedType, CreationContext parentContext, bool propagateInlineDependencies);
public CreationContext(IHandler handler, IReleasePolicy releasePolicy, Type requestedType, Arguments additionalArguments, ITypeConverter converter, CreationContext parent);
public void AttachExistingBurden(Burden burden);
public void BuildCycleMessageFor(IHandler duplicateHandler, StringBuilder message);
public Burden CreateBurden(IComponentActivator componentActivator, bool trackedExternally);
public ResolutionContext EnterResolutionContext(IHandler handlerBeingResolved, bool requiresDecommission);
public ResolutionContext EnterResolutionContext(IHandler handlerBeingResolved, bool trackContext, bool requiresDecommission);
public object GetContextualProperty(object key);
public bool IsInResolutionContext(IHandler handler);
public ResolutionContext SelectScopeRoot(Func<IHandler[], IHandler> scopeRootSelector);
public void SetContextualProperty(object key, object value);
public virtual bool CanResolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency);
public virtual object Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency);
public static CreationContext CreateEmpty();
public static CreationContext ForDependencyInspection(IHandler handler);
}
}