CreateSyncRequest() static private method

Builds a generic Sync request without command references by using the specified sync key, folder collection ID and body preference option.
static private CreateSyncRequest ( string syncKey, string collectionId, bool rightsManagementSupport ) : SyncRequest
syncKey string Specify the sync key obtained from the last sync response
collectionId string Specify the server ID of the folder to be synchronized, which can be returned by ActiveSync FolderSync command
rightsManagementSupport bool A boolean value specifies whether the server will decompress and decrypt rights-managed email messages before sending them to the client or not
return SyncRequest
コード例 #1
0
        /// <summary>
        /// Sync changes between client and server
        /// </summary>
        /// <param name="syncKey">The synchronization key returned by last request.</param>
        /// <param name="collectionId">Identify the folder as the collection being synchronized.</param>
        /// <param name="rightsManagementSupport">A boolean value specifies whether the server will decompress and decrypt rights-managed email messages before sending them to the client or not</param>
        /// <returns>Return change result</returns>
        protected DataStructures.SyncStore SyncChanges(string syncKey, string collectionId, bool rightsManagementSupport)
        {
            // Get changes from server use initial syncKey
            SyncRequest syncRequest = TestSuiteHelper.CreateSyncRequest(syncKey, collectionId, rightsManagementSupport);

            DataStructures.SyncStore syncResult = this.ASRMAdapter.Sync(syncRequest);

            return(syncResult);
        }
コード例 #2
0
        /// <summary>
        /// Find an email with specific subject and folder.
        /// </summary>
        /// <param name="subject">The subject of the email item.</param>
        /// <param name="collectionId">Identify the folder as the collection being synchronized.</param>
        /// <param name="rightsManagementSupport">A boolean value specifies whether the server will decompress and decrypt rights-managed email messages before sending them to the client or not</param>
        /// <param name="isRetryNeeded">A boolean value specifies whether need retry.</param>
        /// <returns>Return change result</returns>
        protected DataStructures.Sync SyncEmail(string subject, string collectionId, bool?rightsManagementSupport, bool isRetryNeeded)
        {
            SyncRequest syncRequest = Common.CreateInitialSyncRequest(collectionId);

            DataStructures.SyncStore initSyncResult = this.ASRMAdapter.Sync(syncRequest);

            // Verify sync change result
            this.Site.Assert.AreEqual <byte>(1, initSyncResult.CollectionStatus, "If the Sync command executes successfully, the Status in response should be 1.");

            syncRequest = TestSuiteHelper.CreateSyncRequest(initSyncResult.SyncKey, collectionId, rightsManagementSupport);
            DataStructures.Sync sync = this.ASRMAdapter.SyncEmail(syncRequest, subject, isRetryNeeded);
            return(sync);
        }