C# Class Castle.MicroKernel.Context.CreationContext

Inheritance: System.MarshalByRefObject, ISubDependencyResolver
Afficher le fichier Open project: castleproject/Windsor Class Usage Examples

Méthodes publiques

Méthode Description
AttachExistingBurden ( Burden burden ) : void
BuildCycleMessageFor ( IHandler duplicateHandler, System.StringBuilder message ) : void
CanResolve ( CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency ) : bool
CreateBurden ( IComponentActivator componentActivator, bool trackedExternally ) : Burden
CreateEmpty ( ) : CreationContext

Creates a new, empty CreationContext instance.

A new CreationContext should be created every time, as the contexts keeps some state related to dependency resolution.

CreationContext ( IHandler handler, IReleasePolicy releasePolicy, Type requestedType, IDictionary additionalArguments, ITypeConverter converter, CreationContext parent ) : System

Initializes a new instance of the CreationContext class.

CreationContext ( Type requestedType, CreationContext parentContext, bool propagateInlineDependencies ) : System

Initializes a new instance of the CreationContext class.

EnterResolutionContext ( IHandler handlerBeingResolved, bool requiresDecommission ) : ResolutionContext
EnterResolutionContext ( IHandler handlerBeingResolved, bool trackContext, bool requiresDecommission ) : ResolutionContext
ForDependencyInspection ( IHandler handler ) : CreationContext
GetContextualProperty ( object key ) : object
IsInResolutionContext ( IHandler handler ) : bool

Method used by handlers to test whether they are being resolved in the context.

This method is provided as part of double dispatch mechanism for use by handlers. Outside of handlers, call IHandler.IsBeingResolvedInContext instead.

Resolve ( CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency ) : object
SelectScopeRoot ( IHandler>.Func scopeRootSelector ) : ResolutionContext
SetContextualProperty ( object key, object value ) : void

Private Methods

Méthode Description
CanConvertParameter ( Type type ) : bool
CanResolve ( DependencyModel dependency, object inlineArgument ) : bool
CanResolveByKey ( DependencyModel dependency ) : bool
CanResolveByType ( DependencyModel dependency ) : bool
CreationContext ( ) : System

Initializes a new instance of the CreationContext class.

EnsureAdditionalArgumentsWriteable ( IDictionary dictionary ) : IDictionary
ExitResolutionContext ( Burden burden, bool trackContext ) : void
ExtractGenericArguments ( Type typeToExtractGenericArguments ) : System.Type[]
Resolve ( DependencyModel dependency, object inlineArgument ) : object

Method Details

AttachExistingBurden() public méthode

public AttachExistingBurden ( Burden burden ) : void
burden Burden
Résultat void

BuildCycleMessageFor() public méthode

public BuildCycleMessageFor ( IHandler duplicateHandler, System.StringBuilder message ) : void
duplicateHandler IHandler
message System.StringBuilder
Résultat void

CanResolve() public méthode

public CanResolve ( CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency ) : bool
context CreationContext
contextHandlerResolver ISubDependencyResolver
model Castle.Core.ComponentModel
dependency Castle.Core.DependencyModel
Résultat bool

CreateBurden() public méthode

public CreateBurden ( IComponentActivator componentActivator, bool trackedExternally ) : Burden
componentActivator IComponentActivator
trackedExternally bool
Résultat Burden

CreateEmpty() public static méthode

Creates a new, empty CreationContext instance.
A new CreationContext should be created every time, as the contexts keeps some state related to dependency resolution.
public static CreateEmpty ( ) : CreationContext
Résultat CreationContext

CreationContext() public méthode

Initializes a new instance of the CreationContext class.
public CreationContext ( IHandler handler, IReleasePolicy releasePolicy, Type requestedType, IDictionary additionalArguments, ITypeConverter converter, CreationContext parent ) : System
handler IHandler The handler.
releasePolicy IReleasePolicy The release policy.
requestedType System.Type The type to extract generic arguments.
additionalArguments IDictionary The additional arguments.
converter ITypeConverter The conversion manager.
parent CreationContext Parent context
Résultat System

CreationContext() public méthode

Initializes a new instance of the CreationContext class.
public CreationContext ( Type requestedType, CreationContext parentContext, bool propagateInlineDependencies ) : System
requestedType System.Type The type to extract generic arguments.
parentContext CreationContext The parent context.
propagateInlineDependencies bool When set to true will clone .
Résultat System

EnterResolutionContext() public méthode

public EnterResolutionContext ( IHandler handlerBeingResolved, bool requiresDecommission ) : ResolutionContext
handlerBeingResolved IHandler
requiresDecommission bool
Résultat ResolutionContext

EnterResolutionContext() public méthode

public EnterResolutionContext ( IHandler handlerBeingResolved, bool trackContext, bool requiresDecommission ) : ResolutionContext
handlerBeingResolved IHandler
trackContext bool
requiresDecommission bool
Résultat ResolutionContext

ForDependencyInspection() public static méthode

public static ForDependencyInspection ( IHandler handler ) : CreationContext
handler IHandler
Résultat CreationContext

GetContextualProperty() public méthode

public GetContextualProperty ( object key ) : object
key object
Résultat object

IsInResolutionContext() public méthode

Method used by handlers to test whether they are being resolved in the context.
This method is provided as part of double dispatch mechanism for use by handlers. Outside of handlers, call IHandler.IsBeingResolvedInContext instead.
public IsInResolutionContext ( IHandler handler ) : bool
handler IHandler
Résultat bool

Resolve() public méthode

public Resolve ( CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency ) : object
context CreationContext
contextHandlerResolver ISubDependencyResolver
model Castle.Core.ComponentModel
dependency Castle.Core.DependencyModel
Résultat object

SelectScopeRoot() public méthode

public SelectScopeRoot ( IHandler>.Func scopeRootSelector ) : ResolutionContext
scopeRootSelector IHandler>.Func
Résultat ResolutionContext

SetContextualProperty() public méthode

public SetContextualProperty ( object key, object value ) : void
key object
value object
Résultat void