Ejemplo n.º 1
0
 // 同步
 // 注:中途遇到异常(例如 Loader 抛出异常),可能会丢失 INSERT_BATCH 条以内的日志记录写入 operlog 表
 // parameters:
 //      strLastDate   处理中断或者结束时返回最后处理过的日期
 //      last_index  处理或中断返回时最后处理过的位置。以后继续处理的时候可以从这个偏移开始
 // return:
 //      -1  出错
 //      0   中断
 //      1   完成
 public static ReplicationResult DoReplication(
     LibraryChannel channel,
     string strStartDate,
     string strEndDate,
     LogType logType,
     CancellationToken token)
 {
     return(BioUtil.DoReplication(channel,
                                  strStartDate,
                                  strEndDate,
                                  logType,
                                  token,
                                  Prompt,
                                  AddItems));
 }
Ejemplo n.º 2
0
        public static int InitFingerprintCache(
            LibraryChannel channel,
            string strDir,
            CancellationToken token,
            out string strError)
        {
            BioEnv env = new BioEnv {
                AddItems     = AddItems,
                SetProgress  = SetProgress,
                ShowMessage  = ShowMessage,
                LoaderPrompt = Loader_Prompt,
            };

            return(BioUtil.InitFingerprintCache(
                       channel,
                       strDir,
                       token,
                       env,
                       out strError));
        }