Example #1
0
 private static IEnumerable <KeyValuePair <String, SystemEventLevel> > GetAliases(LevelElement level, SystemEventLevel mapping)
 {
     return(level.Aliases
            .Split(new[] { ",", ";", " " }, StringSplitOptions.RemoveEmptyEntries)
            .Concat(mapping.ToString())
            .Select(item => item.Trim().ToLowerInvariant())
            .Where(item => !String.IsNullOrWhiteSpace(item))
            .Distinct()
            .Select(item => new KeyValuePair <String, SystemEventLevel>(item, mapping)));
 }
Example #2
0
 private static IEnumerable<KeyValuePair<String, SystemEventLevel>> GetAliases(LevelElement level, SystemEventLevel mapping)
 {
     return level.Aliases
                 .Split(new[] { ",", ";", " " }, StringSplitOptions.RemoveEmptyEntries)
                 .Concat(mapping.ToString())
                 .Select(item => item.Trim().ToLowerInvariant())
                 .Where(item => !String.IsNullOrWhiteSpace(item))
                 .Distinct()
                 .Select(item => new KeyValuePair<String, SystemEventLevel>(item, mapping));
 }