// Token: 0x06000C3D RID: 3133 RVA: 0x000402AC File Offset: 0x0003E4AC internal MailboxItemFetchProvider(SyncStateStorage syncStateStorage, int protocolVersion, MailboxSession mailboxSession) { this.disposeTracker = this.GetDisposeTracker(); AirSyncCounters.NumberOfMailboxItemFetches.Increment(); this.syncStateStorage = syncStateStorage; this.mailboxSession = mailboxSession; IAirSyncVersionFactory airSyncVersionFactory = AirSyncProtocolVersionParserBuilder.FromVersion(protocolVersion); this.syncStates = new Dictionary <string, FolderSyncState>(); this.schemaStates = new Dictionary <string, AirSyncSchemaState>(); this.bodyPreferences = new List <BodyPreference>(); this.bodyPartPreferences = new List <BodyPartPreference>(); this.schemaConverterOptions = new Hashtable(); this.schemaStates.Add("Email", airSyncVersionFactory.CreateEmailSchema(null)); this.schemaStates.Add("Calendar", airSyncVersionFactory.CreateCalendarSchema()); this.schemaStates.Add("Contacts", airSyncVersionFactory.CreateContactsSchema()); this.schemaStates.Add("Tasks", airSyncVersionFactory.CreateTasksSchema()); AirSyncSchemaState airSyncSchemaState = airSyncVersionFactory.CreateNotesSchema(); if (airSyncSchemaState != null) { this.schemaStates.Add("Notes", airSyncSchemaState); } airSyncSchemaState = airSyncVersionFactory.CreateSmsSchema(); if (airSyncSchemaState != null) { this.schemaStates.Add("SMS", airSyncSchemaState); } }
protected void InitializeVersionFactory(int version) { if (this.versionFactory == null) { this.versionFactory = AirSyncProtocolVersionParserBuilder.FromVersion(version); } }
internal MailboxSearchProvider(MailboxSession mailboxSession, SyncStateStorage syncStateStorage, IAirSyncContext context) { if (context.Request.Version < 120) { throw new SearchProtocolErrorException { ErrorStringForProtocolLogger = "SearchProtocolError10" }; } this.mailboxSession = mailboxSession; this.syncStateStorage = syncStateStorage; this.context = context; this.versionFactory = AirSyncProtocolVersionParserBuilder.FromVersion(context.Request.Version); AirSyncCounters.NumberOfMailboxSearches.Increment(); }
// Token: 0x0600184D RID: 6221 RVA: 0x0008E8B4 File Offset: 0x0008CAB4 private static bool ParseSupportedTags(int version, List <TagNode> tags, StoreObjectType type) { if (tags.Count == 0 || version < 21) { return(true); } Dictionary <string, bool> dictionary = new Dictionary <string, bool>(tags.Count); foreach (TagNode tagNode in tags) { if (tagNode.NameSpace == 2) { tagNode.NameSpace = 1; } else { if (tagNode.NameSpace != 3) { return(false); } tagNode.NameSpace = 4; } int tag = (int)tagNode.NameSpace << 8 | (int)(tagNode.Tag + 4); string name = TiSyncUpgrade.wbxmlSchema.GetName(tag); dictionary.Add(name, false); } IAirSyncVersionFactory airSyncVersionFactory = AirSyncProtocolVersionParserBuilder.FromVersion(version); AirSyncSchemaState airSyncSchemaState; switch (type) { case StoreObjectType.Folder: airSyncSchemaState = airSyncVersionFactory.CreateEmailSchema(null); break; case StoreObjectType.CalendarFolder: airSyncSchemaState = airSyncVersionFactory.CreateCalendarSchema(); break; case StoreObjectType.ContactsFolder: airSyncSchemaState = airSyncVersionFactory.CreateContactsSchema(); break; case StoreObjectType.TasksFolder: airSyncSchemaState = airSyncVersionFactory.CreateTasksSchema(); break; default: return(false); } AirSyncSetToDefaultStrategy airSyncSetToDefaultStrategy = new AirSyncSetToDefaultStrategy(dictionary); AirSyncDataObject airSyncDataObject = airSyncSchemaState.GetAirSyncDataObject(new Hashtable(), airSyncSetToDefaultStrategy); try { airSyncSetToDefaultStrategy.Validate(airSyncDataObject); } catch (ConversionException) { return(false); } return(true); }