Пример #1
0
        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;
 }
Пример #3
0
        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);
        }