PropValueData[] IMailbox.GetProps(PropTag[] ptags) { MrsTracer.Provider.Function("StorageMailbox.GetProps", new object[0]); base.VerifyMailboxConnection(VerifyMailboxConnectionFlags.None); object[] properties; using (base.RHTracker.Start()) { PropertyDefinition[] array = this.ConvertPropTagsToDefinitions(ptags); this.StoreSession.Mailbox.ForceReload(array); properties = this.StoreSession.Mailbox.GetProperties(array); } PropValueData[] array2 = new PropValueData[properties.Length]; for (int i = 0; i < ptags.Length; i++) { object obj = properties[i]; PropTag propTag = ptags[i]; if (obj is ExDateTime) { obj = (DateTime)((ExDateTime)obj); } if (obj is PropertyError) { propTag = propTag.ChangePropType(PropType.Error); obj = (int)((PropertyError)obj).PropertyErrorCode; } if (obj == null) { propTag = propTag.ChangePropType(PropType.Null); } array2[i] = new PropValueData(propTag, obj); } return(array2); }
public static FolderRec Create(StoreSession storageSession, NativeStorePropertyDefinition[] definitions, object[] values) { PropValue[] array = new PropValue[definitions.Length]; ICollection <uint> collection = PropertyTagCache.Cache.PropertyTagsFromPropertyDefinitions(storageSession, definitions); byte[] array2 = null; int num = 0; foreach (uint num2 in collection) { if (num2 == 268370178U) { array2 = storageSession.IdConverter.GetLongTermIdFromId(storageSession.IdConverter.GetFidFromId(StoreObjectId.FromProviderSpecificId((byte[])values[num]))); } num++; } num = 0; foreach (uint num3 in collection) { object obj = values[num]; PropTag propTag = (PropTag)num3; if (propTag == PropTag.LTID) { obj = array2; } if (obj == null) { propTag = propTag.ChangePropType(PropType.Null); } else if (obj is PropertyError) { propTag = propTag.ChangePropType(PropType.Error); obj = (int)((PropertyError)obj).PropertyErrorCode; } else if (obj is ExDateTime) { obj = (DateTime)((ExDateTime)obj); } array[num] = new PropValue(propTag, obj); num++; } return(FolderRec.Create(storageSession, array)); }
PropValueData[] IMailbox.GetProps(PropTag[] ptags) { MrsTracer.Provider.Function("ImapMailbox.GetProps", new object[0]); base.VerifyMailboxConnection(VerifyMailboxConnectionFlags.None); PropValueData[] array = new PropValueData[ptags.Length]; for (int i = 0; i < ptags.Length; i++) { PropTag propTag = ptags[i]; propTag = propTag.ChangePropType(PropType.Null); array[i] = new PropValueData(propTag, null); } return(array); }
public PropValueData(PropTag propTag, object value) { if (value == null) { propTag = propTag.ChangePropType(PropType.Null); } if (value is PropertyError) { propTag = propTag.ChangePropType(PropType.Error); value = (int)((PropertyError)value).PropertyErrorCode; } else if (value is ErrorCode) { propTag = propTag.ChangePropType(PropType.Error); value = (int)((ErrorCode)value); } if (value is ExDateTime) { value = (DateTime)((ExDateTime)value); } this.PropTag = (int)propTag; this.Value = value; }