コード例 #1
0
ファイル: ActiveSyncServer.cs プロジェクト: yaneshtyagi/2day
        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);
        }
コード例 #2
0
        FolderSyncResponse IEasConnection.FolderSync(FolderSyncRequest folderSyncRequest)
        {
            FolderSyncCommand folderSyncCommand = new FolderSyncCommand(this.EasConnectionSettings);

            return(folderSyncCommand.Execute(folderSyncRequest));
        }