// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. namespace WixToolset.BuildTasks { using Microsoft.Build.Utilities; public abstract class TaskBase : Task { public string ToolPath { get; set; } public string AdditionalOptions { get; set; } public bool RunAsSeparateProcess { get; set; } /// /// Gets or sets whether all warnings should be suppressed. /// public bool SuppressAllWarnings { get; set; } /// /// Gets or sets a list of specific warnings to be suppressed. /// public string[] SuppressSpecificWarnings { get; set; } /// /// Gets or sets whether all warnings should be treated as errors. /// public bool TreatWarningsAsErrors { get; set; } /// /// Gets or sets a list of specific warnings to treat as errors. /// public string[] TreatSpecificWarningsAsErrors { get; set; } /// /// Gets or sets whether to display verbose output. /// public bool VerboseOutput { get; set; } /// /// Gets or sets whether to display the logo. /// public bool NoLogo { get; set; } public override bool Execute() { try { this.ExecuteCore(); } catch (BuildException e) { this.Log.LogErrorFromException(e); } catch (Data.WixException e) { this.Log.LogErrorFromException(e); } return !this.Log.HasLoggedErrors; } protected abstract void ExecuteCore(); } }