Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule S4428: "PartCreationPolicyAttribute" should be used with "ExportAttribute" #1166

Closed
Evangelink opened this issue Feb 12, 2018 · 1 comment
Assignees
Milestone

Comments

@Evangelink
Copy link
Contributor

RSPEC-4428

The PartCreationPolicyAttribute attribute, which is part of the Managed Extensibility Framework (MEF), is used to specify how the exported object will be created. Therefore it doesn't make sense not to export this a class with this attribute using the ExportAttribute attribute.

@fatihcetin
Copy link

This rule is not working proper with 2 conditions :

  1. If you use a customExportAtribute that is derived from ExportAttribute.
  2. If you have InheritedExport attribute on an interface and use PartCreationPolicyAttribute on a class that is implementing that interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants