string workingDirectory;
string scriptFile;
-#if NET_4_0
Func<string, bool> errorMatcher, warningMatcher;
-#endif
public Exec ()
{
string commandLineCommands)
{
try {
-#if NET_4_0
errorMatcher = GetTryMatchRegexFunc (CustomErrorRegularExpression, true);
warningMatcher = GetTryMatchRegexFunc (CustomWarningRegularExpression, false);
-#endif
return base.ExecuteTool (pathToTool, responseFileCommands, commandLineCommands);
} finally {
if (scriptFile != null)
protected override void LogEventsFromTextOutput (string singleLine, MessageImportance messageImportance)
{
-#if NET_4_0
if (IgnoreStandardErrorWarningFormat ||
(!errorMatcher (singleLine) && !warningMatcher (singleLine)))
-#endif
Log.LogMessage (messageImportance, singleLine);
}
-#if NET_4_0
// @is_error_type - log as errors, else warnings
Func<string, bool> GetTryMatchRegexFunc (string regex_str, bool is_error_type)
{
return true;
};
}
-#endif
[MonoTODO]
protected override bool ValidateParameters ()
get { return base.StandardOutputLoggingImportance; }
}
-#if NET_4_0
public bool IgnoreStandardErrorWarningFormat { get; set; }
public string CustomErrorRegularExpression { get; set; }
public string CustomWarningRegularExpression { get; set; }
-#endif
[MonoTODO]
[Output]