Ejemplo n.º 1
0
        public override Task <int> ExecuteAsync(CancellationToken cancellationToken)
        {
            if (this.ShowHelp)
            {
                DisplayHelp();
                return(Task.FromResult(-1));
            }

            var converter = new WixConverter(this.Messaging, this.IndentationAmount, this.ErrorsAsWarnings, this.IgnoreErrors);

            this.ParseSettings(SettingsFileDefault);

            var errors = base.Inspect(Inspector, cancellationToken);

            return(Task.FromResult(errors));

            int Inspector(string file, bool fix)
            {
                return(converter.FormatFile(file, fix));
            }
        }