Exemple #1
0
        /// <summary>
        /// TODO: ?
        /// </summary>
        internal static void RebuildRelic()
        {
            Thread gothread = new Thread((ThreadStart) delegate {
                IBMiUtilities.DebugLog("RebuildRelic!");
                string tmpFile = Path.GetTempFileName();
                IBMi.AddOutput("Starting build of '" + IBMi.GetConfig("relicdir") + "' into " + IBMi.GetConfig("reliclib"));
                if (Main.CommandWindow != null)
                {
                    Main.CommandWindow.loadNewCommands();
                }
                IBMi.RunCommands(IBMiCommandRender.RenderRelicRebuildScript(tmpFile));
                IBMi.AddOutput("");
                foreach (string line in File.ReadAllLines(tmpFile))
                {
                    IBMi.AddOutput($"> { line }");
                }
                IBMi.AddOutput("");
                IBMi.AddOutput("End of build.");
                File.Delete(tmpFile);
                if (Main.CommandWindow != null)
                {
                    Main.CommandWindow.loadNewCommands();
                }
                IBMiUtilities.DebugLog("RebuildRelic - DONE!");
            });

            gothread.Start();
        }
Exemple #2
0
        /// <summary>
        /// TODO: Parse all data structures in code and retrieve definitions for them
        ///       follow include files recursivly...
        /// </summary>
        /// <param name="f"></param>
        internal static void LoadLikeDS(string f)
        {
            if (dataStructures == null)
            {
                dataStructures = new List <DataStructure>();
            }

            foreach (string line in File.ReadAllLines(f))
            {
                IBMi.AddOutput("> " + line);
            }
        }