Edit

Share via


AttributedModelServices.SatisfyImportsOnce Method

Definition

Composes a specified part.

Overloads

SatisfyImportsOnce(ICompositionService, Object)

Composes the specified part by using the specified composition service, with recomposition disabled.

SatisfyImportsOnce(ICompositionService, Object, ReflectionContext)

Composes the specified part by using the specified composition service, with recomposition disabled and using the specified reflection context.

SatisfyImportsOnce(ICompositionService, Object)

Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs

Composes the specified part by using the specified composition service, with recomposition disabled.

public:
[System::Runtime::CompilerServices::Extension]
 static System::ComponentModel::Composition::Primitives::ComposablePart ^ SatisfyImportsOnce(System::ComponentModel::Composition::ICompositionService ^ compositionService, System::Object ^ attributedPart);
public static System.ComponentModel.Composition.Primitives.ComposablePart SatisfyImportsOnce (this System.ComponentModel.Composition.ICompositionService compositionService, object attributedPart);
static member SatisfyImportsOnce : System.ComponentModel.Composition.ICompositionService * obj -> System.ComponentModel.Composition.Primitives.ComposablePart
<Extension()>
Public Function SatisfyImportsOnce (compositionService As ICompositionService, attributedPart As Object) As ComposablePart

Parameters

compositionService
ICompositionService

The composition service to use.

attributedPart
Object

The part to compose.

Returns

The composed part.

Exceptions

compositionService or attributedPart is null.

An error occurred during composition. Errors contains a collection of errors that occurred.

Remarks

Unlike ordinary composition, parts composed with this method are not guaranteed to remain valid if the catalog behindcompositionService changes.

Applies to

SatisfyImportsOnce(ICompositionService, Object, ReflectionContext)

Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs

Composes the specified part by using the specified composition service, with recomposition disabled and using the specified reflection context.

public:
[System::Runtime::CompilerServices::Extension]
 static System::ComponentModel::Composition::Primitives::ComposablePart ^ SatisfyImportsOnce(System::ComponentModel::Composition::ICompositionService ^ compositionService, System::Object ^ attributedPart, System::Reflection::ReflectionContext ^ reflectionContext);
public static System.ComponentModel.Composition.Primitives.ComposablePart SatisfyImportsOnce (this System.ComponentModel.Composition.ICompositionService compositionService, object attributedPart, System.Reflection.ReflectionContext reflectionContext);
static member SatisfyImportsOnce : System.ComponentModel.Composition.ICompositionService * obj * System.Reflection.ReflectionContext -> System.ComponentModel.Composition.Primitives.ComposablePart
<Extension()>
Public Function SatisfyImportsOnce (compositionService As ICompositionService, attributedPart As Object, reflectionContext As ReflectionContext) As ComposablePart

Parameters

compositionService
ICompositionService

The composition service to use.

attributedPart
Object

The part to compose.

reflectionContext
ReflectionContext

The reflection context for the part.

Returns

The composed part.

Exceptions

reflectionContext is null.

An error occurred during composition. Errors contains a collection of errors that occurred.

Applies to