Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

[SettingManager] manage double values #784


User avatar
0
daws created

Hello there,

In settings Management doc, it's specified that values are string and "We can store non-string values by converting to string".

Related to this sample :

//Getting a boolean value (async call)
var value1 = await SettingManager.GetSettingValueAsync<bool>("PassiveUsersCanNotLogin");

Is there a possibility to use GetSettingValueAsync<double> ? (for retrieving 0.2 value from "0.2" stored value. right now it's converted to "2")

if not, i could still convert it myself after retrieving the string.

thks for the help !


1 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    I fixed it by using CultureInfo.InvariantCulture in conversion: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/871">https://github.com/aspnetboilerplate/as ... issues/871</a> Will be available on next version (v0.8.1). For now, you can convert it yourself. Thanks.