Auf Englisch lesen Bearbeiten

Teilen über


AttributedModelServices.CreatePart Method

Definition

Creates a composable part.

Overloads

CreatePart(Object)

Creates a composable part from the specified attributed object.

CreatePart(ComposablePartDefinition, Object)

Creates a composable part from the specified attributed object, using the specified part definition.

CreatePart(Object, ReflectionContext)

Creates a composable part from the specified attributed object, using the specified reflection context.

CreatePart(Object)

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

Creates a composable part from the specified attributed object.

C#
public static System.ComponentModel.Composition.Primitives.ComposablePart CreatePart(object attributedPart);

Parameters

attributedPart
Object

The attributed object.

Returns

The created part.

Applies to

.NET 10 (package-provided) und andere Versionen
Produkt Versionen
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

CreatePart(ComposablePartDefinition, Object)

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

Creates a composable part from the specified attributed object, using the specified part definition.

C#
public static System.ComponentModel.Composition.Primitives.ComposablePart CreatePart(System.ComponentModel.Composition.Primitives.ComposablePartDefinition partDefinition, object attributedPart);

Parameters

partDefinition
ComposablePartDefinition

The definition of the new part.

attributedPart
Object

The attributed object.

Returns

The created part.

Applies to

.NET 10 (package-provided) und andere Versionen
Produkt Versionen
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

CreatePart(Object, ReflectionContext)

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

Creates a composable part from the specified attributed object, using the specified reflection context.

C#
public static System.ComponentModel.Composition.Primitives.ComposablePart CreatePart(object attributedPart, System.Reflection.ReflectionContext reflectionContext);

Parameters

attributedPart
Object

The attributed object.

reflectionContext
ReflectionContext

The reflection context for the part.

Returns

The created part.

Exceptions

reflectionContext is null.

Applies to

.NET 10 (package-provided) und andere Versionen
Produkt Versionen
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)