IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IKVM.CoreLib.Diagnostics Namespace Reference

Namespaces

namespace  Tracing
 

Classes

class  Diagnostic
 
struct  DiagnosticEvent
 
class  DiagnosticEventException
 
class  DiagnosticEventHandler
 Base IDiagnosticHandler that packages messages into an event type.
 
interface  IDiagnosticEventHandler
 Exposes a method to accept diagnostic events. More...
 
interface  IDiagnosticHandler
 Exposes methods to accept diagnostic invocations. More...
 
class  JsonDiagnosticFormat
 Formats diagnostic events into a stream of JSON objects. More...
 
class  NullDiagnosticHandler
 
class  TextDiagnosticFormat
 Handles writing diagnostic events to text output. More...
 

Enumerations

enum  DiagnosticLevel {
  Unknown , Trace , Info , Warning ,
  Error , Fatal
}
 Represents the level of security of a diagnostic event. More...
 

Functions

readonly partial struct DiagnosticEvent (Diagnostic Diagnostic, object?[] Args, Exception? Exception=null, DiagnosticLocation Location=default)
 
readonly struct DiagnosticLocation (string Path, int StartLine, int StartColumn, int EndLine, int EndColumn)
 Describes the location of a diagnostic event.
 

Enumeration Type Documentation

◆ DiagnosticLevel

Represents the level of security of a diagnostic event.

Enumerator
Unknown 
Trace 
Info 
Warning 
Error 
Fatal 

Definition at line 6 of file DiagnosticLevel.cs.

Function Documentation

◆ DiagnosticEvent()

readonly partial struct IKVM.CoreLib.Diagnostics.DiagnosticEvent ( Diagnostic Diagnostic,
object?[] Args,
Exception? Exception = null,
DiagnosticLocation Location = default )

Gets the Diagnostic this is an event of.

Gets the arguments of the event.

Gets the exception of the event.

Gets the location of the event.

Formats the diagnostic event message.

Returns

Definition at line 6 of file DiagnosticEvent.cs.

7 {
8
12 public readonly Diagnostic Diagnostic = Diagnostic;
13
17 public readonly object?[] Args = Args;
18
22 public readonly Exception? Exception = Exception;
23
27 public readonly DiagnosticLocation Location = Location;
28
33 public override string ToString()
34 {
35#if NET8_0_OR_GREATER
36 return string.Format(null, Diagnostic.Message, Args);
37#else
38 return string.Format(Diagnostic.Message, Args);
39#endif
40 }
41
42 }
readonly struct DiagnosticLocation(string Path, int StartLine, int StartColumn, int EndLine, int EndColumn)
Describes the location of a diagnostic event.

◆ DiagnosticLocation()

readonly struct IKVM.CoreLib.Diagnostics.DiagnosticLocation ( string Path,
int StartLine,
int StartColumn,
int EndLine,
int EndColumn )

Describes the location of a diagnostic event.

Parameters
Path
StartLine
StartColumn
EndLine
EndColumn

Gets the path to the file that the diagnostic refers to.

Gets the starting line that the diagnostic refers to. If no position, 0.

Gets the starting column that the diagnostic refers to. If no position, 0.

Gets the ending line that the diagnostic refers to. If no position, 0.

Gets the ending column that the diagnostic refers to. If no position, 0.

Definition at line 14 of file DiagnosticLocation.cs.

15 {
16
20 public readonly string Path = Path;
21
25 public readonly int StartLine = StartLine;
26
30 public readonly int StartColumn = StartColumn;
31
35 public readonly int EndLine = EndLine;
36
40 public readonly int EndColumn = EndColumn;
41
42 }