Example #1
0
            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);
            }
Example #2
0
        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));
        }
Example #3
0
 public NoneInputType()
 {
     noneNone = new UnknownInput(this, 0);
 }