Skip to content

Commit

Permalink
Update docs & samples (#70)
Browse files Browse the repository at this point in the history
* Update readme & samples

* Add warning about type matching to the XML documentation of generic evaluation methods
  • Loading branch information
adams85 authored Jun 1, 2023
1 parent c838db4 commit 5c9c8ce
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ using ConfigCat.Client;
var client = ConfigCatClient.Get("#YOUR-SDK-KEY#");
```

> We strongly recommend using the *ConfigCat Client* as a Singleton object in your application.
> You can acquire singleton client instances for your SDK keys using the `ConfigCatClient.Get(sdkKey: <sdkKey>)` static factory method.
(However, please keep in mind that subsequent calls to `ConfigCatClient.Get()` with the *same SDK Key* return a *shared* client instance, which was set up by the first call.)

Expand Down
2 changes: 1 addition & 1 deletion samples/ASP.NETCore/WebApplication/WebApplication.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ItemGroup>
<ProjectReference Include="..\..\..\src\ConfigCatClient\ConfigCatClient.csproj" />
<!-- Use PackageReference instead of the ProjectReference above in your application. -->
<!--<PackageReference Include="ConfigCat.Client" Version="7.0.0" />-->
<!--<PackageReference Include="ConfigCat.Client" Version="8.0.0" />-->
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.*" />
<PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="2.1.175" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/ConsoleApp/ConsoleApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\ConfigCatClient\ConfigCatClient.csproj" />
<!-- Use PackageReference instead of the ProjectReference above in your application. -->
<!--<PackageReference Include="ConfigCat.Client" Version="7.0.0" />-->
<!--<PackageReference Include="ConfigCat.Client" Version="8.0.0" />-->
</ItemGroup>

</Project>
20 changes: 20 additions & 0 deletions src/ConfigCatClient/IConfigCatClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public interface IConfigCatClient : IProvidesHooks, IDisposable
/// <summary>
/// Returns the value of a feature flag or setting identified by <paramref name="key"/> synchronously.
/// </summary>
/// <remarks>
/// It is important to provide an argument for the <paramref name="defaultValue"/> parameter, specifically for the <typeparamref name="T"/> generic type parameter,
/// that matches the type of the feature flag or setting you are evaluating.<br/>
/// Please refer to <see href="https://configcat.com/docs/sdk-reference/dotnet/#setting-type-mapping">this table</see> for the corresponding types.
/// </remarks>
/// <typeparam name="T">
/// The type of the value. Only the following types are allowed:
/// <see cref="string"/>, <see cref="bool"/>, <see cref="int"/>, <see cref="long"/>, <see cref="double"/> and <see cref="object"/> (both nullable and non-nullable).<br/>
Expand All @@ -35,6 +40,11 @@ public interface IConfigCatClient : IProvidesHooks, IDisposable
/// <summary>
/// Returns the value of a feature flag or setting identified by <paramref name="key"/> asynchronously.
/// </summary>
/// <remarks>
/// It is important to provide an argument for the <paramref name="defaultValue"/> parameter, specifically for the <typeparamref name="T"/> generic type parameter,
/// that matches the type of the feature flag or setting you are evaluating.<br/>
/// Please refer to <see href="https://configcat.com/docs/sdk-reference/dotnet/#setting-type-mapping">this table</see> for the corresponding types.
/// </remarks>
/// <typeparam name="T">
/// The type of the value. Only the following types are allowed:
/// <see cref="string"/>, <see cref="bool"/>, <see cref="int"/>, <see cref="long"/>, <see cref="double"/> and <see cref="object"/> (both nullable and non-nullable).<br/>
Expand All @@ -54,6 +64,11 @@ public interface IConfigCatClient : IProvidesHooks, IDisposable
/// <summary>
/// Returns the value along with evaluation details of a feature flag or setting identified by <paramref name="key"/> synchronously.
/// </summary>
/// <remarks>
/// It is important to provide an argument for the <paramref name="defaultValue"/> parameter, specifically for the <typeparamref name="T"/> generic type parameter,
/// that matches the type of the feature flag or setting you are evaluating.<br/>
/// Please refer to <see href="https://configcat.com/docs/sdk-reference/dotnet/#setting-type-mapping">this table</see> for the corresponding types.
/// </remarks>
/// <typeparam name="T">
/// The type of the value. Only the following types are allowed:
/// <see cref="string"/>, <see cref="bool"/>, <see cref="int"/>, <see cref="long"/>, <see cref="double"/> and <see cref="object"/> (both nullable and non-nullable).<br/>
Expand All @@ -71,6 +86,11 @@ public interface IConfigCatClient : IProvidesHooks, IDisposable
/// <summary>
/// Returns the value along with evaluation details of a feature flag or setting identified by <paramref name="key"/> asynchronously.
/// </summary>
/// <remarks>
/// It is important to provide an argument for the <paramref name="defaultValue"/> parameter, specifically for the <typeparamref name="T"/> generic type parameter,
/// that matches the type of the feature flag or setting you are evaluating.<br/>
/// Please refer to <see href="https://configcat.com/docs/sdk-reference/dotnet/#setting-type-mapping">this table</see> for the corresponding types.
/// </remarks>
/// <typeparam name="T">
/// The type of the value. Only the following types are allowed:
/// <see cref="string"/>, <see cref="bool"/>, <see cref="int"/>, <see cref="long"/>, <see cref="double"/> and <see cref="object"/> (both nullable and non-nullable).<br/>
Expand Down

0 comments on commit 5c9c8ce

Please sign in to comment.