Microsoft.Protocols.TestSuites.MS_ASTASK.TestSuiteBase.SyncDeleteTask C# (CSharp) Method

SyncDeleteTask() protected method

Call Sync command to delete a task.
protected SyncDeleteTask ( string syncKey, string serverId ) : SyncStore
syncKey string The sync key.
serverId string The server id of the task, which is returned by server.
return Microsoft.Protocols.TestSuites.Common.DataStructures.SyncStore
        protected SyncStore SyncDeleteTask(string syncKey, string serverId)
        {
            List<object> deleteData = new List<object>();
            Request.SyncCollectionDelete delete = new Request.SyncCollectionDelete { ServerId = serverId };
            deleteData.Add(delete);

            SyncRequest syncRequest = TestSuiteHelper.CreateSyncRequest(syncKey, this.UserInformation.TasksCollectionId, deleteData);
            SyncStore syncResponse = this.TASKAdapter.Sync(syncRequest);

            return syncResponse;
        }