// Token: 0x06000621 RID: 1569 RVA: 0x0002F154 File Offset: 0x0002D354 private bool IsFolderSkippable(PropertyArrayProxy folderProperties) { VersionedId versionedId = folderProperties[FolderSchema.Id] as VersionedId; if (versionedId == null) { SupplementExpirationEnforcer.Tracer.TraceError <SupplementExpirationEnforcer>((long)this.GetHashCode(), "{0}: We could not get id of this folder. Skipping it.", this); return(true); } object obj = folderProperties[FolderSchema.MapiFolderType]; if (obj is int && ((FolderType)obj & FolderType.Search) == FolderType.Search) { SupplementExpirationEnforcer.Tracer.TraceDebug <SupplementExpirationEnforcer, VersionedId>((long)this.GetHashCode(), "{0}: The folder {1} is a search folder. Skipping it for expiration.", this, versionedId); return(true); } if (!(folderProperties[FolderSchema.FolderFlags] is int)) { SupplementExpirationEnforcer.Tracer.TraceDebug <SupplementExpirationEnforcer, VersionedId>((long)this.GetHashCode(), "{0}: The FolderFlags prop doesn't not exist on folder {1}. Skipping it for expiration.", this, versionedId); return(true); } StoreFolderFlags storeFolderFlags = (StoreFolderFlags)folderProperties[FolderSchema.FolderFlags]; if ((storeFolderFlags & StoreFolderFlags.FolderIPM) == StoreFolderFlags.FolderIPM) { SupplementExpirationEnforcer.Tracer.TraceDebug <SupplementExpirationEnforcer, VersionedId>((long)this.GetHashCode(), "{0}: The folder {1} is under IPM subtree. Skipping it for expiration.", this, versionedId); return(true); } DefaultFolderType defaultFolderType = base.MailboxDataForTags.MailboxSession.IsDefaultFolderType(versionedId); if (defaultFolderType == DefaultFolderType.System || defaultFolderType == DefaultFolderType.AdminAuditLogs || defaultFolderType == DefaultFolderType.Audits || defaultFolderType == DefaultFolderType.RecoverableItemsRoot || defaultFolderType == DefaultFolderType.RecoverableItemsVersions || defaultFolderType == DefaultFolderType.RecoverableItemsDeletions || defaultFolderType == DefaultFolderType.RecoverableItemsPurges || defaultFolderType == DefaultFolderType.RecoverableItemsDiscoveryHolds || defaultFolderType == DefaultFolderType.RecoverableItemsMigratedMessages || defaultFolderType == DefaultFolderType.CalendarLogging) { SupplementExpirationEnforcer.Tracer.TraceDebug <SupplementExpirationEnforcer, DefaultFolderType>((long)this.GetHashCode(), "{0}: This folder type is {1}. Skipping it for expiration.", this, defaultFolderType); return(true); } if (base.MailboxDataForTags.ElcUserInformation.ProcessEhaMigratedMessages && !base.MailboxDataForTags.MailboxSession.MailboxOwner.MailboxInfo.IsArchive) { using (Folder folder = Folder.Bind(base.MailboxDataForTags.MailboxSession, versionedId, new PropertyDefinition[] { FolderSchema.DisplayName })) { if (string.Compare(folder.DisplayName, ElcGlobals.MigrationFolderName, true) == 0 || string.Compare(folder.DisplayName, DefaultFolderType.Inbox.ToString(), true) == 0 || string.Compare(folder.DisplayName, DefaultFolderType.SentItems.ToString(), true) == 0) { SupplementExpirationEnforcer.Tracer.TraceDebug <SupplementExpirationEnforcer, string>((long)this.GetHashCode(), "{0}: This is a migration folder in primary mailbox {1}. SupplementEnforcer skips it as it has a separate enforcer.", this, folder.DisplayName); return(true); } } } int num = (int)folderProperties[FolderSchema.ItemCount]; int num2 = (int)folderProperties[FolderSchema.AssociatedItemCount]; if (num == 0 && num2 == 0) { SupplementExpirationEnforcer.Tracer.TraceDebug <SupplementExpirationEnforcer, VersionedId>((long)this.GetHashCode(), "{0}: The Folder {1} is empty. Skipping it for expiration", this, versionedId); return(true); } return(false); }
private MailboxAssociation GetAssociationByItemId(BaseAssociationAdaptor associationAdaptor, string base64ItemId) { MailboxAssociationContext.Tracer.TraceDebug <string>((long)this.GetHashCode(), "MailboxAssociationContext.GetAssociationByItemId [{0}]: Querying association by item id parameter", this.cmdletName); StoreObjectId itemId = StoreObjectId.Deserialize(base64ItemId); VersionedId itemId2 = new VersionedId(itemId, new byte[0]); return(associationAdaptor.GetAssociation(itemId2)); }
// Token: 0x06001211 RID: 4625 RVA: 0x0004C678 File Offset: 0x0004A878 public void Save() { VersionedId previewId = this.FindPreviewItem(); int previewThumbprint = this.ReadPreviewThumbprint(); this.DeleteAllActualPhotoItems(); this.PromotePreviewToActualPhoto(previewId, previewThumbprint); }
private TMailboxAssociation GetAssociationByIdProperty <TMailboxAssociation>(Func <VersionedId, TMailboxAssociation> bindFunction, string associationItemClass, ICollection <PropertyDefinition> propertiesToRetrieve, PropertyDefinition idProperty, params object[] idValues) where TMailboxAssociation : class, IMailboxAssociationBaseItem { this.CheckDisposed("GetAssociationByIdProperty"); if (idValues.Length == 0) { return(default(TMailboxAssociation)); } IPropertyBag[] array = this.SeekInAssociationFolder <object>(associationItemClass, idProperty, idValues, new PropertyDefinition[] { idProperty, StoreObjectSchema.ItemClass, ItemSchema.Id }).ToArray <IPropertyBag>(); string text = null; if (LocalAssociationStore.Tracer.IsTraceEnabled(TraceType.DebugTrace) || LocalAssociationStore.Tracer.IsTraceEnabled(TraceType.ErrorTrace) || array.Length > 1) { text = string.Join(", ", idValues); } if (array.Length == 0) { LocalAssociationStore.Tracer.TraceDebug <string, string>((long)this.GetHashCode(), "LocalAssociationStore::GetAssociationByIdProperty. Found no association item searching by property {0} with values {1}.", idProperty.Name, text); this.performanceTracker.IncrementFailedAssociationsSearch(); return(default(TMailboxAssociation)); } if (array.Length > 1) { this.performanceTracker.IncrementNonUniqueAssociationsFound(); this.LogWarning("LocalAssociationStore::GetAssociationByIdProperty", string.Format("Found more than 1 association item searching by property {0} with values {1}.", idProperty.Name, text)); this.LogWarning("LocalAssociationStore::GetAssociationByIdProperty", string.Format("Keeping association with ID: {0}.", array[0][ItemSchema.Id])); for (int i = 1; i < array.Length; i++) { VersionedId versionedId = array[i][ItemSchema.Id] as VersionedId; using (TMailboxAssociation tmailboxAssociation = bindFunction(versionedId)) { if (tmailboxAssociation != null) { this.LogWarning("LocalAssociationStore::GetAssociationByIdProperty", string.Format("Keeping association with ID: {0}, Removing association {1}", array[0][ItemSchema.Id], tmailboxAssociation.ToString())); this.DeleteAssociation(versionedId); } else { this.LogError("LocalAssociationStore::GetAssociationByIdProperty", string.Format("Couldn't bind to association with ID: {0}.", versionedId.ToString())); } } } } VersionedId versionedId2 = array[0][ItemSchema.Id] as VersionedId; LocalAssociationStore.Tracer.TraceDebug((long)this.GetHashCode(), "LocalAssociationStore::GetAssociationByIdProperty. Found association item searching by property {0} with values {1}. ItemId: {2}. Found value: {3}.", new object[] { idProperty.Name, text, versionedId2, array[0][idProperty] }); return(bindFunction(versionedId2)); }
public void Render(TextWriter writer) { if (writer == null) { throw new ArgumentNullException("writer"); } writer.Write("<table cellspacing=0 cellpadding=0 class=\"snt\">"); writer.Write("<tr><td class=\"clhdr\">"); writer.Write(LocalizedStrings.GetHtmlEncoded(-583426935)); writer.Write("</td></tr>"); bool flag = true; for (int i = 0; i < base.Count; i++) { if (!Utilities.IsExternalSharedInFolder(base.GetPropertyValue(i, FolderSchema.ExtendedFolderFlags))) { string text = (string)base.GetPropertyValue(i, FolderSchema.DisplayName); VersionedId versionedId = (VersionedId)base.GetPropertyValue(i, FolderSchema.Id); StoreObjectId objectId = versionedId.ObjectId; writer.Write("<tr><td nowrap class=\"fld"); bool flag2 = objectId.Equals(this.selectedFolderId); if (flag2) { writer.Write(" sl"); flag = false; } writer.Write("\"><a href=\"?ae=Folder&t=IPF.Appointment&id="); Utilities.HtmlEncode(Utilities.UrlEncode(objectId.ToBase64String()), writer); writer.Write("\" title=\""); Utilities.HtmlEncode(text, writer); writer.Write("\">"); writer.Write("<img src=\""); base.UserContext.RenderThemeFileUrl(writer, ThemeFileId.Appointment); writer.Write("\" alt=\"\">"); Utilities.CropAndRenderText(writer, text, 24); writer.Write(" </a>"); writer.Write("</td></tr>"); } } if (flag) { using (Folder folder = Folder.Bind(base.UserContext.MailboxSession, this.selectedFolderId)) { writer.Write("<tr><td class=\"fter\"><img src=\""); base.UserContext.RenderThemeFileUrl(writer, ThemeFileId.Clear); writer.Write("\" alt=\"\"></td></tr>"); writer.Write("<tr><td class=\"clhdr\">"); writer.Write(LocalizedStrings.GetHtmlEncoded(352017519)); writer.Write("</td></tr><tr><td class=\"fld sl\"><a href=\"#\" onClick=\"return false;\"><img src=\""); base.UserContext.RenderThemeFileUrl(writer, ThemeFileId.Appointment); writer.Write("\">"); Utilities.CropAndRenderText(writer, folder.DisplayName, 24); writer.Write("</a></td></tr>"); } } writer.Write("</table>"); }
// Token: 0x06000245 RID: 581 RVA: 0x0000E565 File Offset: 0x0000C765 internal ItemData(VersionedId itemId, DateTime messageReceivedDate, ItemAuditLogData itemAuditLogData, int messageSize) { this.id = itemId; this.messageReceivedDate = messageReceivedDate; this.itemAuditLogData = itemAuditLogData; this.parentId = null; this.messageSize = messageSize; this.enforcerType = ItemData.EnforcerType.None; }
private PushNotificationSubscription CreatePresentationObject(IStorePropertyBag propertyBag, ADUser aduser, MailboxSession mailboxSession) { VersionedId valueOrDefault = propertyBag.GetValueOrDefault <VersionedId>(ItemSchema.Id, null); string valueOrDefault2 = propertyBag.GetValueOrDefault <string>(PushNotificationSubscriptionItemSchema.SubscriptionId, null); string serializedNotificationSubscription = PushNotificationStorage.GetSerializedNotificationSubscription(mailboxSession, propertyBag, GetPushNotificationSubscription.xsoFactory); base.WriteVerbose(Strings.WriteVerboseSerializedSubscription(serializedNotificationSubscription)); return(new PushNotificationSubscription(aduser.ObjectId, valueOrDefault, valueOrDefault2, serializedNotificationSubscription)); }
// Token: 0x06000244 RID: 580 RVA: 0x0000E518 File Offset: 0x0000C718 internal ItemData(VersionedId itemId, StoreObjectId parentId, ItemData.EnforcerType enforcerType, int messageSize) { this.id = itemId; this.messageReceivedDate = DateTime.MinValue; this.itemAuditLogData = null; this.parentId = parentId; this.messageSize = messageSize; this.enforcerType = enforcerType; }
// Token: 0x06000A14 RID: 2580 RVA: 0x00042548 File Offset: 0x00040748 internal void Update(Guid externalDirectoryOrganizationId, string mailboxOwnerLegacyDN, string settings, StoreObjectId settingsFolderId) { VersionedId versionedId = null; string text = SystemMailbox.FormatItemSubject(externalDirectoryOrganizationId, mailboxOwnerLegacyDN); QueryFilter seekFilter = new ComparisonFilter(ComparisonOperator.Equal, ItemSchema.Subject, text); lock (this.systemMailboxMutex) { if (!this.isDisposed) { this.ConnectSystemMailboxSession(); try { using (Folder folder = Folder.Bind(this.systemMailboxSession, settingsFolderId)) { using (QueryResult queryResult = folder.ItemQuery(ItemQueryType.None, null, SystemMailbox.sortBySubject, SystemMailbox.updatingUserSettingsProperties)) { IStorePropertyBag[] propertyBags; if (queryResult.SeekToCondition(SeekReference.OriginBeginning, seekFilter) && queryResult.SeekToCondition(SeekReference.OriginCurrent, SystemMailbox.SettingsItemClassFilter) && 0 < (propertyBags = queryResult.GetPropertyBags(1)).Length) { versionedId = (VersionedId)propertyBags[0].TryGetProperty(ItemSchema.Id); } } } if (string.IsNullOrEmpty(settings)) { if (versionedId != null) { this.systemMailboxSession.Delete(DeleteItemFlags.SoftDelete, new StoreId[] { versionedId }); SystemMailbox.Tracer.TraceDebug <string, StoreObjectId>((long)this.GetHashCode(), "Notification disabled {0} under folder {1}", text, settingsFolderId); } } else { using (Item item = (versionedId != null) ? MessageItem.Bind(this.systemMailboxSession, versionedId) : MessageItem.Create(this.systemMailboxSession, settingsFolderId)) { if (versionedId == null) { item.ClassName = "IPM.Configuration.UserCalendarNotification"; item[ItemSchema.Subject] = text; } item[ItemSchema.TextBody] = settings; item.Save(SaveMode.ResolveConflicts); SystemMailbox.Tracer.TraceDebug <string, StoreObjectId>((long)this.GetHashCode(), "Notification settings of user {0} have been saved under folder {1}", text, settingsFolderId); } } } finally { this.DisconnectSystemMailboxSession(); } } } }
// Token: 0x06000293 RID: 659 RVA: 0x0000F4F0 File Offset: 0x0000D6F0 private DateTime GetStartDateOfTaskItem(VersionedId id, object[] itemProperties) { DateTime?taskStartDateFromView = this.GetTaskStartDateFromView(itemProperties); if (taskStartDateFromView != null) { return(taskStartDateFromView.Value); } return(this.OpenTaskItemToGetStartDate(id, itemProperties)); }
internal static string EntryIdGetter(IPropertyBag propertyBag) { VersionedId versionedId = propertyBag[MailboxFolderSchema.InternalFolderIdentity] as VersionedId; if (versionedId == null || versionedId.ObjectId == null) { return(string.Empty); } return(versionedId.ObjectId.ToHexEntryId()); }
// Token: 0x06000290 RID: 656 RVA: 0x0000F120 File Offset: 0x0000D320 private DateTime GetStartDateOfCalendarItem(VersionedId id, object[] itemProperties) { DateTime?calStartDateFromView = this.GetCalStartDateFromView(itemProperties); if (calStartDateFromView != null) { return(calStartDateFromView.Value); } return(this.OpenCalItemToGetStartDate(id)); }
internal static object FolderStoreObjectIdGetter(IPropertyBag propertyBag) { VersionedId versionedId = (VersionedId)propertyBag[MailboxFolderSchema.InternalFolderIdentity]; if (versionedId != null && versionedId.ObjectId != null) { return(versionedId.ObjectId.ToString()); } return(string.Empty); }
public virtual TEntity CreateBasicEntity <TEntity>(VersionedId objectId, IStoreSession session) where TEntity : IStorageEntity, new() { string changeKey; string id = this.ToStringId(objectId, session, out changeKey); TEntity result = (default(TEntity) == null) ? Activator.CreateInstance <TEntity>() : default(TEntity); result.Id = id; result.ChangeKey = changeKey; return(result); }
internal static StoreId GetObjectId(StoreId id) { VersionedId versionedId = id as VersionedId; if (versionedId != null && versionedId.ObjectId != null) { return(versionedId.ObjectId); } return(id); }
public override void PerformBatchOperation(object[][] batchedItemBuffer, int fetchedItemCount, StoreId currentFolderId, MailboxSession sourceMailbox, MailboxSession targetMailbox, Dictionary <StoreId, FolderNode> folderNodeMap, SearchResultProcessor processor) { if (this.loggingLevel != LoggingLevel.Full) { return; } LocalizedString[] array = new LocalizedString[fetchedItemCount]; for (int i = 0; i < fetchedItemCount; i++) { VersionedId versionedId = (VersionedId)batchedItemBuffer[i][0]; string text = SearchMailboxAction.PropertyExists(batchedItemBuffer[i][3]) ? ((string)batchedItemBuffer[i][3]) : string.Empty; bool? flag = null; if (SearchMailboxAction.PropertyExists(batchedItemBuffer[i][4])) { flag = new bool?((bool)batchedItemBuffer[i][4]); } ExDateTime?exDateTime = null; if (SearchMailboxAction.PropertyExists(batchedItemBuffer[i][5])) { exDateTime = new ExDateTime?((ExDateTime)batchedItemBuffer[i][5]); } ExDateTime?exDateTime2 = null; if (SearchMailboxAction.PropertyExists(batchedItemBuffer[i][6])) { exDateTime2 = new ExDateTime?((ExDateTime)batchedItemBuffer[i][6]); } Participant participant = null; if (SearchMailboxAction.PropertyExists(batchedItemBuffer[i][7])) { participant = (Participant)batchedItemBuffer[i][7]; } string text2 = null; if (SearchMailboxAction.PropertyExists(batchedItemBuffer[i][8])) { text2 = (string)batchedItemBuffer[i][8]; } string text3 = (participant != null) ? participant.DisplayName : string.Empty; string text4 = (participant != null) ? participant.EmailAddress : string.Empty; string displayName = folderNodeMap[currentFolderId].DisplayName; array[i] = new LocalizedString(string.Format("{0},\"{1}\",\"{2}\",{3},{4},{5},{6},{7},{8}", new object[] { sourceMailbox.MailboxOwner.MailboxInfo.DisplayName, displayName, text, flag, exDateTime, exDateTime2, text3, text2 ?? text4, versionedId.ObjectId })); } StreamLogItem.LogItem logItem = new StreamLogItem.LogItem(processor.WorkerId, array); processor.ReportLogs(logItem); }
// Token: 0x0600063F RID: 1599 RVA: 0x0002FC3C File Offset: 0x0002DE3C bool IAuditRecordStrategy <ItemData> .RecordFilter(IReadOnlyPropertyBag propertyBag, out bool stopNow) { stopNow = false; VersionedId versionedId = propertyBag[ItemSchema.Id] as VersionedId; if (versionedId == null) { if (AuditExpirationEnforcer.Tracer.IsTraceEnabled(TraceType.ErrorTrace)) { AuditExpirationEnforcer.Tracer.TraceError <AuditExpirationEnforcer>((long)this.GetHashCode(), "{0}: We could not get id of this item. Skipping it.", this); } return(false); } if (ElcGlobals.ExpireDumpsterRightNow) { return(true); } object obj = propertyBag[StoreObjectSchema.CreationTime]; if (!ElcMailboxHelper.Exists(obj)) { if (AuditExpirationEnforcer.Tracer.IsTraceEnabled(TraceType.DebugTrace)) { AuditExpirationEnforcer.Tracer.TraceDebug <AuditExpirationEnforcer>((long)this.GetHashCode(), "{0}: CreationTime date is missing. Skipping the item.", this); } return(false); } DateTime dateTime = (DateTime)((ExDateTime)obj).ToUtc(); if (dateTime > this.expirationTime) { if (AuditExpirationEnforcer.Tracer.IsTraceEnabled(TraceType.DebugTrace)) { AuditExpirationEnforcer.Tracer.TraceDebug((long)this.GetHashCode(), "{0}: Item {1} newer than minAgeLimitForFolder. Item:{2}, Limit:{3}.", new object[] { this, versionedId, dateTime, this.expirationTime }); } stopNow = true; return(false); } if (this.oldestExpiringLog.CompareTo(DateTime.MinValue) == 0) { this.oldestExpiringLog = dateTime; } else if (dateTime.CompareTo(this.oldestExpiringLog) < 0) { this.oldestExpiringLog = dateTime; } return(true); }
internal static object IdentityGetter(IPropertyBag propertyBag) { ADObjectId mailboxOwnerId = (ADObjectId)propertyBag[XsoMailboxConfigurationObjectSchema.MailboxOwnerId]; VersionedId versionedId = (VersionedId)propertyBag[MailMessageSchema.InternalMessageIdentity]; if (versionedId != null) { return(new MailboxStoreObjectId(mailboxOwnerId, (versionedId == null) ? null : versionedId.ObjectId)); } return(null); }
// Token: 0x060002D5 RID: 725 RVA: 0x000115C4 File Offset: 0x0000F7C4 private void BuildListOfProvisionedFolders() { VersionedId rootFolderId = null; string text = null; using (Folder folder = Folder.Bind(this.MailboxSession, DefaultFolderType.Root, FolderProcessor.DataColumns)) { rootFolderId = folder.Id; try { if (ElcMailboxHelper.Exists(folder[FolderSchema.ELCPolicyIds])) { text = (string)folder[FolderSchema.ELCPolicyIds]; List <object> list = new List <object>(folder.GetProperties(FolderProcessor.DataColumns)); list.Add(list[3]); this.entireFolderList.Add(list.ToArray()); FolderProcessor.Tracer.TraceDebug <FolderProcessor, string>((long)this.GetHashCode(), "{0}: Root Policy '{1}' is set for this mailbox.", this, text); } } catch (PropertyErrorException ex) { if (ex.PropertyErrors[0].PropertyErrorCode != PropertyErrorCode.NotFound) { throw; } FolderProcessor.Tracer.TraceDebug <FolderProcessor>((long)this.GetHashCode(), "{0}: Root Policy does not exist for this mailbox.", this); } using (QueryResult queryResult = folder.FolderQuery(FolderQueryFlags.DeepTraversal, null, null, FolderProcessor.DataColumns)) { for (;;) { object[][] rows = queryResult.GetRows(100); if (rows.Length <= 0) { break; } for (int i = 0; i < rows.Length; i++) { this.entireFolderList.Add(rows[i]); } } } } ElcMailboxHelper.PopulateFolderPathProperty(this.entireFolderList, new FolderPathIndices(3, 6, 0, 1, 7)); for (int j = 0; j < this.entireFolderList.Count; j++) { ProvisionedFolder provisionedFolder = this.GetProvisionedFolder(j, rootFolderId, text); if (provisionedFolder != null) { this.ProvisionedFolderList.Add(provisionedFolder); } } FolderProcessor.Tracer.TraceDebug <FolderProcessor, int>((long)this.GetHashCode(), "{0}: Number of folders found with policies for this mailbox is: {1}.", this, this.ProvisionedFolderList.Count); }
internal new static object IdentityGetter(IPropertyBag propertyBag) { VersionedId versionedId = (VersionedId)propertyBag[MailboxFolderSchema.InternalFolderIdentity]; MapiFolderPath mapiFolderPath = (MapiFolderPath)propertyBag[MailboxFolderSchema.FolderPath]; if (null != mapiFolderPath || versionedId != null) { return(new PublicFolderId((versionedId == null) ? null : versionedId.ObjectId, mapiFolderPath)); } return(null); }
private static VersionedId EwsIdToVersionedId(string ewsId, string changeKey, out MailboxId mailboxId) { IdHeaderInformation idHeaderInformation = ServiceIdConverter.ConvertFromConcatenatedId(ewsId, BasicTypes.Item, null); mailboxId = idHeaderInformation.MailboxId; byte[] byteArrayChangeKey; StoreObjectType objectType; WebServiceMailboxSearchGroup.ParseChangeKeyString(changeKey, out byteArrayChangeKey, out objectType); return(VersionedId.Deserialize(idHeaderInformation.StoreIdBytes, byteArrayChangeKey, objectType)); }
// Token: 0x0600065F RID: 1631 RVA: 0x0003089C File Offset: 0x0002EA9C ItemData IAuditRecordStrategy <ItemData> .Convert(IReadOnlyPropertyBag propertyBag) { VersionedId itemId = propertyBag[ItemSchema.Id] as VersionedId; object obj = propertyBag[ItemSchema.Size]; int messageSize = 0; if (obj != null && obj is int) { messageSize = (int)obj; } return(new ItemData(itemId, messageSize)); }
internal static object IdentityGetter(IPropertyBag propertyBag) { ADObjectId mailboxOwnerId = (ADObjectId)propertyBag[XsoMailboxConfigurationObjectSchema.MailboxOwnerId]; VersionedId versionedId = (VersionedId)propertyBag[MailboxFolderSchema.InternalFolderIdentity]; MapiFolderPath mapiFolderPath = (MapiFolderPath)propertyBag[MailboxFolderSchema.FolderPath]; if (null != mapiFolderPath || versionedId != null) { return(new MailboxFolderId(mailboxOwnerId, (versionedId == null) ? null : versionedId.ObjectId, mapiFolderPath)); } return(null); }
// Token: 0x0600049C RID: 1180 RVA: 0x00021C4C File Offset: 0x0001FE4C private void CommitChangesAlready(VersionedId itemId) { ItemPropertySynchronizer.< > c__DisplayClass2 CS$ < > 8__locals1 = new ItemPropertySynchronizer.< > c__DisplayClass2(); CS$ < > 8__locals1.itemId = itemId; CS$ < > 8__locals1.< > 4__this = this; base.ElcAssistant.ThrowIfShuttingDown(base.MailboxDataForTags.MailboxSession.MailboxOwner); if (base.PropertiesToBeDeleted.Count <= 0 && base.PropertiesToBeUpdated.PropertyDefinitions.Count <= 0) { return; } ILUtil.DoTryFilterCatch(new TryDelegate(CS$ < > 8__locals1, (UIntPtr)ldftn(< CommitChangesAlready > b__0)), new FilterDelegate(null, (UIntPtr)ldftn(ExceptionFilter)), new CatchDelegate(CS$ < > 8__locals1, (UIntPtr)ldftn(< CommitChangesAlready > b__1))); }
// Token: 0x0600028E RID: 654 RVA: 0x0000F027 File Offset: 0x0000D227 internal DateTime GetStartDateForTag(VersionedId itemId, string itemClass, object[] itemProperties, DateTime?existingStartDate, bool itemMoved) { if (this.folderType != DefaultFolderType.DeletedItems) { return(this.GetStartDate(itemId, itemClass, itemProperties)); } if (itemMoved || existingStartDate == null) { return((DateTime)ExDateTime.Now); } return(existingStartDate.Value); }
private static bool IsRootMessage(Conversation conversation, ICorePropertyBag messagePropertyBag) { StoreObjectId rootMessageId = conversation.RootMessageId; if (rootMessageId == null) { return(false); } VersionedId valueOrDefault = messagePropertyBag.GetValueOrDefault <VersionedId>(ItemSchema.Id, null); return(rootMessageId.Equals(valueOrDefault.ObjectId)); }
internal static Event GetBasicSeriesEventData(IStorePropertyBag propertyBag, IStorageEntitySetScope <IStoreSession> scope) { VersionedId valueOrDefault = propertyBag.GetValueOrDefault <VersionedId>(ItemSchema.Id, null); Event @event = scope.IdConverter.CreateBasicEntity <Event>(valueOrDefault, scope.StoreSession); string valueOrDefault2 = propertyBag.GetValueOrDefault <string>(StoreObjectSchema.ItemClass, null); if (!string.IsNullOrEmpty(valueOrDefault2)) { @event.Type = (ObjectClass.IsCalendarItemSeries(valueOrDefault2) ? EventType.SeriesMaster : EventType.Exception); } @event.StoreId = valueOrDefault; return(@event); }
private void DeleteAssociation(VersionedId itemId) { if (itemId != null) { LocalAssociationStore.Tracer.TraceDebug <StoreObjectId>((long)this.GetHashCode(), "LocalAssociationStore::DeleteAssociation. Deleting association item with ID={0}.", itemId.ObjectId); this.session.Delete(DeleteItemFlags.HardDelete, new StoreId[] { itemId.ObjectId }); this.performanceTracker.IncrementAssociationsDeleted(); return; } LocalAssociationStore.Tracer.TraceDebug((long)this.GetHashCode(), "LocalAssociationStore::DeleteAssociation. Skipping association without item ID."); }
private IEnumerable <VersionedId> ReadMessageIdsFromQueryResult(QueryResult queryResult, ExDateTime cutoffDateTime, bool latest) { object[][] rows = queryResult.GetRows(1000); foreach (object[] row in rows) { VersionedId messageId = PropertyBag.CheckPropertyValue <VersionedId>(ItemSchema.Id, row[0]); ExDateTime createTime = PropertyBag.CheckPropertyValue <ExDateTime>(StoreObjectSchema.CreationTime, row[1]); if ((latest && createTime > cutoffDateTime) || (!latest && createTime <= cutoffDateTime)) { yield return(messageId); } } yield break; }
// Token: 0x06002087 RID: 8327 RVA: 0x000BC88C File Offset: 0x000BAA8C public new string GetItemId() { VersionedId itemProperty = this.GetItemProperty <VersionedId>(FolderSchema.Id); if (itemProperty != null) { return(OwaStoreObjectId.CreateFromMailboxFolderId(itemProperty.ObjectId).ToString()); } itemProperty = this.GetItemProperty <VersionedId>(ItemSchema.Id); if (itemProperty != null) { return(Utilities.GetItemIdString(itemProperty.ObjectId, base.Folder)); } return(null); }