zoukankan      html  css  js  c++  java
  • 代码着色功能小改进

    改进后的效果如下:
    using System;
    using Dottext.Framework.Logger;

    namespace Dottext.Search
    {
        
    /// <summary>
        
    /// IndexQueue 的摘要说明。
        
    /// </summary>

        public class IndexQueue
        
    {
            
    public IndexQueue()
            
    {
                
            }


            
    public void Run(object state)
            
    {
                
    string path = SearchConfiguration.Instance().PhysicalPath;
                
    string tempIndex = System.IO.Path.Combine(path,SearchConfiguration.TempIndex);
                
    if(System.IO.File.Exists(tempIndex+"\segments"))
                
    {
                    LogManager.Log(
    "IndexQueue Abort","Another RebuildSafeIndex is Runing");
                    
    return;
                }

                Log log 
    = new Log();
                log.Title 
    = "Search Index";
                log.Message 
    = string.Format("Manual Build");
                IndexManager.RebuildSafeIndex();
                log.EndDate 
    = DateTime.Now;
                LogManager.Create(log);
                
            }

        }

    }

  • 相关阅读:
    Vijos1986
    vijos1790
    洛谷1005
    洛谷3381
    bzoj4034
    bzoj1564
    bzoj2648
    洛谷3348
    jzoi4964
    codevs3990
  • 原文地址:https://www.cnblogs.com/dudu/p/20325.html
Copyright © 2011-2022 走看看