public static bool TryGetCommand(Type type, Operation operation, out string command) { command = null; var key = new CommandKey(type, operation); var cachedCommand = Cache.FirstOrDefault(x => x.CommandKey.Equals(key)); if (cachedCommand == null) { return(false); } command = cachedCommand.Command; return(true); }
public CachedCommand(Type type, Operation operation, string command) { CommandKey = new CommandKey(type, operation); Command = command; }