コード例 #1
0
 public static HtmlStaticCore GetInstance(StaticHtmlSection config)
 {
     if (instance == null)
     {
         lock (sync)
         {
             if (instance == null)
             {
                 instance = new HtmlStaticCore(config);
             }
         }
     }
     return(instance);
 }
コード例 #2
0
ファイル: HttpModule.cs プロジェクト: hjlfmy/StaticHtml
 public void Init(HttpApplication context)
 {
     try
     {
         if (htmlSection.Run == "on")
         {
             core = HtmlStaticCore.GetInstance(htmlSection);
             context.BeginRequest += new EventHandler(context_BeginRequest);
             LogHelp.Info("int success! ");
         }
         else
         {
             LogHelp.Warn("run off! 请在staticHtml节点中添加属性run=\"on\" on:启用 off:关闭");
         }
     }
     catch (Exception e)
     {
         LogHelp.Error("ini error! " + e.ToString());
     }
 }
コード例 #3
0
ファイル: HttpModule.cs プロジェクト: fuqi0340/StaticHtml
 public void Init(HttpApplication context)
 {
     try
     {
         if (htmlSection.Run == "on")
         {
             core = HtmlStaticCore.GetInstance(htmlSection);
             context.BeginRequest += new EventHandler(context_BeginRequest);
             LogHelp.Info("int success! ");
         }
         else
         {
             LogHelp.Warn("run off! 请在staticHtml节点中添加属性run=\"on\" on:启用 off:关闭");
         }
     }
     catch (Exception e)
     {
         LogHelp.Error("ini error! " + e.ToString());
     }
 }
コード例 #4
0
ファイル: HtmlStaticCore.cs プロジェクト: hjlfmy/StaticHtml
        public static HtmlStaticCore GetInstance(StaticHtmlSection config)
        {
            if (instance == null)
            {
                lock (sync)
                {
                    if (instance == null)
                    {
                        instance = new HtmlStaticCore(config);
                    }
                }

            }
            return instance;
        }