Ejemplo n.º 1
0
        /// <summary>
        /// Updates a contact specified the MyRemoteContact helper object from the contact store.
        /// </summary>
        /// <param name="remoteContact"></param>
        /// <returns></returns>
        public async Task DeleteContacts(ulong revision = 0)
        {
            Debug.WriteLine(String.Format("Getting changes since revision: {0}", revision));
            // Call GetChangesAsync to get all changes since the specified revision.
            var changeList = await contactStore.GetChangesAsync(revision);

            foreach (var change in changeList)
            {
                // Each change record returned contains the change type, remote and local ids, and revision number
                Debug.WriteLine(String.Format("Change Type: {0}\nLocal ID: {1}\nRemote ID: {2}\nRevision Number: {3}",
                                              change.ChangeType.ToString(),
                                              change.Id,
                                              await remoteIdHelper.GetUntaggedRemoteId(contactStore, change.RemoteId),
                                              change.RevisionNumber));
                await contactStore.DeleteContactAsync(change.Id);
            }
        }