Beispiel #1
0
        public async Task <FolderSyncCommandResult> FolderSync(string syncKey)
        {
            if (string.IsNullOrEmpty(syncKey))
            {
                throw new ArgumentNullException(nameof(syncKey));
            }

            FolderSyncCommand command = new FolderSyncCommand(new FolderSyncCommandParameter(syncKey), this.settings);

            ResponseResult <FolderSyncCommandResult> result = await command.Execute();

            if (ActiveSyncErrorHelper.IsStatusProvisioningError(result.Data?.Status, result?.Error))
            {
                await this.TryDoProvisioning();

                result = await command.Execute();
            }

            if (result.Error != null)
            {
                throw result.Error;
            }

            LogService.Log("ActiveSyncServer", "Folder sync success count: " + result.Data.AddedFolders.Count);

            return(result.Data);
        }
Beispiel #2
0
        FolderSyncResponse IEasConnection.FolderSync(FolderSyncRequest folderSyncRequest)
        {
            FolderSyncCommand folderSyncCommand = new FolderSyncCommand(this.EasConnectionSettings);

            return(folderSyncCommand.Execute(folderSyncRequest));
        }