Exemplo n.º 1
0
        //public static string defaultLibrariesPath = ;
        static TM_Xml_Database()
        {
            try
            {
                //GuidanceItems_All = new Dictionary<string, TM_GuidanceItem>();
                Cached_GuidanceItems = new Dictionary<Guid, GuidanceItem_V3> ();
                GuidanceItems_FileMappings = new Dictionary<Guid,string>();
                GuidanceExplorers_XmlFormat = new Dictionary<Guid, guidanceExplorer>();
            //			GuidanceItems_InViews = new Dictionary<Guid, List<GuidanceItem_V3>>();

                TMUsers = new List<TMUser>();
                TMUsersPasswordHashes = new O2.XRules.Database.Utils.Items ();
                ActiveSessions = new Dictionary<Guid, TMUser>();
                "[TM_Xml_Database]: TMConfig.BaseFolder: {0}".info(TMConfig.BaseFolder);
                //Path_XmlDatabase = TMConfig.BaseFolder.pathCombine(@"..\..\Library_Data\XmlDatabase").fullPath();
                Path_XmlDatabase = TMConfig.BaseFolder.pathCombine(@"App_Data\XmlDatabase").fullPath();
                "[TM_Xml_Database] in static ctor: Path to XMLDatabase = {0}".info(Path_XmlDatabase);
                //Path_XmlDatabase = AppDomain.CurrentDomain.BaseDirectory.pathCombine(@"..\..\Library_Data\XmlDatabase").fullPath();
                setLibraryPath(TMConfig.Current.XmlLibrariesPath);

                TM_Xml_Database_Load_and_FileCache_Utils.populateGuidanceItemsFileMappings();	//only do this once
            }
            catch(Exception ex)
            {
                "[TM_Xml_Database] static .ctor: {0} \n\n".error(ex.Message, ex.StackTrace);
            }
        }