示例#1
0
 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());
 }
示例#2
0
 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);
 }
示例#3
0
        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);
        }
示例#4
0
        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)
        {

        }
示例#6
0
 public BatchHandler(String userId, SyncResult syncResult)
 {
     this.userId = userId;
     //this.application = TickTickApplicationBase.StaticApplication;
     this.mSyncResult = syncResult;
 }