Skip to content

postsharp-contrib/rider-readable-bitwise-operations

Repository files navigation

Readable bitwise operations (Rider plugin)

Download from JetBrains plugins repository.

Folds simple bitwise operations on enums with [Flags] into simpler green text that looks like this:

For example, it turns

if ( (options & ReflectionNameOptions.XmlDocPrefix) != 0 )

into

if ( ReflectionNameOptions.XmlDocPrefix ∈ options )

and it turns

if ( (options & ReflectionNameOptions.XmlDocPrefix) == 0 )

into

if ( ReflectionNameOptions.XmlDocPrefix ∉ options )

This helps you avoid errors and you don't need to think as long about what != or == actually means. It works on any enum with [Flags].

About

Prettifies bitwise comparison in JetBrains Rider

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published