Skip to content

Commit 0559d02

Browse files
committed
Use expression bodies
1 parent 8e90f23 commit 0559d02

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

CompositionRoot/CompositionRootBuilder.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ public CompositionRootBuilder RegisterModule(IModule module)
2121
}
2222

2323
public IContainer Build()
24-
{
25-
return _builder.Build();
26-
}
24+
=> _builder.Build();
2725
}
2826
}

CompositionRoot/ModuleBuilder.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@ public sealed class ModuleBuilder
99
private readonly ImmutableList<Register> _registrations;
1010

1111
public ModuleBuilder()
12-
{
13-
_registrations = ImmutableList<Register>.Empty;
14-
}
12+
=> _registrations = ImmutableList<Register>.Empty;
1513

1614
private ModuleBuilder(ImmutableList<Register> registrations)
17-
{
18-
_registrations = registrations;
15+
=> _registrations = registrations;
1916
}
2017

2118
public ModuleBuilder RegisterInstance<T>(T instance)

CompositionRoot/ModuleRegistrar.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ internal sealed class ModuleRegistrar : Module
1010
private readonly ImmutableList<Register> _registrations;
1111

1212
public ModuleRegistrar(ImmutableList<Register> mockRegistrations)
13-
{
14-
_registrations = mockRegistrations;
15-
}
13+
=> _registrations = mockRegistrations;
1614

1715
protected override void Load(ContainerBuilder builder)
1816
=> _registrations.ForEach(registration => registration(builder));

0 commit comments

Comments
 (0)