Method FromJsonString
FromJsonString(string, TimeSpan, TimeSpan, RateBase)
Deserializes a JSON String to a SnmpRate32 instance.
Throws a JsonReaderException if the given rateHelperSerialized is an invalid string representation of a SnmpRate32 instance.
public static SnmpRate32 FromJsonString(string rateHelperSerialized, TimeSpan minDelta, TimeSpan maxDelta, RateBase rateBase = RateBase.Second)
Parameters
rateHelperSerializedstringSerialized SnmpRate32 instance.
minDeltaTimeSpanMinimum TimeSpan necessary between 2 counters when calculating a rate.
Counters will be buffered until this minimum delta is met.maxDeltaTimeSpanMaximum TimeSpan allowed between 2 counters when calculating a rate.
rateBaseRateBaseChoose whether the rate should be calculated per second, minute, hour or day.
Returns
- SnmpRate32
If the
rateHelperSerializedis valid, a new instance of the SnmpRate32 class with all data found inrateHelperSerialized.
Otherwise, throws a JsonReaderException.