ConsoleFormatter.Write<TState> Yöntem

Tanım

Günlük iletisini belirtilen TextWriter'a yazar.

public:
generic <typename TState>
 abstract void Write(Microsoft::Extensions::Logging::Abstractions::LogEntry<TState> ^ logEntry, Microsoft::Extensions::Logging::IExternalScopeProvider ^ scopeProvider, System::IO::TextWriter ^ textWriter);
public abstract void Write<TState>(in Microsoft.Extensions.Logging.Abstractions.LogEntry<TState> logEntry, Microsoft.Extensions.Logging.IExternalScopeProvider? scopeProvider, System.IO.TextWriter textWriter);
abstract member Write : LogEntry * Microsoft.Extensions.Logging.IExternalScopeProvider * System.IO.TextWriter -> unit
Public MustOverride Sub Write(Of TState) (logEntry As LogEntry(Of TState), scopeProvider As IExternalScopeProvider, textWriter As TextWriter)

Tür Parametreleri

TState

Yazılacak nesnenin türü.

Parametreler

logEntry
LogEntry<TState>

Günlük girdisi.

scopeProvider
IExternalScopeProvider

Kapsam verilerinin sağlayıcısı.

textWriter
TextWriter

Renkler için ansi kodu ekli dize yazıcısı.

Açıklamalar

Biçimlendirici konsola renk yazmak istiyorsa, ansi renk kodlarını dizeye ekleyerek bunu yapabilir.

Şunlara uygulanır