C# Class StructureMap.Graph.PluginFamily

Conceptually speaking, a PluginFamily object represents a point of abstraction or variability in the system. A PluginFamily defines a CLR Type that StructureMap can build, and all of the possible Plugin’s implementing the CLR Type.
Inheritance: HasLifecycle, IDisposable
Afficher le fichier Open project: structuremap/structuremap Class Usage Examples

Méthodes publiques

Méthode Description
AddInstance ( StructureMap.Pipeline.Instance instance ) : void

Add an additional Instance to this PluginFamily/PluginType

AddType ( Type concreteType ) : void

Add a single concrete type as a new Instance with a derived name. Is idempotent.

AddType ( Type concreteType, string name ) : void

Adds a new Instance for the concreteType with a name

CreateTemplatedClone ( Type templateTypes ) : PluginFamily

If the PluginType is an open generic type, this method will create a closed type copy of this PluginFamily

GetDefaultInstance ( ) : StructureMap.Pipeline.Instance

Determine the default instance if it can. May return null.

GetInstance ( string name ) : StructureMap.Pipeline.Instance

Find a named instance for this PluginFamily

PluginFamily ( Type pluginType ) : System
RemoveAll ( ) : void

Removes all Instances and resets the default Instance determination

RemoveInstance ( StructureMap.Pipeline.Instance instance ) : void

completely removes an Instance from a PluginFamily

SetDefault ( StructureMap.Pipeline.Instance instance ) : void

Sets the default Instance.

Private Methods

Méthode Description
ExplicitOverride ( Type pluginType, object @default ) : PluginFamily
IDisposable ( ) : void
PluginFamily ( Type pluginType, object @default ) : System
assertInstanceIsValidForThisPluginType ( StructureMap.Pipeline.Instance instance ) : void
determineDefault ( ) : StructureMap.Pipeline.Instance
hasType ( Type concreteType ) : bool
resetDefault ( ) : void

Method Details

AddInstance() public méthode

Add an additional Instance to this PluginFamily/PluginType
public AddInstance ( StructureMap.Pipeline.Instance instance ) : void
instance StructureMap.Pipeline.Instance
Résultat void

AddType() public méthode

Add a single concrete type as a new Instance with a derived name. Is idempotent.
public AddType ( Type concreteType ) : void
concreteType System.Type
Résultat void

AddType() public méthode

Adds a new Instance for the concreteType with a name
public AddType ( Type concreteType, string name ) : void
concreteType System.Type
name string
Résultat void

CreateTemplatedClone() public méthode

If the PluginType is an open generic type, this method will create a closed type copy of this PluginFamily
public CreateTemplatedClone ( Type templateTypes ) : PluginFamily
templateTypes System.Type
Résultat PluginFamily

GetDefaultInstance() public méthode

Determine the default instance if it can. May return null.
public GetDefaultInstance ( ) : StructureMap.Pipeline.Instance
Résultat StructureMap.Pipeline.Instance

GetInstance() public méthode

Find a named instance for this PluginFamily
public GetInstance ( string name ) : StructureMap.Pipeline.Instance
name string
Résultat StructureMap.Pipeline.Instance

PluginFamily() public méthode

public PluginFamily ( Type pluginType ) : System
pluginType System.Type
Résultat System

RemoveAll() public méthode

Removes all Instances and resets the default Instance determination
public RemoveAll ( ) : void
Résultat void

RemoveInstance() public méthode

completely removes an Instance from a PluginFamily
public RemoveInstance ( StructureMap.Pipeline.Instance instance ) : void
instance StructureMap.Pipeline.Instance
Résultat void

SetDefault() public méthode

Sets the default Instance.
public SetDefault ( StructureMap.Pipeline.Instance instance ) : void
instance StructureMap.Pipeline.Instance
Résultat void