static AuditManager() { ScanAssembly(Assembly.GetExecutingAssembly()); if (Assembly.GetEntryAssembly() != Assembly.GetExecutingAssembly()) { ScanAssembly(Assembly.GetEntryAssembly()); } FileInfo[] configs = DataDir.GetFiles("config.xml"); if (configs.Length == 1) { config = XmlUtils.LoadXml(configs[0]); } else { config = new XmlDocument(); XmlElement conf = config.CreateElement("config", AUDIT_NS); config.AppendChild(conf); conf.SetAttribute("version", "0"); conf.SetAttribute("id", Guid.NewGuid().ToString()); FlushConfig(); } }