Skip to main content

DG0001: Invalid Index Name Declaration

Cause

An index name was defined outside the scope of a namepace.

How to Fix Violations

Place the index name in a namespace.

Example

The following violates the rule:

using Mathematics.NET.Core.Attributes;

[IndexName] public partial struct Alpha;

The following are valid:

using Mathematics.NET.Core.Attributes;

namespace DG0001;

[IndexName] public partial struct Alpha;

and

using Mathematics.NET.Core.Attributes;

namespace DG0001
{
[IndexName] public partial struct Alpha;
}