Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 0 additions & 80 deletions src/Microsoft.TemplateEngine.Cli/AppExtensions.cs

This file was deleted.

24 changes: 0 additions & 24 deletions src/Microsoft.TemplateEngine.Cli/CommandParserException.cs

This file was deleted.

35 changes: 22 additions & 13 deletions src/Microsoft.TemplateEngine.Cli/Commands/BaseCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.Reflection;
using Microsoft.TemplateEngine.Abstractions;
using Microsoft.TemplateEngine.Abstractions.Mount;
using Microsoft.TemplateEngine.Cli.TabularOutput;
using Microsoft.TemplateEngine.Edge;
using Microsoft.TemplateEngine.Edge.Settings;
using Microsoft.TemplateEngine.Utils;
Expand Down Expand Up @@ -271,19 +272,27 @@ private static void HandleDebugShowConfig(TArgs args, IEngineEnvironmentSettings
Reporter.Output.WriteLine(LocalizableStrings.CurrentConfiguration);
Reporter.Output.WriteLine(" ");

TableFormatter.Print(environmentSettings.Components.OfType<IMountPointFactory>(), LocalizableStrings.NoItems, " ", '-', new Dictionary<string, Func<IMountPointFactory, object>>
{
{ LocalizableStrings.MountPointFactories, x => x.Id },
{ LocalizableStrings.Type, x => x.GetType().FullName ?? string.Empty },
{ LocalizableStrings.Assembly, x => x.GetType().GetTypeInfo().Assembly.FullName ?? string.Empty }
});

TableFormatter.Print(environmentSettings.Components.OfType<IGenerator>(), LocalizableStrings.NoItems, " ", '-', new Dictionary<string, Func<IGenerator, object>>
{
{ LocalizableStrings.Generators, x => x.Id },
{ LocalizableStrings.Type, x => x.GetType().FullName ?? string.Empty },
{ LocalizableStrings.Assembly, x => x.GetType().GetTypeInfo().Assembly.FullName ?? string.Empty }
});
TabularOutput<IMountPointFactory> mountPointsFormatter =
TabularOutput.TabularOutput
.For(
new TabularOutputSettings(environmentSettings.Environment),
environmentSettings.Components.OfType<IMountPointFactory>())
.DefineColumn(mp => mp.Id.ToString(), LocalizableStrings.MountPointFactories, showAlways: true)
.DefineColumn(mp => mp.GetType().FullName ?? string.Empty, LocalizableStrings.Type, showAlways: true)
.DefineColumn(mp => mp.GetType().GetTypeInfo().Assembly.FullName ?? string.Empty, LocalizableStrings.Assembly, showAlways: true);
Reporter.Output.WriteLine(mountPointsFormatter.Layout());
Reporter.Output.WriteLine();

TabularOutput<IGenerator> generatorsFormatter =
TabularOutput.TabularOutput
.For(
new TabularOutputSettings(environmentSettings.Environment),
environmentSettings.Components.OfType<IGenerator>())
.DefineColumn(g => g.Id.ToString(), LocalizableStrings.Generators, showAlways: true)
.DefineColumn(g => g.GetType().FullName ?? string.Empty, LocalizableStrings.Type, showAlways: true)
.DefineColumn(g => g.GetType().GetTypeInfo().Assembly.FullName ?? string.Empty, LocalizableStrings.Assembly, showAlways: true);
Reporter.Output.WriteLine(generatorsFormatter.Layout());
Reporter.Output.WriteLine();
}
}
}
117 changes: 0 additions & 117 deletions src/Microsoft.TemplateEngine.Cli/Commands/InstallCommand.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

using System.Text;

namespace Microsoft.TemplateEngine.Cli.Commands.Exceptions
namespace Microsoft.TemplateEngine.Cli.Commands
{
internal class InvalidTemplateParametersException : Exception
{
Expand Down
Loading