rspec/rules/S4428/description.adoc

7 lines
819 B
Plaintext
Raw Normal View History

2023-07-04 13:39:40 +02:00
== Why is this an issue?
2020-06-30 12:49:37 +02:00
2023-07-04 13:39:40 +02:00
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`].
2021-02-02 15:02:10 +01:00
2023-07-04 13:39:40 +02:00
This rule raises an issue when a class is annotated with the `PartCreationPolicyAttribute` but not with the `ExportAttribute`.