public ResultCode ParseTimeZoneRuleBinary(out TimeZoneRule outRules, Stream timeZoneBinaryStream) { ResultCode result = ResultCode.Success; lock (_lock) { bool timeZoneConversionSuccess = TimeZone.ParseTimeZoneBinary(out outRules, timeZoneBinaryStream); if (!timeZoneConversionSuccess) { result = ResultCode.TimeZoneConversionFailed; } } return(result); }
public ResultCode SetDeviceLocationNameWithTimeZoneRule(string locationName, Stream timeZoneBinaryStream) { ResultCode result = ResultCode.TimeZoneConversionFailed; lock (_lock) { Box <TimeZoneRule> rules = new Box <TimeZoneRule>(); bool timeZoneConversionSuccess = TimeZone.ParseTimeZoneBinary(ref rules.Data, timeZoneBinaryStream); if (timeZoneConversionSuccess) { _deviceLocationName = locationName; _myRules = rules; result = ResultCode.Success; } } return(result); }