-
Notifications
You must be signed in to change notification settings - Fork 4
Gendarme.Rules.Naming.AvoidTypeInterfaceInconsistencyRule(2.10)
Sebastien Pouliot edited this page Jan 22, 2011
·
2 revisions
Assembly: Gendarme.Rules.Naming
Version: 2.10
This rule will fire if an assembly has a namespace which contains an interface IFoo and a type Foo, but the type does not implement the interface. If an interface and a type name differ only by the I prefix (of the interface) then we can logically expect the type to implement this interface.
Bad example:
public interface IMember {
string Name {
get;
}
}
public class Member {
public string Name {
get {
return String.Empty;
}
}
}
Good example:
public interface IMember {
string Name {
get;
}
}
public class Member : IMember {
public string Name {
get {
return String.Empty;
}
}
}
- This rule is available since Gendarme 2.4
Note that this page was autogenerated (3/17/2011 9:31:58 PM) based on the xmldoc
comments inside the rules source code and cannot be edited from this wiki.
Please report any documentation errors, typos or suggestions to the
Gendarme Mailing List. Thanks!