diff --git a/README.md b/README.md index f4af663..58cbc6c 100644 --- a/README.md +++ b/README.md @@ -290,6 +290,18 @@ public class MyBussines } ``` +```csharp +//example of Publisher condition to execute +public class SamplePublishHealth : IHealthCheckPublisher, IHealthCheckPlusPublisher +{ + public Func PublisherCondition => (_) => true; + public Task PublishAsync(HealthReport report, CancellationToken cancellationToken) + { + return Task.CompletedTask; + } +} +``` + ## Code of Conduct [**Top**](#table-of-contents) diff --git a/README.txt b/README.txt index 72e839a..d9d072d 100644 --- a/README.txt +++ b/README.txt @@ -251,6 +251,18 @@ public class MyBussines } } +... + +//example of Publisher condition to execute +public class SamplePublishHealth : IHealthCheckPublisher, IHealthCheckPlusPublisher +{ + public Func PublisherCondition => (_) => true; + public Task PublishAsync(HealthReport report, CancellationToken cancellationToken) + { + return Task.CompletedTask; + } +} + License ******* diff --git a/docs/index.md b/docs/index.md index 06b22de..8a88e92 100644 --- a/docs/index.md +++ b/docs/index.md @@ -289,6 +289,18 @@ public class MyBussines } ``` +```csharp +//example of Publisher condition to execute +public class SamplePublishHealth : IHealthCheckPublisher, IHealthCheckPlusPublisher +{ + public Func PublisherCondition => (_) => true; + public Task PublishAsync(HealthReport report, CancellationToken cancellationToken) + { + return Task.CompletedTask; + } +} +``` + ## Code of Conduct [**Top**](#table-of-contents)