IFeatureContainer.AddFeature Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a new feature to the container by instantiating the passed in type.
Overloads
AddFeature<T,V>(ActivationContext<V>) |
Adds a new feature to the container by instantiating the passed in type. The default lifetime will be singleton. |
AddFeature<T,V>(V) |
Adds a new feature to the container by storing the passed in instance. The lifetime of the instance will not be managed by the container. |
AddFeature<T,V>(ActivationContext<V>, String) |
Adds a new feature to the container by instantiating the passed in type. The default lifetime will be singleton. |
AddFeature<T,V>(ActivationContext<V>)
Adds a new feature to the container by instantiating the passed in type. The default lifetime will be singleton.
public:
generic <typename T, typename V>
where V : T void AddFeature(Microsoft::EnterpriseManagement::ActivationContext<V> ^ context);
public void AddFeature<T,V> (Microsoft.EnterpriseManagement.ActivationContext<V> context) where V : T;
abstract member AddFeature : Microsoft.EnterpriseManagement.ActivationContext<#'T> -> unit
Public Sub AddFeature(Of T, V) (context As ActivationContext(Of V))
Type Parameters
- T
- V
Parameters
- context
- ActivationContext<V>
The context.
Applies to
AddFeature<T,V>(V)
Adds a new feature to the container by storing the passed in instance. The lifetime of the instance will not be managed by the container.
public:
generic <typename T, typename V>
where V : T void AddFeature(V instance);
public void AddFeature<T,V> (V instance) where V : T;
abstract member AddFeature : 'V -> unit
Public Sub AddFeature(Of T, V) (instance As V)
Type Parameters
- T
- V
Parameters
- instance
- V
The instance to store.
Applies to
AddFeature<T,V>(ActivationContext<V>, String)
Adds a new feature to the container by instantiating the passed in type. The default lifetime will be singleton.
public:
generic <typename T, typename V>
where V : T void AddFeature(Microsoft::EnterpriseManagement::ActivationContext<V> ^ context, System::String ^ featureName);
public void AddFeature<T,V> (Microsoft.EnterpriseManagement.ActivationContext<V> context, string featureName) where V : T;
abstract member AddFeature : Microsoft.EnterpriseManagement.ActivationContext<#'T> * string -> unit
Public Sub AddFeature(Of T, V) (context As ActivationContext(Of V), featureName As String)
Type Parameters
- T
- V
Parameters
- context
- ActivationContext<V>
The context.
- featureName
- String
The feature name to add.