Skip to content

Commit 7eab8ed

Browse files
committed
Fix build warnings
1 parent 70de9b2 commit 7eab8ed

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
1+
using System.Diagnostics;
2+
using System.Globalization;
3+
using Xunit;
4+
using Xunit.Abstractions;
5+
16
namespace Autofac.Specification.Test.Registration
27
{
3-
using System.Diagnostics;
4-
using Xunit;
5-
using Xunit.Abstractions;
6-
78
public class AssemblyScanningPerformanceTests
89
{
9-
private readonly ITestOutputHelper output;
10+
private readonly ITestOutputHelper _output;
1011

11-
public AssemblyScanningPerformanceTests(ITestOutputHelper output)
12-
{
13-
this.output = output;
14-
}
12+
public AssemblyScanningPerformanceTests(ITestOutputHelper output) => _output = output;
1513

1614
[Fact]
1715
public void MeasurePerformance()
1816
{
1917
var builder = new ContainerBuilder();
2018
for (var i = 0; i < 1000; i++)
2119
{
22-
//just to simulate a lot of "scanning" with few (in this case zero) "hits"
20+
// Just to simulate a lot of "scanning" with few (in this case zero) "hits"
2321
builder.RegisterAssemblyTypes(GetType().Assembly).Where(x => false);
2422
}
2523

2624
var stopwatch = Stopwatch.StartNew();
2725
builder.Build().Dispose();
2826

29-
//after fix drops from ~500ms to ~100ms
30-
output.WriteLine(stopwatch.Elapsed.TotalMilliseconds.ToString());
27+
// After fix drops from ~500ms to ~100ms
28+
_output.WriteLine(stopwatch.Elapsed.TotalMilliseconds.ToString(CultureInfo.InvariantCulture));
3129
}
3230
}
3331
}

test/Autofac.Test/Features/OpenGenerics/ComplexGenericsTests.cs

-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ public void ResolveTypeFromOpenGenericInterfaceTypeParameterIsInterfaceWithConst
341341
var instance = container.Resolve<INested<ISimpleInterface>>();
342342
}
343343

344-
345344
private class CNestedSimpleInterface : INested<ISimpleInterface>
346345
{
347346
}

0 commit comments

Comments
 (0)