C# Class SharpArch.Castle.Extensions.WindsorPropertyInjectionExtensions

Property injection support for Windsor.
Afficher le fichier Open project: sharparchitecture/Sharp-Architecture

Méthodes publiques

Méthode Description
CleanupInjectableProperties ( [ kernel, [ target, ITypePropertyDescriptorCache cache ) : void

Cleanups up injectable properties. All injectable properties will be set to null.

Since this method does not perform dependency validation InjectProperties , cache is used as read-only. Calling CleanupInjectableProperties without call to InjectProperties on the same type will incur performance penalty as list of properties will be evaluated every time.

InjectProperties ( [ kernel, [ target, [ cache, ComponentModel>.Action validatePropertyRegistration = null ) : void

Injects dependencies into properties.

Private Methods

Méthode Description
GetInjectableProperties ( IKernel kernel, ITypePropertyDescriptorCache cache, ComponentModel>.Action validatePropertyRegistration, Type type ) : TypePropertyDescriptor
GetInjectableProperties ( Type type, IKernel kernel, ComponentModel>.Action validatePropertyRegistration ) : TypePropertyDescriptor
GetOrAdd ( IKernel kernel, ITypePropertyDescriptorCache cache, Type type, ComponentModel>.Action validatePropertyRegistration ) : TypePropertyDescriptor

Method Details

CleanupInjectableProperties() public static méthode

Cleanups up injectable properties. All injectable properties will be set to null.
Since this method does not perform dependency validation InjectProperties , cache is used as read-only. Calling CleanupInjectableProperties without call to InjectProperties on the same type will incur performance penalty as list of properties will be evaluated every time.
public static CleanupInjectableProperties ( [ kernel, [ target, ITypePropertyDescriptorCache cache ) : void
kernel [ Windsor kernel.
target [ The target object to cleanup injectable properties.
cache ITypePropertyDescriptorCache Injectable property descriptor cache.
Résultat void

InjectProperties() public static méthode

Injects dependencies into properties.
is .
public static InjectProperties ( [ kernel, [ target, [ cache, ComponentModel>.Action validatePropertyRegistration = null ) : void
kernel [ Windsor kernel
target [ The target object to inject properties.
cache [ Injectable property descriptor cache.
validatePropertyRegistration ComponentModel>.Action /// Callback to validate property dependency to be injected. Must throw /// exception in case of failure. ///
Résultat void