INNER CODE UNIT · C#

attribute

Blecki/dwarfcorp · DwarfCorp/Debugger.cs:90

                    var attribute = hook.GetCustomAttributes(false).FirstOrDefault(a => a is ConsoleCommandHandlerAttribute) as ConsoleCommandHandlerAttribute;
                    if (attribute == null) continue;
                    CommandHandlers[attribute.Name.ToUpperInvariant()] = (s) => lambdaCopy.Invoke(null, new Object[] { s }) as String;
                }
            }

            var commandWord = "";
            var commandArgs = "";
            var space = Command.IndexOf(' ');
            if (space == -1)
                commandWord = Command;
            else
            {
                commandWord = Command.Substring(0, space);
                commandArgs = Command.Substring(space + 1);
            }

            if (CommandHandlers.ContainsKey(commandWord.ToUpperInvariant()))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…