Geeksltd / Olive

Olive framework, for more productive cross platform .NET solutions. It's available under the GPL v3 license. See License.md for more information.
https://geeksltd.github.io/Olive
Other
44 stars 44 forks source link

Added decimal to the list of primitive types supported by ToString() #339

Closed jsumiguin closed 2 years ago

jsumiguin commented 2 years ago

Currently, ToString("F"), which is being used in GeneralSearch.AllFields, is accepting primitive types of string, double, and DateTime only. Any other fields would not be part of the GeneralSearch.

Added code to allow decimal to be part of this as well, and in turn be part of Search.

NOTE; Double.ToString() will round off decimal places if they're 0(i.e., 1.00 will be "1", 2.00 will be "2") so double as a workaround does not work, if you use the search term "1.00".

Cheers, JGS