Skip to content
This repository was archived by the owner on Jan 1, 2021. It is now read-only.

Commit 1dec531

Browse files
committed
dotnet format
1 parent 6014f6a commit 1dec531

File tree

14 files changed

+32
-21
lines changed

14 files changed

+32
-21
lines changed

GitVersion.Cli/Extensions/ContainerRegistrarExtensions.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ public static IContainerRegistrar RegisterModule(this IContainerRegistrar contai
1111
gitVersionModule.RegisterTypes(containerRegistrar);
1212
return containerRegistrar;
1313
}
14-
14+
1515
public static IContainerRegistrar RegisterModules(this IContainerRegistrar containerRegistrar,
1616
IEnumerable<IGitVersionModule> gitVersionModules)
1717
{
1818
foreach (var gitVersionModule in gitVersionModules)
1919
{
2020
containerRegistrar.RegisterModule(gitVersionModule);
2121
}
22+
2223
return containerRegistrar;
2324
}
2425
}

GitVersion.Cli/GitVersionApp.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ internal class GitVersionApp
1818
{
1919
private readonly RootCommand rootCommand;
2020

21-
public GitVersionApp(IEnumerable<ICommandHandler> commandHandlers) => rootCommand = MapCommands(commandHandlers);
21+
public GitVersionApp(IEnumerable<ICommandHandler> commandHandlers) =>
22+
rootCommand = MapCommands(commandHandlers);
2223

2324
public Task<int> RunAsync(string[] args)
2425
{
@@ -27,7 +28,7 @@ public Task<int> RunAsync(string[] args)
2728
.Build()
2829
.InvokeAsync(args);
2930
}
30-
31+
3132
private static RootCommand MapCommands(IEnumerable<ICommandHandler> handlers)
3233
{
3334
var commandsMap = new Dictionary<Type, Infrastructure.Command>();

GitVersion.Cli/Infrastructure/ContainerRegistrar.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ private static Serilog.Core.Logger GetLogger(string[] args)
6868
// We cannot use the logFile path when the logger was already created and registered in DI container
6969
// so we perform a pre-parse of the arguments to fetch the logFile so that we can create the logger and
7070
// register in the DI container
71-
var option = new Option(new[] { GitVersionCommand.LogFileOptionAlias1, GitVersionCommand.LogFileOptionAlias2 })
71+
var option = new Option(new[]
72+
{ GitVersionCommand.LogFileOptionAlias1, GitVersionCommand.LogFileOptionAlias2 })
7273
{
7374
Argument = new Argument()
7475
};

GitVersion.Cli/Program.cs

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ internal static class Program
1515
{
1616
private static async Task<int> Main(string[] args)
1717
{
18-
// await Run(args);
19-
// return 0;
2018
// TODO: load the list of assemblies from the app working directory, later we might load from nuget
2119
var assemblies = new[]
2220
{

GitVersion.Common.Command/CommandAttribute.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public CommandAttribute(string name, string description = "") : this(name, null,
1414
Name = name;
1515
Description = description;
1616
}
17-
17+
1818
public CommandAttribute(string name, Type? parent, string? description = "")
1919
{
2020
Name = name;

GitVersion.Common/Infrastructure/IContainerRegistrar.cs

+10-6
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,20 @@ public interface IContainerRegistrar
66
{
77
IContainerRegistrar AddSingleton<TService>() where TService : class;
88

9-
IContainerRegistrar AddSingleton<TService, TImplementation>() where TService : class where TImplementation : class, TService;
10-
11-
IContainerRegistrar AddSingleton<TService>(Func<IServiceProvider, TService> implementationFactory) where TService : class;
9+
IContainerRegistrar AddSingleton<TService, TImplementation>()
10+
where TService : class where TImplementation : class, TService;
11+
12+
IContainerRegistrar AddSingleton<TService>(Func<IServiceProvider, TService> implementationFactory)
13+
where TService : class;
1214

1315
IContainerRegistrar AddTransient<TService>() where TService : class;
1416

15-
IContainerRegistrar AddTransient<TService, TImplementation>() where TService : class where TImplementation : class, TService;
17+
IContainerRegistrar AddTransient<TService, TImplementation>()
18+
where TService : class where TImplementation : class, TService;
19+
20+
IContainerRegistrar AddTransient<TService>(Func<IServiceProvider, TService> implementationFactory)
21+
where TService : class;
1622

17-
IContainerRegistrar AddTransient<TService>(Func<IServiceProvider, TService> implementationFactory) where TService : class;
18-
1923
IContainerRegistrar AddLogging(string[] args);
2024

2125
IContainer Build();

GitVersion.Configuration/ConfigCommandHandler.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public ConfigCommandHandler(ILogger logger, IService service)
1414
this.logger = logger;
1515
this.service = service;
1616
}
17-
17+
1818
public override Task<int> InvokeAsync(ConfigCommand command)
1919
{
2020
var value = service.Call();

GitVersion.Configuration/Init/ConfigInitCommandHandler.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ public ConfigInitCommandHandler(ILogger logger, IService service)
1818
public override Task<int> InvokeAsync(ConfigInitCommand command)
1919
{
2020
var value = service.Call();
21-
logger.LogInformation($"Command : 'config init', LogFile : '{command.LogFile}', WorkDir : '{command.WorkDir}' ");
21+
logger.LogInformation(
22+
$"Command : 'config init', LogFile : '{command.LogFile}', WorkDir : '{command.WorkDir}' ");
2223
return Task.FromResult(value);
2324
}
2425
}

GitVersion.Configuration/Show/ConfigShowCommandHandler.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ public ConfigShowCommandHandler(ILogger logger, IService service)
1818
public override Task<int> InvokeAsync(ConfigShowCommand command)
1919
{
2020
var value = service.Call();
21-
logger.LogInformation($"Command : 'config show', LogFile : '{command.LogFile}', WorkDir : '{command.WorkDir}' ");
21+
logger.LogInformation(
22+
$"Command : 'config show', LogFile : '{command.LogFile}', WorkDir : '{command.WorkDir}' ");
2223
return Task.FromResult(value);
2324
}
2425
}

GitVersion.Normalization/NormalizeCommandHandler.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ public NormalizeCommandHandler(ILogger logger, IService service)
1818
public override Task<int> InvokeAsync(NormalizeCommand command)
1919
{
2020
var value = service.Call();
21-
logger.LogInformation($"Command : 'normalize', LogFile : '{command.LogFile}', WorkDir : '{command.WorkDir}' ");
21+
logger.LogInformation(
22+
$"Command : 'normalize', LogFile : '{command.LogFile}', WorkDir : '{command.WorkDir}' ");
2223
return Task.FromResult(value);
2324
}
2425
}

GitVersion.Output/AssemblyInfo/OutputAssemblyInfoCommandHandler.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ public override Task<int> InvokeAsync(OutputAssemblyInfoCommand command)
1919
{
2020
var value = service.Call();
2121
var versionInfo = command.VersionInfo.Value;
22-
logger.LogInformation($"Command : 'output assemblyinfo', LogFile : '{command.LogFile}', WorkDir : '{command.OutputDir}', InputFile: '{command.InputFile}', AssemblyInfo: '{command.AssemblyinfoFile}' ");
22+
logger.LogInformation(
23+
$"Command : 'output assemblyinfo', LogFile : '{command.LogFile}', WorkDir : '{command.OutputDir}', InputFile: '{command.InputFile}', AssemblyInfo: '{command.AssemblyinfoFile}' ");
2324
logger.LogInformation($"Version info: {versionInfo}");
2425
return Task.FromResult(value);
2526
}

GitVersion.Output/OutputCommand.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public record OutputCommand : GitVersionCommand
1111

1212
[Option("--input-file", "The input version file")]
1313
public FileInfo InputFile { get; init; } = default!;
14-
14+
1515
[Option("--output-dir", "The output directory with the git repository")]
1616
public DirectoryInfo OutputDir { get; init; } = default!;
1717
}

GitVersion.Output/Project/OutputProjectCommandHandler.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ public OutputProjectCommandHandler(ILogger logger, IService service)
1818
public override Task<int> InvokeAsync(OutputProjectCommand command)
1919
{
2020
var value = service.Call();
21-
logger.LogInformation($"Command : 'output project', LogFile : '{command.LogFile}', WorkDir : '{command.OutputDir}', InputFile: '{command.InputFile}', Project: '{command.ProjectFile}' ");
21+
logger.LogInformation(
22+
$"Command : 'output project', LogFile : '{command.LogFile}', WorkDir : '{command.OutputDir}', InputFile: '{command.InputFile}', Project: '{command.ProjectFile}' ");
2223
return Task.FromResult(value);
2324
}
2425
}

GitVersion.Output/Wix/OutputWixCommandHandler.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ public OutputWixCommandHandler(ILogger logger, IService service)
1818
public override Task<int> InvokeAsync(OutputWixCommand command)
1919
{
2020
var value = service.Call();
21-
logger.LogInformation($"Command : 'output wix', LogFile : '{command.LogFile}', WorkDir : '{command.OutputDir}', InputFile: '{command.InputFile}', WixFile: '{command.WixFile}' ");
21+
logger.LogInformation(
22+
$"Command : 'output wix', LogFile : '{command.LogFile}', WorkDir : '{command.OutputDir}', InputFile: '{command.InputFile}', WixFile: '{command.WixFile}' ");
2223
return Task.FromResult(value);
2324
}
2425
}

0 commit comments

Comments
 (0)