public static Crime FromName(string from) { Crime result = CRIMES.FirstOrDefault(v => v.name == from); if (result == null) { Logging.Report("Unknown Crime name " + from); } return(result); }
public static Crime FromEDName(string from) { string tidiedFrom = from == null ? null : from.ToLowerInvariant(); Crime result = CRIMES.FirstOrDefault(v => v.edname.ToLowerInvariant() == tidiedFrom); if (result == null) { Logging.Report("Unknown Crime ED name " + from); result = new Crime(from, tidiedFrom); } return result; }
public static Crime FromEDName(string from) { string tidiedFrom = from == null ? null : from.ToLowerInvariant(); Crime result = CRIMES.FirstOrDefault(v => v.edname.ToLowerInvariant() == tidiedFrom); if (result == null) { Logging.Report("Unknown Crime ED name " + from); result = new Crime(from, tidiedFrom); } return(result); }