Changeset 325 for binary-improvements/AllocsCommands/Commands/ListItems.cs
- Timestamp:
- Sep 4, 2018, 1:00:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/AllocsCommands/Commands/ListItems.cs
r306 r325 2 2 using System.Collections.Generic; 3 3 4 namespace AllocsFixes.CustomCommands 5 { 6 public class ListItems : ConsoleCmdAbstract 7 { 8 public override string GetDescription () 9 { 4 namespace AllocsFixes.CustomCommands { 5 public class ListItems : ConsoleCmdAbstract { 6 public override string GetDescription () { 10 7 return "lists all items that contain the given substring"; 11 8 } 12 9 13 public override string[] GetCommands () 14 { 15 return new string[] { "listitems", "li" }; 10 public override string[] GetCommands () { 11 return new[] {"listitems", "li"}; 16 12 } 17 13 18 14 public override string GetHelp () { 19 15 return "List all available item names\n" + 20 21 22 23 24 16 "Usage:\n" + 17 " 1. listitems <searchString>\n" + 18 " 2. listitems *\n" + 19 "1. List only names that contain the given string.\n" + 20 "2. List all names."; 25 21 } 26 22 27 public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) 28 { 23 public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) { 29 24 try { 30 25 if (_params.Count != 1 || _params [0].Length == 0) { … … 34 29 35 30 int count = ItemClass.ItemNames.Count; 36 bool showAll = _params [0].Trim().Equals("*");31 bool showAll = _params [0].Trim ().Equals ("*"); 37 32 38 33 int listed = 0;
Note:
See TracChangeset
for help on using the changeset viewer.