Microsoft.CodeAnalysis.CodeStyle Namespace

Classes

CodeStyleOption<T>

Represents a code style option and an associated notification option. Supports being instantiated with T as a Boolean or an enum type.

CodeStyleOption also has some basic support for migration a Boolean option forward to an enum type option. Specifically, if a previously serialized bool-CodeStyleOption is then deserialized into an enum-CodeStyleOption then 'false' values will be migrated to have the 0-value of the enum, and 'true' values will be migrated to have the 1-value of the enum.

Similarly, enum-type code options will serialize out in a way that is compatible with hosts that expect the value to be a boolean. Specifically, if the enum value is 0 or 1 then those values will write back as false/true.

CodeStyleOptions
NotificationOption

Offers different notification styles for enforcing a code style. Under the hood, it simply maps to DiagnosticSeverity