Jaa


ContainerConfiguration.WithExport Method

Definition

Overloads

WithExport(Type, Object)

Add a single instance to the container.

WithExport(Type, Object, String, IDictionary<String,Object>)

Add a single instance to the container.

WithExport<TExport>(TExport, String, IDictionary<String,Object>)

Add a single instance to the container.

WithExport<TExport>(TExport)

Add a single instance to the container.

WithExport(Type, Object)

Source:
ContainerConfiguration.cs
Source:
ContainerConfiguration.cs
Source:
ContainerConfiguration.cs

Add a single instance to the container.

public:
 System::Composition::Hosting::ContainerConfiguration ^ WithExport(Type ^ contractType, System::Object ^ exportedInstance);
public System.Composition.Hosting.ContainerConfiguration WithExport (Type contractType, object exportedInstance);
member this.WithExport : Type * obj -> System.Composition.Hosting.ContainerConfiguration
Public Function WithExport (contractType As Type, exportedInstance As Object) As ContainerConfiguration

Parameters

contractType
Type

The type of the contract of the instance.

exportedInstance
Object

The instance to add to the container.

Returns

A configuration object allowing configuration to continue.

Applies to

WithExport(Type, Object, String, IDictionary<String,Object>)

Source:
ContainerConfiguration.cs
Source:
ContainerConfiguration.cs
Source:
ContainerConfiguration.cs

Add a single instance to the container.

public System.Composition.Hosting.ContainerConfiguration WithExport (Type contractType, object exportedInstance, string contractName = default, System.Collections.Generic.IDictionary<string,object> metadata = default);
member this.WithExport : Type * obj * string * System.Collections.Generic.IDictionary<string, obj> -> System.Composition.Hosting.ContainerConfiguration
Public Function WithExport (contractType As Type, exportedInstance As Object, Optional contractName As String = Nothing, Optional metadata As IDictionary(Of String, Object) = Nothing) As ContainerConfiguration

Parameters

contractType
Type

The type of the contract of the instance.

exportedInstance
Object

The instance to add to the container.

contractName
String

An optional name that distinguishes this contract from others with the same type.

metadata
IDictionary<String,Object>

Optionally, a non-empty collection of named constraints that apply to the contract.

Returns

A configuration object allowing configuration to continue.

Applies to

WithExport<TExport>(TExport, String, IDictionary<String,Object>)

Source:
ContainerConfiguration.cs
Source:
ContainerConfiguration.cs
Source:
ContainerConfiguration.cs

Add a single instance to the container.

public System.Composition.Hosting.ContainerConfiguration WithExport<TExport> (TExport exportedInstance, string contractName = default, System.Collections.Generic.IDictionary<string,object> metadata = default);
member this.WithExport : 'Export * string * System.Collections.Generic.IDictionary<string, obj> -> System.Composition.Hosting.ContainerConfiguration
Public Function WithExport(Of TExport) (exportedInstance As TExport, Optional contractName As String = Nothing, Optional metadata As IDictionary(Of String, Object) = Nothing) As ContainerConfiguration

Type Parameters

TExport

The type of the contract of the instance.

Parameters

exportedInstance
TExport

The instance to add to the container.

contractName
String

Optionally, a name that distinguishes this contract from others with the same type.

metadata
IDictionary<String,Object>

Optionally, a non-empty collection of named constraints that apply to the contract.

Returns

A configuration object allowing configuration to continue.

Applies to

WithExport<TExport>(TExport)

Source:
ContainerConfiguration.cs
Source:
ContainerConfiguration.cs
Source:
ContainerConfiguration.cs

Add a single instance to the container.

public:
generic <typename TExport>
 System::Composition::Hosting::ContainerConfiguration ^ WithExport(TExport exportedInstance);
public System.Composition.Hosting.ContainerConfiguration WithExport<TExport> (TExport exportedInstance);
member this.WithExport : 'Export -> System.Composition.Hosting.ContainerConfiguration
Public Function WithExport(Of TExport) (exportedInstance As TExport) As ContainerConfiguration

Type Parameters

TExport

The type of the contract of the instance.

Parameters

exportedInstance
TExport

The instance to add to the container.

Returns

A configuration object allowing configuration to continue.

Applies to