public static HtmlStaticCore GetInstance(StaticHtmlSection config) { if (instance == null) { lock (sync) { if (instance == null) { instance = new HtmlStaticCore(config); } } } return(instance); }
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()); } }
public static HtmlStaticCore GetInstance(StaticHtmlSection config) { if (instance == null) { lock (sync) { if (instance == null) { instance = new HtmlStaticCore(config); } } } return instance; }