Ferrous API Reference

All Types / Ferrous.Testing

class CompileAssertOptions

public sealed class CompileAssertOptions

Configuration options for CompileAssert in-memory compilations.

Properties

public bool EnableFerrousAnalyzers

Gets or sets a value indicating whether all built-in Ferrous Roslyn analyzers are enabled. Defaults to true.

public bool EnableFerrousGenerators

Gets or sets a value indicating whether Ferrous source generators ([DiscriminatedUnion], [Newtype]) are enabled. Defaults to true.

public bool TreatWarningsAsErrors

Gets or sets a value indicating whether compiler and analyzer warnings should fail CompileAssert.Succeeds. Defaults to false.

public ImmutableArray<MetadataReference> AdditionalReferences

Gets or sets additional metadata references to include in the compilation.

public ImmutableArray<DiagnosticAnalyzer> AdditionalAnalyzers

Gets or sets additional Roslyn diagnostic analyzers to run during compilation.

public ImmutableArray<IIncrementalGenerator> AdditionalGenerators

Gets or sets additional Roslyn incremental source generators to run during compilation.