CSLA

I'm using Rocky Lhotka's CSLA for a project, and one of the issues that I've
encountered with using it in conjunction with Resharper is that Resharper
indicates that the overriden and private DataPortal_XYZ methods are unused.
They are in fact used by the framework, but not in an obvious way. The way
that CSLA works is as follows:

Let's say that I want to fetch an instance of a business object that's
already been persisted. I'd call a method like this:


public class Order : BusinessBase { ... public static Order FetchOrder( Guid orderId ) { return DataPortal.Fetch]]>( new OrderCriteria( orderId ) );
}

...

Then, I create a method on Order as follows:

private void DataPortal_Fetch( OrderCriteria criteria )
{
AssignOrderValues( FetchOrderFromPersistence( criteria.OrderId ) );
// Or however I fetch my BO
...
}

Now I don't actually call DataPortal_Fetch. Instead, the CSLA framework
knows to call that method. In fact, if I specify a remote server, CSLA knows
to execute the method on the remote server. However, because my code doesn't
actually reference DataPortal_Fetch, it shows up with a nice orange (yellow?
what is that color anyway?) warning.

Is there any way to tell Resharper to simply ignore the DataPortal_XYZ
methods?

Thanks!

Ryan


3 comments
Comment actions Permalink

Hi Ryan,

you can control the highlighting of errors and warnings easily in the R# Highlighting Options.
Just change the value of "Unused private member" to "Do not show". If you want to disable the
warning for special classes there is no way to do it.

Regards
Klaus

0
Comment actions Permalink

Ryan, Klaus,

you can control the highlighting of errors and warnings easily in the
R# Highlighting Options. Just change the value of "Unused private
member" to "Do not show". If you want to disable the warning for
special classes there is no way to do it.


As a matter of fact, it is possible to do so, via ReSharper OpenAPI, but
you have to write your own plugin...

Friendly,
Dmitry
--
Dmitry Lomov
Senior Software Developer
JetBrains, Inc.
"Develop With Pleasure!"


0
Comment actions Permalink

how much effort do you think this would take. as you might guess, we're
pretty busy, but i'd consider doing it on my free time if it's relatively
painless.

-ryan

"Dmitry Lomov (JetBrains)" <dmitry.lomov@jetbrains.com> wrote in message
news:c8a8949e104e8c83f22fc2c754f@news.intellij.net...

Ryan, Klaus,

>
>> you can control the highlighting of errors and warnings easily in the
>> R# Highlighting Options. Just change the value of "Unused private
>> member" to "Do not show". If you want to disable the warning for
>> special classes there is no way to do it.
>

As a matter of fact, it is possible to do so, via ReSharper OpenAPI, but
you have to write your own plugin...

>

Friendly,
Dmitry
--
Dmitry Lomov
Senior Software Developer
JetBrains, Inc.
"Develop With Pleasure!"

>



0

Please sign in to leave a comment.