public static Input find(int id) { Input input; if (!lookupById.TryGetValue(id, out input)) { input = new UnknownInput(InputType.KEY, id); lookupById.Add(id, input); lookupByName.Add(input.getName(), input); } return(input); }
public static Input parse(string inputName) { foreach (var type in values()) { var result = type.getInput(inputName); if (result != null) { return(result); } } return(UnknownInput.tryParse(inputName)); }
public NoneInputType() { noneNone = new UnknownInput(this, 0); }