Skip to content

Commit

Permalink
chore: Update README basic usage. (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
kinyoklion authored Nov 10, 2022
1 parent ba40c75 commit 1612dc4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ The packages will aim to support all current .NET versions. Refer to the current
### Basic Usage

```csharp
using OpenFeature;
using OpenFeature.Model;

// Sets the provider used by the client
Api.Instance.SetProvider(new NoOpProvider());
// If no provider is set, then a default NoOpProvider will be used.
//OpenFeature.Api.Instance.SetProvider(new MyProvider());
// Gets a instance of the feature flag client
var client = OpenFeature.Instance.GetClient();
var client = OpenFeature.Api.Instance.GetClient();
// Evaluation the `my-feature` feature flag
var isEnabled = await client.GetBooleanValue("my-feature", false);

Expand Down

0 comments on commit 1612dc4

Please sign in to comment.