Class DiagnosticCollector
Namespace: OceanApocalypse.RSML.Toolchain.Abstractions.Diagnostics
Assembly: RSML.Toolchain.Abstractions.dll
A list of RSML toolchain errors.
public sealed record DiagnosticCollector : IEnumerable<Diagnostic>, IEnumerable, IEquatable<DiagnosticCollector>
Inheritance
Implements
IEnumerable<Diagnostic>, IEnumerable, IEquatable<DiagnosticCollector>
Inherited Members
Object.Equals(Object?), Object.Equals(Object?, Object?), Object.GetHashCode(), Object.GetType(), Object.ReferenceEquals(Object?, Object?), Object.ToString()
Constructors
DiagnosticCollector(Severity)
Creates a new diagnostic collector.
public DiagnosticCollector(Severity minimumCriticalSeverity = Severity.Error)
Parameters
minimumCriticalSeverity Severity
The minimum diagnostic severity for a diagnostic to be considered critical.
Properties
HasCriticalErrors
A property that indicates whether there are critical diagnostics.
The toolchain should break if this is true.
public Boolean HasCriticalErrors { get; }
Property Value
MinimumCriticalSeverity
The minimum diagnostic severity for a diagnostic to be considered critical.
public Severity MinimumCriticalSeverity { get; }
Property Value
Methods
Add(Diagnostic)
Adds an error to the list of errors.
public DiagnosticCollector Add(Diagnostic diagnostic)
Parameters
diagnostic Diagnostic
Returns
Clear()
Clears the DiagnosticCollector, leaving it fully empty.
public DiagnosticCollector Clear()
Returns
GetAll()
Returns all
public ImmutableArray<Diagnostic> GetAll()
Returns
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<Diagnostic> GetEnumerator()
Returns
An enumerator that can be used to iterate through the collection.
IEnumerable.GetEnumerator()
Returns an enumerator that iterates through a collection.
IEnumerator IEnumerable.GetEnumerator()
Returns
An IEnumerator object that can be used to iterate through the collection.