Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public void Setup()
{
typeof(object).GetTypeInfo().Assembly.Location,
typeof(Enumerable).GetTypeInfo().Assembly.Location,
typeof(System.CommandLine.Invocation.InvocationContext).GetTypeInfo().Assembly.Location
typeof(System.CommandLine.Invocation.InvocationContext)
.GetTypeInfo()
.Assembly.Location
}
);
_testAssembly = Assembly.Load(File.ReadAllBytes(_testAssemblyFilePath));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public Perf_XmlDocReader()
{
typeof(object).GetTypeInfo().Assembly.Location,
typeof(Enumerable).GetTypeInfo().Assembly.Location,
typeof(System.CommandLine.Invocation.InvocationContext).GetTypeInfo().Assembly.Location
typeof(System.CommandLine.Invocation.InvocationContext)
.GetTypeInfo()
.Assembly.Location
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ public static void Handle(IConsole console, ShellType shellType)

private static void PrintToConsoleFrom(IConsole console, string scriptName)
{
var assemblyLocation =
Assembly.GetAssembly(typeof(SuggestionShellScriptHandler)).Location;
var assemblyLocation = Assembly
.GetAssembly(typeof(SuggestionShellScriptHandler))
.Location;
var directory = Path.GetDirectoryName(assemblyLocation);
console.Out.Write(File.ReadAllText(Path.Combine(directory, scriptName)));
}
Expand Down
7 changes: 3 additions & 4 deletions src/System.CommandLine.Tests/Help/HelpBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -833,10 +833,9 @@ public void Null_argument_on_customize_throws()
[Fact]
public void Options_section_is_not_included_if_no_options_configured()
{
var commandLineBuilder =
new CommandLineBuilder().AddCommand(
new Command("outer", "description for outer")
).Command;
var commandLineBuilder = new CommandLineBuilder()
.AddCommand(new Command("outer", "description for outer"))
.Command;

_helpBuilder.Write(commandLineBuilder);

Expand Down
9 changes: 5 additions & 4 deletions src/System.CommandLine.Tests/VersionOptionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ namespace System.CommandLine.Tests
{
public class VersionOptionTests
{
private static readonly string version =
(
Assembly.GetEntryAssembly() ?? Assembly.GetExecutingAssembly()
).GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
private static readonly string version = (
Assembly.GetEntryAssembly() ?? Assembly.GetExecutingAssembly()
)
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()
.InformationalVersion;

[Fact]
public async Task When_the_version_option_is_specified_then_the_version_is_written_to_standard_out()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ await feature.EnsureRegistered(

try
{
var currentProcessFullPath =
Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
var currentProcessFullPath = Diagnostics.Process
.GetCurrentProcess()
.MainModule.FileName;
var currentProcessFileNameWithoutExtension =
Path.GetFileNameWithoutExtension(currentProcessFullPath);

Expand Down
5 changes: 3 additions & 2 deletions src/System.CommandLine/Invocation/FeatureRegistration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ namespace System.CommandLine.Invocation
{
internal class FeatureRegistration
{
private static readonly string _assemblyName =
(Assembly.GetEntryAssembly() ?? Assembly.GetExecutingAssembly()).FullName;
private static readonly string _assemblyName = (
Assembly.GetEntryAssembly() ?? Assembly.GetExecutingAssembly()
).FullName;
private readonly FileInfo _sentinelFile;

public FeatureRegistration(string featureName)
Expand Down