public TaskBatchHandler(String userId, SyncResult syncResult) : base(userId, syncResult) { TaskBll = new TaskBll();//application.getTaskService(); LocationBll = new LocationBll();//new LocationBll(application); AttachmentBll = new AttachmentBll();//application.AttachmentService(); //SyncStatusService = new SyncStatusService(application.getDBHelper()); TaskSyncCollector = new TaskSyncCollector(userId); TaskSyncedJsonBll = new TaskSyncedJsonBll();//new TaskSyncedJsonService(application.getDBHelper()); SyncStatusBll = new SyncStatusBll();// new SyncStatusService(application.getDBHelper()); }
private void InitBatchHandler(SyncResult syncResult) { //ProjectGroupBatchHandler = new ProjectGroupBatchHandler(user.getId(), syncResult); ProjectBatchHandler = new ProjectBatchHandler(User.Sid, syncResult); TaskBatchHandler = new TaskBatchHandler(User.Sid, syncResult); //MoveProjectHandler = new MoveProjectBatchHandler(user.getId(), syncResult); //TaskSortOrderHandler = new TaskSortOrderHandler(user.getId(), syncResult); //TaskAssignHandler = new TaskAssignHandler(user.getId(), syncResult); //RestoreHandler = new TaskBatchRestoreHandler(user.getId(), syncResult); //DeleteForeverHandler = new TaskDeleteForeverHandler(user.getId(), syncResult); //TaskOrderBatchHandler = new TaskOrderBatchHandler(user.getId(), syncResult); }
public void Launch(User user, SyncResult syncResult) { this.mSyncResult = syncResult; this.User = user;//await this.AccountManager.GetAccountById(App.SignUserInfo.Sid); InitCommunicator();//考虑使用缓存队列形式 InitBatchHandler(syncResult); //profileSyncService = new UserProfileSyncService(application, communicator, syncResult); }
public async Task<SyncResult> DoSyncAll(Object firstPhaseResult, int type) { //Log.d(TAG, "sync all begin"); String userId = (String)firstPhaseResult; SyncResult syncResult = new SyncResult(); if (!HttpHelper.IsConnectedToNetwork) { return syncResult; } this.Launch(await AccountManager.GetAccountById(userId), syncResult); await this.DoAsync(type); //Log.d(TAG, "sync all end"); return syncResult; }
public ProjectBatchHandler(string userId, SyncResult syncResult) : base(userId, syncResult) { }
public BatchHandler(String userId, SyncResult syncResult) { this.userId = userId; //this.application = TickTickApplicationBase.StaticApplication; this.mSyncResult = syncResult; }