﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ConsoleAbstraction.cs" company="Naos Project">
//    Copyright (c) Naos Project 2019. All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace [PROJECT_NAME]
{
    using System.Diagnostics;
    using System.Diagnostics.CodeAnalysis;

    using CLAP;

    using Naos.Bootstrapper;

    /// <inheritdoc />
    public class ConsoleAbstraction : ConsoleAbstractionBase
    {
        /// <summary>
        /// Does some work.
        /// </summary>
        /// <param name="debug">Optional value indicating whether to launch the debugger from inside the application (default is false).</param>
        /// <param name="requiredParameter">A required parameter to the operation.</param>
        [Verb(Aliases = "do", IsDefault = false, Description = "Does some work.")]
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = ObcSuppressBecause.CA1811_AvoidUncalledPrivateCode_MethodIsWiredIntoClapAsVerb)]
        public static void DoSomeWork(
            [Aliases("")] [Description("Launches the debugger.")] [DefaultValue(false)] bool debug,
            [Aliases("")] [Required] [Description("A required parameter to the operation.")] string requiredParameter)
        {
            if (debug)
            {
                Debugger.Launch();
            }

            System.Console.WriteLine(requiredParameter);
        }
    }
}
﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ConsoleAbstraction.cs" company="Naos Project">
//    Copyright (c) Naos Project 2019. All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace [PROJECT_NAME]
{
    using System.Diagnostics;
    using System.Diagnostics.CodeAnalysis;

    using CLAP;

    using Naos.Bootstrapper;
    using Naos.Build.Analyzers;

    /// <inheritdoc />
    public class ConsoleAbstraction : ConsoleAbstractionBase
    {
        /// <summary>
        /// Does some work.
        /// </summary>
        /// <param name="debug">Optional value indicating whether to launch the debugger from inside the application (default is false).</param>
        /// <param name="requiredParameter">A required parameter to the operation.</param>
        [Verb(Aliases = "do", IsDefault = false, Description = "Does some work.")]
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = NaosSuppressBecause.CA1811_AvoidUncalledPrivateCode_MethodIsWiredIntoClapAsVerb)]
        public static void DoSomeWork(
            [Aliases("")] [Description("Launches the debugger.")] [DefaultValue(false)] bool debug,
            [Aliases("")] [Required] [Description("A required parameter to the operation.")] string requiredParameter)
        {
            if (debug)
            {
                Debugger.Launch();
            }

            System.Console.WriteLine(requiredParameter);
        }
    }
}
Tweak in Console VS Project Template.
Tweak in Console VS Project Template.
