public override bool Execute() { bool taskSuccess = true; AnalysisConfig config = TaskUtilities.TryGetConfig(this.AnalysisConfigDir, new MSBuildLoggerAdapter(this.Log)); if (config != null) { string regEx = TryGetRegularExpression(config); try { this.IsTest = !string.IsNullOrEmpty(regEx) && Regex.IsMatch(this.FullFilePath, regEx, RegexOptions.IgnoreCase); } catch (ArgumentException ex) // thrown for invalid regular expressions { taskSuccess = false; this.Log.LogError(Resources.IsTest_InvalidRegularExpression, regEx, ex.Message, TestRegExSettingId); } } return(!this.Log.HasLoggedErrors && taskSuccess); }