private ICounter PickCounterFromCommand(string command) { int nameStart = command.IndexOf('\"'); int nameEnd = command.LastIndexOf('\"'); if (nameStart == nameEnd) { return(null); } string name = command.Substring(nameStart + 1, nameEnd - nameStart - 1); return(counterService.Find(name)); }