Roslyn: Proposal: Add attributes which run custom functions to and throw compiler errors on fail.

Created on 27 Dec 2016  路  1Comment  路  Source: dotnet/roslyn

Add some way of putting attributes on different classes/enums and run custom functions for validation on compile time.
E.g.

A custom NoDublicatesAttribute could be added to enums to prevent multiple in the enum.
A custom NoImplicitValuesAttribute could be added to enums to only allow explicit value assignment the enum.

Area-Analyzers Feature Request Resolution-Fixed

Most helpful comment

These are examples of what analyzers can do.

>All comments

These are examples of what analyzers can do.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vbcodec picture vbcodec  路  3Comments

NikChao picture NikChao  路  3Comments

ashmind picture ashmind  路  3Comments

asvishnyakov picture asvishnyakov  路  3Comments

MadsTorgersen picture MadsTorgersen  路  3Comments