Skip to content

Commit aab3b23

Browse files
committed
make format
1 parent 7b6a902 commit aab3b23

File tree

7 files changed

+24
-33
lines changed

7 files changed

+24
-33
lines changed

FluentDocker/Testing/Core/ComposeResource.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ public ComposeResource(
2727
FluentDockerKernel kernel,
2828
Action<IComposeBuilder> configure,
2929
DockerResourceOptions options = null)
30-
: base(kernel, options)
31-
{
32-
_configure = configure ?? throw new ArgumentNullException(nameof(configure));
33-
}
30+
: base(kernel, options) => _configure = configure ?? throw new ArgumentNullException(nameof(configure));
3431

3532
/// <summary>
3633
/// The running compose service, available after initialization.
@@ -88,7 +85,8 @@ protected override async Task TeardownAsync()
8885
{
8986
var s = Service;
9087
Service = null;
91-
if (s == null) return;
88+
if (s == null)
89+
return;
9290

9391
await s.StopAsync();
9492
await s.RemoveAsync(force: false);
@@ -99,9 +97,11 @@ protected override async Task ForceRemoveAsync()
9997
{
10098
var s = Service;
10199
Service = null;
102-
if (s == null) return;
100+
if (s == null)
101+
return;
103102

104-
try { await s.RemoveAsync(force: true); }
103+
try
104+
{ await s.RemoveAsync(force: true); }
105105
catch { /* best effort */ }
106106
}
107107

FluentDocker/Testing/Core/ContainerResource.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ public ContainerResource(
2626
FluentDockerKernel kernel,
2727
Action<IContainerBuilder> configure,
2828
DockerResourceOptions options = null)
29-
: base(kernel, options)
30-
{
31-
_configure = configure ?? throw new ArgumentNullException(nameof(configure));
32-
}
29+
: base(kernel, options) => _configure = configure ?? throw new ArgumentNullException(nameof(configure));
3330

3431
/// <summary>
3532
/// The running container service, available after initialization.
@@ -95,7 +92,8 @@ protected override async Task TeardownAsync()
9592
{
9693
var c = Container;
9794
Container = null;
98-
if (c == null) return;
95+
if (c == null)
96+
return;
9997

10098
await c.StopAsync();
10199
await c.RemoveAsync(force: false);
@@ -106,9 +104,11 @@ protected override async Task ForceRemoveAsync()
106104
{
107105
var c = Container;
108106
Container = null;
109-
if (c == null) return;
107+
if (c == null)
108+
return;
110109

111-
try { await c.RemoveAsync(force: true); }
110+
try
111+
{ await c.RemoveAsync(force: true); }
112112
catch { /* best effort */ }
113113
}
114114

FluentDocker/Testing/Core/Plugins/TestPluginHost.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,13 @@ public class TestPluginHost : ITestPluginHost, ITestPluginRegistry
1818
/// </summary>
1919
/// <param name="serviceProvider">Service provider for factory dependency resolution.
2020
/// If null, a minimal provider that returns null for all types is used.</param>
21-
public TestPluginHost(IServiceProvider serviceProvider = null)
22-
{
23-
_serviceProvider = serviceProvider ?? NullServiceProvider.Instance;
24-
}
21+
public TestPluginHost(IServiceProvider serviceProvider = null) => _serviceProvider = serviceProvider ?? NullServiceProvider.Instance;
2522

2623
/// <inheritdoc />
2724
public ITestPluginHost Add(ITestPlugin plugin)
2825
{
29-
if (plugin == null) throw new ArgumentNullException(nameof(plugin));
26+
if (plugin == null)
27+
throw new ArgumentNullException(nameof(plugin));
3028

3129
if (_registeredPlugins.Contains(plugin.Id))
3230
return this; // Already registered, idempotent

FluentDocker/Testing/Core/PodmanKubernetesResource.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ public PodmanKubernetesResource(
2828
FluentDockerKernel kernel,
2929
KubePlayConfig config,
3030
DockerResourceOptions options = null)
31-
: base(kernel, options)
32-
{
33-
_config = config ?? throw new ArgumentNullException(nameof(config));
34-
}
31+
: base(kernel, options) => _config = config ?? throw new ArgumentNullException(nameof(config));
3532

3633
/// <summary>
3734
/// Path to the Kubernetes YAML file.

FluentDocker/Testing/Core/ResourceBase.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ public async ValueTask DisposeAsync()
143143
{
144144
if (Options.ForceRemoveOnDispose)
145145
{
146-
try { await ForceRemoveAsync(); }
146+
try
147+
{ await ForceRemoveAsync(); }
147148
catch { /* best effort */ }
148149
}
149150
}

FluentDocker/Testing/Core/SwarmStackResource.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ public SwarmStackResource(
2727
FluentDockerKernel kernel,
2828
StackDeployConfig config,
2929
DockerResourceOptions options = null)
30-
: base(kernel, options)
31-
{
32-
_config = config ?? throw new ArgumentNullException(nameof(config));
33-
}
30+
: base(kernel, options) => _config = config ?? throw new ArgumentNullException(nameof(config));
3431

3532
/// <summary>
3633
/// The stack name used for deployment.

FluentDocker/Testing/Core/TopologyResource.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ public TopologyResource(
2929
FluentDockerKernel kernel,
3030
Action<Builder> configure,
3131
DockerResourceOptions options = null)
32-
: base(kernel, options)
33-
{
34-
_configure = configure ?? throw new ArgumentNullException(nameof(configure));
35-
}
32+
: base(kernel, options) => _configure = configure ?? throw new ArgumentNullException(nameof(configure));
3633

3734
/// <summary>
3835
/// All services created by the topology, in build order.
@@ -112,7 +109,8 @@ protected override async Task ForceRemoveAsync()
112109
{
113110
for (var i = _services.Count - 1; i >= 0; i--)
114111
{
115-
try { await _services[i].RemoveAsync(force: true); }
112+
try
113+
{ await _services[i].RemoveAsync(force: true); }
116114
catch { /* best effort */ }
117115
}
118116

0 commit comments

Comments
 (0)