#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.235
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace NuGet.CommandLine
{
    using System;
    using System.Collections.Generic;

#line 2 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"
    using System.Globalization;

#line default
#line hidden


#line 3 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"


#line default
#line hidden

    [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.1.0.0")]
    internal partial class HelpCommandMarkdownTemplate : HelpCommandMarkdownTemplateBase
    {
#line hidden

#line 4 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"

        public NuGet.CommandAttribute CommandAttribute { get; set; }

        public IEnumerable<dynamic> Options { get; set; }

        private TextInfo TextInfo
        {
            get { return CultureInfo.CurrentCulture.TextInfo; }
        }

#line default
#line hidden

        public override void Execute()
        {


            WriteLiteral("\r\n");




            WriteLiteral("\r\n\r\n##  ");



#line 14 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"
            Write(TextInfo.ToTitleCase(CommandAttribute.CommandName));


#line default
#line hidden
            WriteLiteral(" Command\r\n\r\n");



#line 16 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"
            Write(CommandAttribute.Description);


#line default
#line hidden
            WriteLiteral("\r\n\r\n### Usage\r\n    nuget ");



#line 19 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"
            Write(TextInfo.ToLower(CommandAttribute.CommandName));


#line default
#line hidden
            WriteLiteral(" ");



#line 19 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"
            Write(CommandAttribute.UsageSummary);


#line default
#line hidden
            WriteLiteral("\r\n");



#line 20 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"
            if (!String.IsNullOrEmpty(CommandAttribute.UsageDescription))
            {


#line default
#line hidden
                WriteLiteral("\r\n");



#line 22 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"


#line default
#line hidden

#line 22 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"
                Write(CommandAttribute.UsageDescription ?? "");


#line default
#line hidden

#line 22 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"

            }


#line default
#line hidden
            WriteLiteral("\r\n### Options\r\n<table>\r\n");



#line 27 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"
            foreach (var option in Options)
            {


#line default
#line hidden
                WriteLiteral("    <tr>\r\n        <td>");



#line 29 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"
                Write(option.Name);


#line default
#line hidden
                WriteLiteral("</td>\r\n        <td>");



#line 30 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"
                Write(option.Description);


#line default
#line hidden
                WriteLiteral("</td>\r\n    </tr>\r\n");



#line 32 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"
            }


#line default
#line hidden
            WriteLiteral("</table>\r\n");



#line 34 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"
            if (!String.IsNullOrEmpty(CommandAttribute.UsageExample))
            {


#line default
#line hidden
                WriteLiteral("\r\n### Examples\r\n\r\n    ");



#line 38 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"
                Write(CommandAttribute.UsageExample.Replace(Environment.NewLine, Environment.NewLine + "    "));


#line default
#line hidden
                WriteLiteral("\r\n");

                WriteLiteral("\r\n");



#line 40 "D:\forks\nuget\src\CommandLine\Commands\HelpCommandMarkdownTemplate.cshtml"
            }

#line default
#line hidden

        }
        public string TransformText()
        {
            this.Execute();
            return this.GenerationEnvironment.ToString();
        }
    }
    #region Base class
    public class HelpCommandMarkdownTemplateBase
    {
        private System.Text.StringBuilder _generatingEnvironment = new System.Text.StringBuilder();
        protected System.Text.StringBuilder GenerationEnvironment
        {
            get
            {
                return this._generatingEnvironment;
            }
            set
            {
                this._generatingEnvironment = value;
            }
        }
        public virtual void Execute()
        {
        }
        public void WriteLiteral(string textToAppend)
        {

            if (String.IsNullOrEmpty(textToAppend))
            {
                return;
            }
            this.GenerationEnvironment.Append(textToAppend);
        }
        public void Write(object value)
        {

            string stringValue;
            if ((value == null))
            {
                throw new global::System.ArgumentNullException("value");
            }
            System.Type t = value.GetType();
            System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
                            typeof(System.IFormatProvider)});
            if ((method == null))
            {
                stringValue = value.ToString();
            }
            else
            {
                stringValue = ((string)(method.Invoke(value, new object[] { System.Globalization.CultureInfo.InvariantCulture })));
            }
            WriteLiteral(stringValue);

        }
    }
    #endregion
}
#pragma warning restore 1591
