IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
DiagnosticFormatterProvider.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Linq;
4
6{
7
12 {
13
14 readonly IEnumerable<IDiagnosticFormatterFactory> _factories;
15
21 public DiagnosticFormatterProvider(IEnumerable<IDiagnosticFormatterFactory> factories)
22 {
23 _factories = factories ?? throw new ArgumentNullException(nameof(factories));
24 }
25
32 {
33 return _factories.Select(i => i.GetFormatter(spec)).FirstOrDefault(i => i != null);
34 }
35
36 }
37
38}
Provides the capability to look up diagnostic channels.
IDiagnosticFormatter? GetFormatter(string spec)
Attempts to parse the specification into a diagnostic channel.
DiagnosticFormatterProvider(IEnumerable< IDiagnosticFormatterFactory > factories)
Initializes a new instance.