Skip to content

Commit

Permalink
Updated samples
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando Cerqueira committed Feb 20, 2024
1 parent f9f7871 commit f7f8ddd
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,18 @@ public class MyBussines
}
```

```csharp
//example of Publisher condition to execute
public class SamplePublishHealth : IHealthCheckPublisher, IHealthCheckPlusPublisher
{
public Func<HealthReport, bool> PublisherCondition => (_) => true;
public Task PublishAsync(HealthReport report, CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}
```

## Code of Conduct
[**Top**](#table-of-contents)

Expand Down
12 changes: 12 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,18 @@ public class MyBussines
}
}

...

//example of Publisher condition to execute
public class SamplePublishHealth : IHealthCheckPublisher, IHealthCheckPlusPublisher
{
public Func<HealthReport, bool> PublisherCondition => (_) => true;
public Task PublishAsync(HealthReport report, CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}

License
*******

Expand Down
12 changes: 12 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,18 @@ public class MyBussines
}
```

```csharp
//example of Publisher condition to execute
public class SamplePublishHealth : IHealthCheckPublisher, IHealthCheckPlusPublisher
{
public Func<HealthReport, bool> PublisherCondition => (_) => true;
public Task PublishAsync(HealthReport report, CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}
```

## Code of Conduct
[**Top**](#table-of-contents)

Expand Down

0 comments on commit f7f8ddd

Please sign in to comment.