Exemple #1
0
 internal static void SyncRecurringTimeZoneProperties(PropertyBag.BasicPropertyStore propertyBag, ExTimeZone timeZone, byte[] o12TimeZoneBlob)
 {
     if (o12TimeZoneBlob == null)
     {
         o12TimeZoneBlob = O12TimeZoneFormatter.GetTimeZoneBlob(timeZone);
     }
     if (propertyBag.GetValueOrDefault <bool>(InternalSchema.AppointmentRecurring) && timeZone != ExTimeZone.UtcTimeZone && timeZone != ExTimeZone.UnspecifiedTimeZone)
     {
         propertyBag.SetValueWithFixup(InternalSchema.TimeZone, timeZone.LocalizableDisplayName.ToString());
         propertyBag.SetValueWithFixup(InternalSchema.TimeZoneBlob, O11TimeZoneFormatter.GetTimeZoneBlob(timeZone));
         propertyBag.SetValueWithFixup(InternalSchema.TimeZoneDefinitionRecurring, o12TimeZoneBlob);
     }
 }
        internal static ExTimeZone GetTimeZoneFromProperties(string timeZoneDisplayName, byte[] o11TimeZoneBlob, byte[] o12TimeZoneBlob)
        {
            string     text = timeZoneDisplayName ?? string.Empty;
            ExTimeZone result;

            if (O12TimeZoneFormatter.TryParseTimeZoneBlob(o12TimeZoneBlob, text, out result))
            {
                return(result);
            }
            ExTimeZone result2;

            if (O11TimeZoneFormatter.TryParseTimeZoneBlob(o11TimeZoneBlob, text, out result2))
            {
                return(result2);
            }
            return(null);
        }