Not sure if this is a silly question, but I just noticed this:
public interface IActivityDao : IDao
{
IList GetAllSinceSe
In the new world of code quality, the parameters name at the implementation level must be the same as interface level.
In sonarqube has a rule like 'parameter names should match base declaration and other partial definitions' and calls this 'Noncompliant Code':
interface IFoo
{
void Bar(int i);
}
class Foo : IFoo
{
void Bar(int z) // Noncompliant, parameter name should be i
{
}
}
The funny thing is it refers to this document which does not covering interface:
https://wiki.sei.cmu.edu/confluence/display/c/DCL40-C.+Do+not+create+incompatible+declarations+of+the+same+function+or+object
I personally like to have code like this:
public interface IExtractor{
TOutput Extract(TInput input);
}
public class CustomerExtractor : IExtractor
{
public Customer Extract(Order order)
{
// ...
}
}
But the tool forces me to use the following declaring it as a critical issue:
public Customer Extract(Order input)
{
// ...
}
input doesn't have the same meaning as order in this case.
To get rid of the noise,
public Customer Extract(Order input)
{
var order = input;
// use order from here on
}