More debug added to DebugHandler; config now initializes only once

main
Inga 🏳‍🌈 14 years ago
parent 444f8ff97a
commit 024f4c5c4e
  1. 3
      Common/Config.cs
  2. 6
      Core/Config.cs
  3. 2
      IISMainHandler/MainHandler.cs
  4. 1
      IISMainHandler/handlers/DebugHandler.cs

@ -8,7 +8,10 @@ namespace FLocal.Common {
public class Config : FLocal.Core.Config<Config> {
public readonly string InitTime;
protected Config(NameValueCollection data) : base(data) {
this.InitTime = DateTime.Now.ToLongTimeString();
}
public static void Init(NameValueCollection data) {

@ -43,5 +43,11 @@ namespace FLocal.Core {
}
}
public static bool isInitialized {
get {
return _instance != null;
}
}
}
}

@ -13,7 +13,7 @@ namespace FLocal.IISHandler {
}
public void ProcessRequest(HttpContext httpcontext) {
FLocal.Common.Config.ReInit(ConfigurationManager.AppSettings);
if(!FLocal.Common.Config.isInitialized) FLocal.Common.Config.Init(ConfigurationManager.AppSettings);
WebContext context = new WebContext(httpcontext);
ISpecificHandler handler = HandlersFactory.getHandler(context);

@ -19,6 +19,7 @@ namespace FLocal.IISHandler.handlers {
context.httpresponse.WriteLine("Path: " + context.httprequest.Path);
context.httpresponse.WriteLine("PathInfo: " + context.httprequest.PathInfo);
context.httpresponse.WriteLine("AppInfo: " + context.config.AppInfo);
context.httpresponse.WriteLine("InitTime: " + context.config.InitTime);
}
}

Loading…
Cancel
Save