Class Helpers
[StandardModule]
public sealed class Helpers
- Inheritance
-
Helpers
- Inherited Members
Properties
CurrentDateFormat
Returns the current date time format as set by the operating system
public static string CurrentDateFormat { get; }
Property Value
CurrentListSeparator
Returns the list separator as set by the operating system (e.g. "," or ";")
public static string CurrentListSeparator { get; }
Property Value
CurrentNumberFormat
Returns the number format as set by the operating system
public static NumberFormatInfo CurrentNumberFormat { get; }
Property Value
DateFormats
Date formats
public static Dictionary<string, string> DateFormats { get; }
Property Value
- Dictionary<string, string>
Dictionary of available DateFormats
Remarks
DefaultEncoding
Default Encoding (as set by the .NET implementation, in .NET Core and later versions this is UTF-8)
public static Encoding DefaultEncoding { get; }
Property Value
DefaultNumberFormat
Default NumberFormat
public static NumberFormatInfo DefaultNumberFormat { get; }
Property Value
- NumberFormatInfo
NumberFormatInfo instance with decimal separator "." and no NumberGroupSeparator
Methods
CalendarMonths()
Returns a list of calendar months from January to December
public static List<Month> CalendarMonths()
Returns
GetColorPalette(string)
Returns a specified color palette
public static Color[] GetColorPalette(string name = "Material")
Parameters
namestringAvailable color palettes are "Material", "Distinct", "Color Wheel" and "Random". Defaults to "Material".
Returns
- Color[]
A color palette
ParseInterpretation(int)
Parses an integer to a TimeSeries.InterpretationEnum value. If the integer does not match any of the enum values, TimeSeries.InterpretationEnum.Undefined is returned and a warning is logged.
public static TimeSeries.InterpretationEnum ParseInterpretation(int interpretationValue)
Parameters
interpretationValueintThe integer value to be parsed
Returns
- TimeSeries.InterpretationEnum
The corresponding TimeSeries.InterpretationEnum value
ParseInterpretation(string)
Parses a string to a TimeSeries.InterpretationEnum value. If the string does not match any of the enum names, TimeSeries.InterpretationEnum.Undefined is returned and a warning is logged.
public static TimeSeries.InterpretationEnum ParseInterpretation(string interpretationString)
Parameters
interpretationStringstringThe string to be parsed
Returns
- TimeSeries.InterpretationEnum
The corresponding TimeSeries.InterpretationEnum value
StringToDouble(string, NumberFormatInfo)
Converts a string to a double
public static double StringToDouble(string str, NumberFormatInfo format = null)
Parameters
strstringstring to be converted
formatNumberFormatInfooptional NumberFormatInfo object to use for the conversion. If not provided, the DefaultNumberInfo is used.
Returns
- double
Double value, set to NaN if the string was not parseable. NaN and +-Infinity in the input string are recognized and converted to the correspoing Double value.