Skip to content

Commit 1efe09d

Browse files
authored
chore: remove duplicate eventing section in readme
Signed-off-by: Michael Beemer <[email protected]>
1 parent 950775b commit 1efe09d

File tree

1 file changed

+25
-29
lines changed

1 file changed

+25
-29
lines changed

README.md

+25-29
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,31 @@ client.AddHooks(new ExampleClientHook());
167167
var value = await client.GetBooleanValue("boolFlag", false, context, new FlagEvaluationOptions(new ExampleInvocationHook()));
168168
```
169169

170+
### Logging
171+
172+
The .NET SDK uses Microsoft.Extensions.Logging. See the [manual](https://learn.microsoft.com/en-us/dotnet/core/extensions/logging?tabs=command-line) for complete documentation.
173+
174+
### Named clients
175+
176+
Clients can be given a name.
177+
A name is a logical identifier that can be used to associate clients with a particular provider.
178+
If a name has no associated provider, the global provider is used.
179+
180+
```csharp
181+
// registering the default provider
182+
await Api.Instance.SetProvider(new LocalProvider());
183+
184+
// registering a named provider
185+
await Api.Instance.SetProvider("clientForCache", new CachedProvider());
186+
187+
// a client backed by default provider
188+
FeatureClient clientDefault = Api.Instance.GetClient();
189+
190+
// a client backed by CachedProvider
191+
FeatureClient clientNamed = Api.Instance.GetClient("clientForCache");
192+
193+
```
194+
170195
### Eventing
171196

172197
Events allow you to react to state changes in the provider or underlying flag management system, such as flag definition changes,
@@ -204,35 +229,6 @@ await Api.Instance.SetProvider(myClient.GetMetadata().Name, provider);
204229
myClient.AddHandler(ProviderEventTypes.ProviderReady, callback);
205230
```
206231

207-
### Logging
208-
209-
The .NET SDK uses Microsoft.Extensions.Logging. See the [manual](https://learn.microsoft.com/en-us/dotnet/core/extensions/logging?tabs=command-line) for complete documentation.
210-
211-
### Named clients
212-
213-
Clients can be given a name.
214-
A name is a logical identifier that can be used to associate clients with a particular provider.
215-
If a name has no associated provider, the global provider is used.
216-
217-
```csharp
218-
// registering the default provider
219-
await Api.Instance.SetProvider(new LocalProvider());
220-
221-
// registering a named provider
222-
await Api.Instance.SetProvider("clientForCache", new CachedProvider());
223-
224-
// a client backed by default provider
225-
FeatureClient clientDefault = Api.Instance.GetClient();
226-
227-
// a client backed by CachedProvider
228-
FeatureClient clientNamed = Api.Instance.GetClient("clientForCache");
229-
230-
```
231-
232-
### Eventing
233-
234-
Events are currently not supported by the .NET SDK. Progress on this feature can be tracked [here](https://github.com/open-feature/dotnet-sdk/issues/126).
235-
236232
### Shutdown
237233

238234
The OpenFeature API provides a close function to perform a cleanup of all registered providers. This should only be called when your application is in the process of shutting down.

0 commit comments

Comments
 (0)