Last change
on this file since 438 was 405, checked in by alloc, 21 months ago |
Refactored console commands for A21 caching
|
File size:
654 bytes
|
Rev | Line | |
---|
[391] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using JetBrains.Annotations;
|
---|
| 4 |
|
---|
| 5 | namespace CommandExtensions.Commands {
|
---|
| 6 | [UsedImplicitly]
|
---|
| 7 | public class ConsoleCmdException : ConsoleCmdAbstract {
|
---|
[405] | 8 | protected override string[] getCommands () {
|
---|
[391] | 9 | return new[] { "exception" };
|
---|
| 10 | }
|
---|
| 11 |
|
---|
| 12 | public override bool AllowedInMainMenu => true;
|
---|
| 13 |
|
---|
| 14 | public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
|
---|
| 15 | Log.Out ("Test info");
|
---|
| 16 | Log.Warning ("Test warning");
|
---|
| 17 | Log.Error ("Test error");
|
---|
| 18 | throw new Exception ("Test exception");
|
---|
| 19 | }
|
---|
| 20 |
|
---|
[405] | 21 | protected override string getDescription () {
|
---|
[391] | 22 | return "Throw an exception / log messages";
|
---|
| 23 | }
|
---|
| 24 | }
|
---|
| 25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.