7 lines
819 B
Plaintext
7 lines
819 B
Plaintext
== Why is this an issue?
|
|
|
|
To customize the default behavior for an export in the https://learn.microsoft.com/en-us/dotnet/framework/mef/[Managed Extensibility Framework] (MEF), applying the https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.composition.partcreationpolicyattribute[`PartCreationPolicyAttribute`] is necessary.
|
|
For the https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.composition.partcreationpolicyattribute[`PartCreationPolicyAttribute`] to be meaningful in the context of an export, the class must also be annotated with the https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.composition.exportattribute[`ExportAttribute`].
|
|
|
|
This rule raises an issue when a class is annotated with the `PartCreationPolicyAttribute` but not with the `ExportAttribute`.
|