Skip to content

Gendarme.Rules.Design.AvoidEmptyInterfaceRule(git)

Sebastien Pouliot edited this page Mar 2, 2011 · 1 revision

AvoidEmptyInterfaceRule

Assembly: Gendarme.Rules.Design
Version: git

Description

This rule fires if an interface declares no members. Empty interfaces are generally not useful except as markers to categorize types and attributes are the preferred way to handle that.

Examples

Bad example:

public interface IMarker {
}
public class MyClass : IMarker {
}

Good example:

[MarkedByAnAttribute]
public class MyClass {
}

Source code

You can browse the latest source code of this rule on github.com

Clone this wiki locally