C# Class Castle.MicroKernel.Registration.ServiceDescriptor

Afficher le fichier Open project: castleproject/Windsor Class Usage Examples

Méthodes publiques

Méthode Description
AllInterfaces ( ) : Castle.MicroKernel.Registration.BasedOnDescriptor

Uses all interfaces implemented by the type (or its base types) as well as their base interfaces.

Base ( ) : Castle.MicroKernel.Registration.BasedOnDescriptor

Uses the base type matched on.

DefaultInterfaces ( ) : Castle.MicroKernel.Registration.BasedOnDescriptor

Uses all interfaces that have names matched by implementation type name. Matches Foo to IFoo, SuperFooExtended to IFoo and IFooExtended etc

FirstInterface ( ) : Castle.MicroKernel.Registration.BasedOnDescriptor

Uses the first interface of a type. This method has non-deterministic behavior when type implements more than one interface!

FromInterface ( ) : Castle.MicroKernel.Registration.BasedOnDescriptor

Uses base type to lookup the sub interface.

FromInterface ( Type implements ) : Castle.MicroKernel.Registration.BasedOnDescriptor

Uses implements to lookup the sub interface. For example: if you have IService and IProductService : ISomeInterface, IService, ISomeOtherInterface. When you call FromInterface(typeof(IService)) then IProductService will be used. Useful when you want to register _all_ your services and but not want to specify all of them.

Select ( IEnumerable types ) : Castle.MicroKernel.Registration.BasedOnDescriptor

Assigns the supplied service types.

Select ( ServiceSelector selector ) : Castle.MicroKernel.Registration.BasedOnDescriptor

Assigns a custom service selection strategy.

Self ( ) : Castle.MicroKernel.Registration.BasedOnDescriptor

Uses the type itself.

Private Methods

Méthode Description
AddFromInterface ( Type type, Type implements, ICollection matches ) : void
GetInterfaceName ( Type @interface ) : string
GetServices ( Type type, Type baseType ) : ICollection
GetTopLevelInterfaces ( Type type ) : IEnumerable
ServiceDescriptor ( Castle.MicroKernel.Registration.BasedOnDescriptor basedOnDescriptor ) : System
WorkaroundCLRBug ( Type serviceType ) : Type

This is a workaround for a CLR bug in which GetInterfaces() returns interfaces with no implementations.

Method Details

AllInterfaces() public méthode

Uses all interfaces implemented by the type (or its base types) as well as their base interfaces.
public AllInterfaces ( ) : Castle.MicroKernel.Registration.BasedOnDescriptor
Résultat Castle.MicroKernel.Registration.BasedOnDescriptor

Base() public méthode

Uses the base type matched on.
public Base ( ) : Castle.MicroKernel.Registration.BasedOnDescriptor
Résultat Castle.MicroKernel.Registration.BasedOnDescriptor

DefaultInterfaces() public méthode

Uses all interfaces that have names matched by implementation type name. Matches Foo to IFoo, SuperFooExtended to IFoo and IFooExtended etc
public DefaultInterfaces ( ) : Castle.MicroKernel.Registration.BasedOnDescriptor
Résultat Castle.MicroKernel.Registration.BasedOnDescriptor

FirstInterface() public méthode

Uses the first interface of a type. This method has non-deterministic behavior when type implements more than one interface!
public FirstInterface ( ) : Castle.MicroKernel.Registration.BasedOnDescriptor
Résultat Castle.MicroKernel.Registration.BasedOnDescriptor

FromInterface() public méthode

Uses base type to lookup the sub interface.
public FromInterface ( ) : Castle.MicroKernel.Registration.BasedOnDescriptor
Résultat Castle.MicroKernel.Registration.BasedOnDescriptor

FromInterface() public méthode

Uses implements to lookup the sub interface. For example: if you have IService and IProductService : ISomeInterface, IService, ISomeOtherInterface. When you call FromInterface(typeof(IService)) then IProductService will be used. Useful when you want to register _all_ your services and but not want to specify all of them.
public FromInterface ( Type implements ) : Castle.MicroKernel.Registration.BasedOnDescriptor
implements System.Type
Résultat Castle.MicroKernel.Registration.BasedOnDescriptor

Select() public méthode

Assigns the supplied service types.
public Select ( IEnumerable types ) : Castle.MicroKernel.Registration.BasedOnDescriptor
types IEnumerable
Résultat Castle.MicroKernel.Registration.BasedOnDescriptor

Select() public méthode

Assigns a custom service selection strategy.
public Select ( ServiceSelector selector ) : Castle.MicroKernel.Registration.BasedOnDescriptor
selector ServiceSelector
Résultat Castle.MicroKernel.Registration.BasedOnDescriptor

Self() public méthode

Uses the type itself.
public Self ( ) : Castle.MicroKernel.Registration.BasedOnDescriptor
Résultat Castle.MicroKernel.Registration.BasedOnDescriptor