public override bool IsMatch(string collection, Configuration.EventRuleCollection eventRules)
 {
     foreach (var rule in eventRules)
     {
         if (BuildStatus.HasFlag(BuildStatus.Succeeded) && rule.Events.HasFlag(TfsEvents.BuildSucceeded) ||
             BuildStatus.HasFlag(BuildStatus.Failed) && rule.Events.HasFlag(TfsEvents.BuildFailed))
         {
             if (collection.IsMatchOrNoPattern(rule.TeamProjectCollection) &&
                 ProjectName.IsMatchOrNoPattern(rule.TeamProject) &&
                 BuildDefinition.IsMatchOrNoPattern(rule.BuildDefinition))
             {
                 return(rule.Notify);
             }
         }
     }
     return(false);
 }