コード例 #1
0
 public ConsoleAPI(CCommand cmd)
 {
     MaxParams = 0;
     if (cmd.Params != null && cmd.Params.Length > 0)
     {
         MaxParams = cmd.Params.Length;
     }
     //ConsoleDebug.Commands.Add(cmd);
     Command = cmd;
     CClass.CheckCreateAdd(this, ConsoleDebug.CMDAPI);
 }
コード例 #2
0
        public AppStabilizer()
        {
            CClass.CheckCreateAdd(this, nameof(AppStabilizer));
            LogFramework.WriteNewLog($"Welcome!", CClass, this, null, LogEnums.ResultCode.StartingMethod);
            MeasureSpeed = Stopwatch.StartNew();
            AppDomain.CurrentDomain.ProcessExit        += ProcessExit;
            AppDomain.CurrentDomain.UnhandledException += UnhandledException;
            Start?.Invoke(new EventArgs());

            StartedTimeMs = MeasureSpeed.Elapsed.TotalMilliseconds;
            MeasureSpeed.Stop();
            LogFramework.WriteNewLog($"Started for {StartedTimeMs} ms.", CClass, this, null, LogEnums.ResultCode.OKMethod);
        }
コード例 #3
0
        public ConsoleDebug()
        {
            //Commands = new ExtraArray<CCommand>(Array.Empty<CCommand>());

            CCommand.SNew(CommandActions.Help, "help", "Default", true, "Showing command list or using as command helper", "Command");
            CCommand.SNew(CommandActions.Exit, "exit", "Default", false, "Stopping current process");
            CCommand.SNew(CommandActions.DebugBeep, "beep", "Default", true, "Debug beep, returns value", "State");
            CCommand.SNew(CommandActions.ClearConsole, "clear", "Default", false, "Clears console bufer");

            CCommand.SNew(CommandActions.PackFileInPkg, "pkgpack", "PackageManager", false, "Packing file into package", "File path", "PKG name");
            CCommand.SNew(CommandActions.UnpackFileInPkg, "pkgunpack", "PackageManager", false, "Unpacking file into folder", "Filename", "PKG name", "Folder path");
            CCommand.SNew(CommandActions.CreatePKG, "pkgcreate", "PackageManager", false, "Creating new pkg in pkgmgr", "PKG name");
            CCommand.SNew(CommandActions.ImportPKG, "pkgimport", "PackageManager", false, "Importing pkg from folder", "File path");
            CCommand.SNew(CommandActions.ExportPKG, "pkgexport", "PackageManager", false, "Exporting pkg into folder", "Folder path", "PKG name");
            Instance = this;
            CClass.CheckCreateAdd(this, nameof(ConsoleDebug));
        }
コード例 #4
0
        /// <summary>
        /// Creating new cmd.
        /// </summary>
        /// <param name="action">Action for cmd.</param>
        /// <param name="cline">CommandLine.</param>
        /// <param name="cl">Class</param>
        /// <param name="uwp">Using without params.</param>
        /// <param name="description">Description of cmd.</param>
        /// <param name="sys">Is system.</param>
        /// <param name="parameters">Params of cmd.</param>
        internal CCommand(ConsoleDebug.ActionResult action, string cline, string cl, bool uwp, string description = null, bool sys = true, string[] parameters = null)
        {
            Action           = action;
            CommandLine      = cline;
            System           = sys;
            Params           = parameters;
            Class            = cl;
            UseWithoutParams = uwp;

            if (description == null)
            {
                Description = "Unknown command description!";
            }
            else
            {
                Description = description;
            }
            CClass.CheckCreateAdd(this, ConsoleDebug.CMD);
        }
コード例 #5
0
 public PackageManager()
 {
     Instance = this;
     CClass.CheckCreateAdd(this, nameof(PackageManager));
 }
コード例 #6
0
 internal ResourceManager()
 {
     DynamicLibraries = new List <DynamicLibrary>();
     CClass.CheckCreateAdd(this, nameof(ResourceManager));
 }