Referential transparency
Methods marked with [PureMethod] are checked for mutable static state, non-pure calls, and I/O operations.
Functional programming support for C#
A Roslyn-based toolset that brings compile-time checks for referential transparency, local-variable immutability, and safer functional-style control flow to C#.
PureSharp helps developers make purity and immutability explicit and mechanically verifiable instead of relying only on conventions and code review.
Methods marked with [PureMethod] are checked for mutable static state, non-pure calls, and I/O operations.
Locals using PureSharp's underscore convention can be required to initialize once and never be reassigned.
Fluent.If chains are checked so incomplete conditional expressions do not silently escape validation.
C# supports functional programming techniques, but the language does not mechanically enforce referential transparency or immutable local variables. PureSharp uses Roslyn diagnostics to turn selected functional-programming constraints into build-time feedback.
Diagnostics use standard .editorconfig severity controls. PureSharp is MIT licensed and its analyzer behavior is documented in a versioned diagnostic contract.