Iskariote
Iskariote

Reputation: 11

C# Class extended implements the interface method and Gendarme rise ParameterNamesShouldMatchOverriddenMethodRule

I having the next problem, I have a class that extends another class and implements and interface. The interface defines a method which is implemented in the extended class, with exactly the same parameters name. The thing is that Gendarme rise a violation for rule ParameterNamesShouldMatchOverriddenMethodRule, saying that the implementation hasn't the same parameters name as the interface, it is happening for all the implemented methods from the interface.

internal class classA : classB, InterfaceA
{
    //other business logic
}

public classB
{
   public bool getMethod(string param1, string param2)
   {
        //get some data and return it
   }
}

public interface InterfaceA: InterfaceB
{

}

public interface InterfaceB
{
     bool getMethod(string param1, string param2)
}

I think that maybe the hierarchy is a bit complicated and Gendarme is becoming crazy.

Thanks for your help.

Upvotes: 0

Views: 43

Answers (0)

Related Questions