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); }
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); }
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)); }
/// <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); }
public PackageManager() { Instance = this; CClass.CheckCreateAdd(this, nameof(PackageManager)); }
internal ResourceManager() { DynamicLibraries = new List <DynamicLibrary>(); CClass.CheckCreateAdd(this, nameof(ResourceManager)); }