// Token: 0x0600081B RID: 2075 RVA: 0x00039C5C File Offset: 0x00037E5C
 public static FolderRow FromFolder(Folder folder)
 {
     if (folder == null)
     {
         throw new ArgumentNullException("folder");
     }
     object[] rawData = new object[]
     {
         folder.Id,
         folder.ClassName,
         folder.TryGetProperty(FolderSchema.ExtendedFolderFlags),
         folder.LastSuccessfulSyncTime,
         folder.DisplayName,
         folder.ParentId,
         folder.LastAttemptedSyncTime
     };
     return(FolderRow.FromRawData(rawData));
 }
Example #2
0
        // Token: 0x060007DB RID: 2011 RVA: 0x00038E54 File Offset: 0x00037054
        protected Dictionary <SynchronizableFolderType, List <FolderRow> > GetSynchronizableFolderRows(MailboxSession mailboxSession, object[][] rows)
        {
            Dictionary <SynchronizableFolderType, List <FolderRow> > dictionary = CalendarSyncAssistantHelper.CreateSynchronizableFolderRowsDictionary();

            for (int i = 0; i < rows.Length; i++)
            {
                FolderRow folderRow = FolderRow.FromRawData(rows[i]);
                SynchronizableFolderType synchronizableFolderType = SynchronizableFolderType.FromFolderRow(folderRow);
                if (synchronizableFolderType != null && !this.IsDeletedItemsFolder(mailboxSession, folderRow.ParentItemId))
                {
                    StoreObjectId folderId = folderRow.FolderId;
                    CalendarSyncAssistantHelper.Tracer.TraceDebug <object, string, PropertyDefinition>((long)this.GetHashCode(), "{0}: CalendarSyncAssistantHelper.GetSynchronizableFolderRows identified folder id {1} as a synchronizable folder of type {2}.", TraceContext.Get(), folderId.ToString(), synchronizableFolderType.CounterProperty);
                    if (synchronizableFolderType.HasSubscription(mailboxSession, folderId))
                    {
                        CalendarSyncAssistantHelper.Tracer.TraceDebug <object, string>((long)this.GetHashCode(), "{0}: CalendarSyncAssistantHelper.GetSynchronizableFolderRows found a subscription for folder id {1}.", TraceContext.Get(), folderId.ToString());
                        dictionary[synchronizableFolderType].Add(folderRow);
                    }
                }
            }
            return(dictionary);
        }