public static TimeZoneDifferentialModel Deserialize <T>(string value) where T : TimeZoneDifferentialModel { var result = new TimeZoneDifferentialModel(); if (3 > value.Length) { return(result); } result.TimeZoneDirection = uint.Parse(value.Truncate(1)); result.TimeZoneDifference = uint.Parse(value.Substring(1)); return(result); }
public static string Serialize(this TimeZoneDifferentialModel timeZoneDifferential) { return(string.Format("{0}{1}", timeZoneDifferential.TimeZoneDirection, timeZoneDifferential.TimeZoneDifference.ToString().PadLeft(2, '0'))); }
public static void SetTerminalLocale(this Group1AuthorizationModel group1Authorization, CurrencyCodeTypeModel currency, CountryCodeTypeModel countryCode, LanguageIndicatorTypeModel languageIndicator, string zipCode, TimeZoneDifferentialModel timeZonDifferential) { group1Authorization.CurrencyCode = currency; group1Authorization.CountryCode = countryCode; group1Authorization.CityCode = zipCode; group1Authorization.LanguageIndicator = languageIndicator; group1Authorization.TimeZoneDiff = timeZonDifferential; }