Exemple #1
0
        private void AddDocIndex() { 
       
            XK.SearchEngine.AutoFac.OperateModel operateModel = new OperateModel();

            //add
            operateModel.OperateEnum = OperateEnum.Add;
            operateModel.DataBasePath = basepath;
            operateModel.FilePath = "Test";
            operateModel.Dic = new Dictionary<string, string>() {
                {"ID", "9"},
                {"Title", "中秋节快乐9"},
                {"Content", "这是一个节日,中秋节哦9"}
            };
            Enter.Instance.Add(operateModel);

            operateModel = new OperateModel();
            operateModel.DataBasePath = basepath;
            operateModel.FilePath = "Test";
            operateModel.OperateEnum = OperateEnum.Add;
            operateModel.Dic = new Dictionary<string, string>() {
                {"ID", "94"},
                {"Title", "中秋节快乐9"},
                {"Content", "这是一个节日,中秋节哦94"}
            };
            Enter.Instance.Add(operateModel);
        }
Exemple #2
0
 /// <summary>
 /// 外部调用入口
 /// 调用即可,会自动处理
 /// </summary>
 /// <param name="operateModel"></param>
 public void Add(OperateModel operateModel) {
     Add(new List<OperateModel>() {operateModel});
 }