Ejemplo n.º 1
0
 public static void ValidateSetFlags(
     PatternLevelAnnotationFlags flags,
     string annotation)
 {
     if (string.Equals(annotation, DISCARDPARTIALSONMATCH, StringComparison.InvariantCultureIgnoreCase)) {
         flags.IsDiscardPartialsOnMatch = true;
     }
     else if (string.Equals(
         annotation,
         SUPPRESSOVERLAPPINGMATCHES,
         StringComparison.InvariantCultureIgnoreCase)) {
         flags.IsSuppressSameEventMatches = true;
     }
     else {
         throw new ArgumentException("Unrecognized pattern-level annotation '" + annotation + "'");
     }
 }