共用方式為


FakeHostingExtensions.AddFakeLoggingOutputSink 方法

定義

在每個記錄訊息上加入叫用的動作。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Hosting::IHostBuilder ^ AddFakeLoggingOutputSink(Microsoft::Extensions::Hosting::IHostBuilder ^ builder, Action<System::String ^> ^ callback);
public static Microsoft.Extensions.Hosting.IHostBuilder AddFakeLoggingOutputSink (this Microsoft.Extensions.Hosting.IHostBuilder builder, Action<string> callback);
static member AddFakeLoggingOutputSink : Microsoft.Extensions.Hosting.IHostBuilder * Action<string> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function AddFakeLoggingOutputSink (builder As IHostBuilder, callback As Action(Of String)) As IHostBuilder

參數

builder
IHostBuilder

IHostBuilder 執行個體。

callback
Action<String>

在每個記錄訊息上叫用的動作。

傳回

IHostBuilder 執行個體。

適用於