Exemple #1
0
        private void SetProps(IPropertyBag propertyBag, PropValueData[] pvda)
        {
            if (pvda == null)
            {
                return;
            }
            int i = 0;

            while (i < pvda.Length)
            {
                PropValueData propValueData = pvda[i];
                object        obj           = propValueData.Value;
                if (obj is DateTime)
                {
                    obj = new ExDateTime(ExTimeZone.TimeZoneFromKind(((DateTime)obj).Kind), (DateTime)obj);
                }
                PropTag propTag  = (PropTag)propValueData.PropTag;
                PropTag propTag2 = propTag;
                if (propTag2 == PropTag.MessageFlags)
                {
                    MessageFlags messageFlags = StorageFxProxyPool.UpdateMessageFlags(propertyBag, (MessageFlags)((int)obj));
                    obj = (int)messageFlags;
                    goto IL_8B;
                }
                if (propTag2 != (PropTag)276824067U)
                {
                    goto IL_8B;
                }
                if (StorageFxProxyPool.ShouldUpdateIconIndex(propertyBag, (IconIndex)obj))
                {
                    goto Block_5;
                }
IL_B5:
                i++;
                continue;
Block_5:
                try
                {
IL_8B:
                    propertyBag.SetProperty(new PropertyValue(new PropertyTag((uint)propValueData.PropTag), obj));
                }
                catch (ArgumentException ex)
                {
                    throw new ExArgumentException(ex.Message, ex);
                }
                goto IL_B5;
            }
        }