MkDocsServeAsyncRunner.

ServeAsync(MkDocsServeAsyncSettings) Method

Summary

Run the builtin development server in working directory async.
Assembly
Cake.MkDocs.dll
Namespace
Cake.MkDocs.Serve
Containing Type
MkDocsServeAsyncRunner

Syntax

public Task ServeAsync(MkDocsServeAsyncSettings settings)

Examples

 var tokenSource = new CancellationTokenSource();
 var task = runner.Serve(new MkDocsServeSettings() { Token = tokenSource.Token });

 // Do something...

 tokenSource.Cancel();

 try
 {
     task.Wait();
 }
 catch (OperationCanceledException)
 {
     // Handle excecption
 }

Parameters

Name Type Description
settings MkDocsServeAsyncSettings The settings.

Return Value

Type Description
Task Long running task.