Beispiel #1
0
 public EntryTypeDef(string name, IEnumerable<string> classes, EntryTypeDefFilter filter)
 {
     Name = name;
     _classes = new HashSet<string>();
     foreach (var c in classes) _classes.Add(c);
     Filter = filter;
 }
Beispiel #2
0
 public bool Test(RantDictionaryEntry entry)
 {
     if (!EntryTypeDefFilter.Test(Filter, entry))
     {
         return(true);
     }
     return(entry.GetClasses().Where(IsValidValue).Count() == 1);
 }
Beispiel #3
0
 public EntryTypeDef(string name, IEnumerable <string> classes, EntryTypeDefFilter filter)
 {
     Name     = name;
     _classes = new HashSet <string>();
     foreach (var c in classes)
     {
         _classes.Add(c);
     }
     Filter = filter;
 }
Beispiel #4
0
 /// <summary>
 /// Determines whether a type should apply to the specifed entry according to the specified filter.
 /// </summary>
 /// <param name="filter">The filter to test with.</param>
 /// <param name="entry">The entry to test.</param>
 /// <returns></returns>
 public static bool Test(EntryTypeDefFilter filter, RantDictionaryEntry entry) => filter?.DoTest(entry) ?? false;
Beispiel #5
0
 /// <summary>
 /// Determines whether a type should apply to the specifed entry according to the specified filter.
 /// </summary>
 /// <param name="filter">The filter to test with.</param>
 /// <param name="entry">The entry to test.</param>
 /// <returns></returns>
 public static bool Test(EntryTypeDefFilter filter, RantDictionaryEntry entry) => filter?.DoTest(entry) ?? false;