This is a migrated thread and some comments may be shown as answers.

Justcode not recognising MEF attributes

1 Answer 41 Views
Code Analysis
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Phil
Top achievements
Rank 1
Phil asked on 05 Feb 2013, 01:44 PM
Thanks for a very useful product but I have a little issue when using MEF Imports.

If I have the following declaration JustCode flags up a number of warnings. None of which are correct.

        [Import(typeof(ISyncServerProviderFactory))]
        private ISyncServerProviderFactory serverProviderFactory;

        [Import(typeof(ISyncClientProviderFactory))]
        private ISyncClientProviderFactory clientProviderFactory;

        [Import(typeof(IDatabaseHelperFactory))]
        private IDatabaseHelperFactory dbHelper;

Warnings:

   C#: Field 'serverProviderFactory' is never assigned
   C#: Field 'clientProviderFactory' is never assigned
   C#: Field 'dbHelper' is never assigned
   C#: Field 'serverProviderFactory' can be made readonly
   C#: Field 'clientProviderFactory' can be made readonly
   C#: Field 'dbHelper' can be made readonly

1 Answer, 1 is accepted

Sort by
0
Accepted
Zdravko
Telerik team
answered on 06 Feb 2013, 03:29 PM
Hello,

 Thanks for bringing this issue to our attention.
I have made an item for it in our product backlog and we will do our best to fix it as soon as possible.
I would suggest ignoring the warnings as a temporary solution.
Thank you.

Kind regards,
Zdravko
the Telerik team
Share what you think about JustCode with us, so we can help you even better! You can use the built-in feedback tool inside JustCode, our forum, or our JustCode feedback portal.
Tags
Code Analysis
Asked by
Phil
Top achievements
Rank 1
Answers by
Zdravko
Telerik team
Share this question
or