Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 669 Bytes

DES0001.md

File metadata and controls

30 lines (21 loc) · 669 Bytes

DES0001 Private member is used by reflection

Private member is used by reflection

Suppressed Diagnostic ID

IDE0051 - Remove unused member

Examples of code that produces a suppressed diagnostic

using DefaultEcs;

namespace DummyNamespace
{
    class DummyClass
    {
        [Subscribe]
        void DummyMethod(in bool _)
        { }
    }
}

Why is the diagnostic reported?

The IDE does not detect that the method will be used by reflection and under normal circumstances, it would be reasonable to remove the unused method.

Why do we suppress this diagnostic?

The IDE doesn't realize this method will be subscribed to by reflection.