-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated Android sdk to v10.0.0 Catnip #357
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also adapt and add...
- this part to the
getValue
section:docs/website/docs/sdk-reference/dotnet.md
Lines 156 to 185 in f850e29
<div id="setting-type-mapping"></div> | Setting Kind | Type parameter `T` | | -------------- | --------------------------------- | | On/Off Toggle | `bool` / `bool?` | | Text | `string` / `string?` | | Whole Number | `int` / `int?` / `long` / `long?` | | Decimal Number | `double` / `double?` | In addition to the types mentioned above, you also have the option to provide `object` or `object?` for the type parameter regardless of the setting kind. However, this approach is not recommended as it may involve [boxing](https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/types/boxing-and-unboxing). It's important to note that providing any other type for the type parameter will result in an `ArgumentException`. If you specify an allowed type but it mismatches the setting kind, an error message will be logged and `defaultValue` will be returned. When relying on type inference and not explicitly specifying the type parameter, be mindful of potential type mismatch issues, especially with number types. For example, `client.GetValue("keyOfMyDecimalSetting", 0)` will return `defaultValue` (`0`) instead of the actual value of the decimal setting because the compiler infers the type as `int` instead of `double`, that is, the call is equivalent to `client.GetValue<int>("keyOfMyDecimalSetting", 0)`, which is a type mismatch. To correctly evaluate a decimal setting, you should use: ```csharp var value = client.GetValue("keyOfMyDecimalSetting", 0.0); // -or- var value = client.GetValue("keyOfMyDecimalSetting", 0d); // -or- var value = client.GetValue<double>("keyOfMyDecimalSetting", 0); ``` - this part to the
getValueDetails
section:docs/website/docs/sdk-reference/dotnet.md
Lines 207 to 210 in f850e29
:::caution It is important to provide an argument for the `defaultValue` parameter, specifically for the `T` generic type parameter, that matches the type of the feature flag or setting you are evaluating. Please refer to [this table](#setting-type-mapping) for the corresponding types. :::
Oh, and to the Java SDK docs as well, while we're at it. (Sorry, I forgot to mention this when reviewing the Java SDK PR.)
Deploying with Cloudflare Pages
|
Description
Update the Android SDK docs for v10.0.0 (Catnip)
Trello card
Trello ticket
Notes for QA
The SDK docs updated and the config-v2-sdk-support-table.md
Requirement checklist