Class DiagnosticCollection
- Namespace
- MuLang.Core.Diagnostics
- Assembly
- MuLang.Core.dll
Represents an ordered, immutable collection of diagnostics.
public sealed class DiagnosticCollection : IReadOnlyList<Diagnostic>, IReadOnlyCollection<Diagnostic>, IEnumerable<Diagnostic>, IEnumerable
- Inheritance
-
DiagnosticCollection
- Implements
- Inherited Members
Properties
Count
Gets the number of diagnostics.
public int Count { get; }
Property Value
Empty
Gets the empty diagnostic collection.
public static DiagnosticCollection Empty { get; }
Property Value
HasErrors
Gets a value indicating whether the collection contains any error diagnostics.
public bool HasErrors { get; }
Property Value
this[int]
Gets the diagnostic at the specified index.
public Diagnostic this[int index] { get; }
Parameters
indexintThe zero-based diagnostic index.
Property Value
Methods
Create(IEnumerable<Diagnostic>)
Creates an ordered diagnostic collection.
public static DiagnosticCollection Create(IEnumerable<Diagnostic> diagnostics)
Parameters
diagnosticsIEnumerable<Diagnostic>The diagnostics to include.
Returns
- DiagnosticCollection
The ordered diagnostic collection.
Exceptions
- ArgumentNullException
Thrown when
diagnosticsisnull.
GetEnumerator()
public IEnumerator<Diagnostic> GetEnumerator()