C# Класс 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.
Наследование: HasLifecycle, IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

AddInstance() публичный Метод

Add an additional Instance to this PluginFamily/PluginType
public AddInstance ( StructureMap.Pipeline.Instance instance ) : void
instance StructureMap.Pipeline.Instance
Результат void

AddType() публичный Метод

Add a single concrete type as a new Instance with a derived name. Is idempotent.
public AddType ( Type concreteType ) : void
concreteType System.Type
Результат void

AddType() публичный Метод

Adds a new Instance for the concreteType with a name
public AddType ( Type concreteType, string name ) : void
concreteType System.Type
name string
Результат void

CreateTemplatedClone() публичный Метод

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
Результат PluginFamily

GetDefaultInstance() публичный Метод

Determine the default instance if it can. May return null.
public GetDefaultInstance ( ) : StructureMap.Pipeline.Instance
Результат StructureMap.Pipeline.Instance

GetInstance() публичный Метод

Find a named instance for this PluginFamily
public GetInstance ( string name ) : StructureMap.Pipeline.Instance
name string
Результат StructureMap.Pipeline.Instance

PluginFamily() публичный Метод

public PluginFamily ( Type pluginType ) : System
pluginType System.Type
Результат System

RemoveAll() публичный Метод

Removes all Instances and resets the default Instance determination
public RemoveAll ( ) : void
Результат void

RemoveInstance() публичный Метод

completely removes an Instance from a PluginFamily
public RemoveInstance ( StructureMap.Pipeline.Instance instance ) : void
instance StructureMap.Pipeline.Instance
Результат void

SetDefault() публичный Метод

Sets the default Instance.
public SetDefault ( StructureMap.Pipeline.Instance instance ) : void
instance StructureMap.Pipeline.Instance
Результат void