Table of Contents

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

int

Empty

Gets the empty diagnostic collection.

public static DiagnosticCollection Empty { get; }

Property Value

DiagnosticCollection

HasErrors

Gets a value indicating whether the collection contains any error diagnostics.

public bool HasErrors { get; }

Property Value

bool

this[int]

Gets the diagnostic at the specified index.

public Diagnostic this[int index] { get; }

Parameters

index int

The zero-based diagnostic index.

Property Value

Diagnostic

Methods

Create(IEnumerable<Diagnostic>)

Creates an ordered diagnostic collection.

public static DiagnosticCollection Create(IEnumerable<Diagnostic> diagnostics)

Parameters

diagnostics IEnumerable<Diagnostic>

The diagnostics to include.

Returns

DiagnosticCollection

The ordered diagnostic collection.

Exceptions

ArgumentNullException

Thrown when diagnostics is null.

GetEnumerator()

public IEnumerator<Diagnostic> GetEnumerator()

Returns

IEnumerator<Diagnostic>