Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
thepirat000 committed Feb 15, 2024
1 parent 2e06373 commit 9f09093
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,15 @@ Audit.Core.Configuration.Setup()
.Use(new MyCustomDataProvider());
```

To set the data provider per-scope, use the `AuditScopeOptions` when creating an `AuditScope`. For example:

```c#
var scope = AuditScope.Create(new AuditScopeOptions
{
DataProvider = new MyCustomDataProvider(), ... }
);
```

#### Lazy Factory data provider

You can set the global data provider using a deferred instantiation technique, with a **lazy factory method** that will be called upon its initial utilization.
Expand Down Expand Up @@ -625,17 +634,6 @@ A special type of Data Providers that allows wrapping other Data Providers with
.Otherwise(new FileDataProvider()));
```

#### Data provider per scope

To set the data provider per-scope, use the `AuditScopeOptions` when creating an `AuditScope`. For example:

```c#
var scope = AuditScope.Create(new AuditScopeOptions
{
DataProvider = new MyCustomDataProvider(), ... }
);
```

#### Data providers included

The Data Providers included are summarized in the following table:
Expand Down

0 comments on commit 9f09093

Please sign in to comment.