FakeLogger<T> Constructors
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
FakeLogger<T>(FakeLogCollector) |
Initializes a new instance of the FakeLogger<T> class. |
FakeLogger<T>(Action<String>) |
Initializes a new instance of the FakeLogger<T> class that copies all log records to the given output sink. |
- Source:
- FakeLoggerT.cs
Initializes a new instance of the FakeLogger<T> class.
public FakeLogger (Microsoft.Extensions.Logging.Testing.FakeLogCollector? collector = default);
new Microsoft.Extensions.Logging.Testing.FakeLogger<'T> : Microsoft.Extensions.Logging.Testing.FakeLogCollector -> Microsoft.Extensions.Logging.Testing.FakeLogger<'T>
Public Sub New (Optional collector As FakeLogCollector = Nothing)
Parameters
- collector
- FakeLogCollector
Where to push all log state.
Applies to
.NET 9 (package-provided) und andere Versionen
Produkt | Versionen |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
- Source:
- FakeLoggerT.cs
Initializes a new instance of the FakeLogger<T> class that copies all log records to the given output sink.
public:
FakeLogger(Action<System::String ^> ^ outputSink);
public FakeLogger (Action<string> outputSink);
new Microsoft.Extensions.Logging.Testing.FakeLogger<'T> : Action<string> -> Microsoft.Extensions.Logging.Testing.FakeLogger<'T>
Public Sub New (outputSink As Action(Of String))
Parameters
Applies to
.NET 9 (package-provided) und andere Versionen
Produkt | Versionen |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
Feedback zu .NET
.NET ist ein Open Source-Projekt. Wählen Sie einen Link aus, um Feedback zu geben: