Exemplo n.º 1
0
        protected async Task <SyncResult <T> > SyncAllEntities <T>(String syncStamp, Guid?projectId = null, int?requestedBlockSize = null, String forcedResourceName = null, SyncBatchCallback <T> callback = null) where T : Entity
        {
            SyncResult <T> allResult = new SyncResult <T>()
            {
                Data = new List <T>()
            };
            bool           breakCall = false;
            SyncResult <T> result    = null;
            string         syncToken = syncStamp;

            while ((result == null || result.Data.Count > 0) && !breakCall)
            {
                result = await SyncEntity <T>(syncToken, projectId, requestedBlockSize, forcedResourceName);

                if (result.Data.Count > 0)
                {
                    allResult.Data.AddRange(result.Data);
                    callback?.Invoke(result, ref breakCall);
                }
                allResult.ContinuationToken = result.ContinuationToken;
                syncToken = allResult.ContinuationToken;
                if (string.IsNullOrEmpty(syncToken))
                {
                    break;
                }
            }
            return(allResult);
        }
Exemplo n.º 2
0
 public async Task <SyncResult <Meeting> > SyncAllMeetings(Guid projectId, String continuationToken, SyncBatchCallback <Meeting> callback = null)
 {
     return(await SyncAllEntities <Meeting>(continuationToken, projectId, null, null, callback));
 }
Exemplo n.º 3
0
 public async Task <SyncResult <Document> > SyncAllFolderDocuments(Guid projectId, String continuationToken, SyncBatchCallback <Document> callback = null)
 {
     return(await SyncAllEntities <Document>(continuationToken, projectId, null, "folderdocumentsync", callback));
 }
Exemplo n.º 4
0
 public async Task <SyncResult <ContactDetails> > SyncAllContactDetails(Guid projectId, String continuationToken, SyncBatchCallback <ContactDetails> callback = null)
 {
     return(await SyncAllEntities <ContactDetails>(continuationToken, projectId, null, null, callback));
 }
Exemplo n.º 5
0
 public async Task <SyncResult <NoteProjectStatus> > SyncAllProjectStatus(Guid projectId, String continuationToken, SyncBatchCallback <NoteProjectStatus> callback = null)
 {
     return(await SyncAllEntities <NoteProjectStatus>(continuationToken, projectId, null, null, callback));
 }
Exemplo n.º 6
0
 public async Task <SyncResult <IssueType> > SyncAllIssueTypes(Guid projectId, String continuationToken, SyncBatchCallback <IssueType> callback = null)
 {
     return(await SyncAllEntities <IssueType>(continuationToken, projectId, null, null, callback));
 }
Exemplo n.º 7
0
 public async Task <SyncResult <ParentCell> > SyncAllParentCells(Guid projectId, String continuationToken, SyncBatchCallback <ParentCell> callback = null)
 {
     return(await SyncAllEntities <ParentCell>(continuationToken, projectId, null, null, callback));
 }
Exemplo n.º 8
0
 public async Task <SyncResult <NoteBase> > SyncAllNoteBaseVisibilityLost(Guid projectId, String continuationToken, SyncBatchCallback <NoteBase> callback = null)
 {
     return(await SyncAllEntities <NoteBase>(continuationToken, projectId, null, "notebasevisibilitylostsync", callback));
 }
Exemplo n.º 9
0
 public async Task <SyncResult <Project> > SyncAllProjects(String continuationToken, SyncBatchCallback <Project> callback = null)
 {
     return(await this.SyncAllEntities <Project>(continuationToken, null, null, null, callback));
 }
Exemplo n.º 10
0
 public async Task <SyncResult <FormTemplate> > SyncAllFormTemplates(string continuationToken, SyncBatchCallback <FormTemplate> callback = null)
 {
     return(await SyncAllEntities <FormTemplate>(continuationToken, null, null, null, callback));
 }
Exemplo n.º 11
0
 public async Task <SyncResult <AccessRightBase> > SyncAllAccessRights(string continuationToken, SyncBatchCallback <AccessRightBase> callback = null)
 {
     return(await SyncAllEntities <AccessRightBase>(continuationToken, null, null, null, callback));
 }
Exemplo n.º 12
0
 public async Task <SyncResult <User> > SyncAllUsers(string continuationToken, SyncBatchCallback <User> callback = null)
 {
     return(await SyncAllEntities <User>(continuationToken, null, null, null, callback));
 }