Skip to content

Commit 2fea688

Browse files
committed
Apply dotnet format across the solution
The .editorconfig refresh in #33 brought core's rule set, which this repo had never been held to: 213 auto-fixable diagnostics, mostly whitespace plus missing UTF-8 BOMs, import ordering, and file-scoped namespaces. Single-line auto-properties expand to accessor blocks because csharp_preserve_single_line_blocks is false. Core carries the same setting and never trips it, since its auto-properties nearly all have initializers, which dotnet format leaves alone. File-scoped namespaces only reach the net10.0 projects. The .NET Framework and netstandard2.0 examples default to C# 7.3, which predates the syntax, so IDE0161 correctly stays quiet there. Part of #32
1 parent 67a822f commit 2fea688

65 files changed

Lines changed: 332 additions & 171 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎src/AspNetCoreChildLifetimeScope/ApplicationAStartup.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using AspNetCoreChildLifetimeScope.Services;
1+
using AspNetCoreChildLifetimeScope.Services;
22
using Autofac;
33
using Autofac.Extensions.DependencyInjection;
44

‎src/AspNetCoreChildLifetimeScope/ApplicationBStartup.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using AspNetCoreChildLifetimeScope.Services;
1+
using AspNetCoreChildLifetimeScope.Services;
22
using Autofac;
33
using Autofac.Extensions.DependencyInjection;
44

‎src/AspNetCoreChildLifetimeScope/Controllers/ApplicationAController.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using AspNetCoreChildLifetimeScope.Services;
1+
using AspNetCoreChildLifetimeScope.Services;
22
using Autofac;
33
using Microsoft.AspNetCore.Mvc;
44

‎src/AspNetCoreChildLifetimeScope/Controllers/ApplicationBController.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using AspNetCoreChildLifetimeScope.Services;
1+
using AspNetCoreChildLifetimeScope.Services;
22
using Autofac;
33
using Microsoft.AspNetCore.Mvc;
44

‎src/AspNetCoreChildLifetimeScope/Program.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using AspNetCoreChildLifetimeScope.Services;
1+
using AspNetCoreChildLifetimeScope.Services;
22
using Autofac;
33
using Autofac.Extensions.DependencyInjection;
44

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
namespace AspNetCoreChildLifetimeScope.Services
1+
namespace AspNetCoreChildLifetimeScope.Services;
2+
3+
public class ApplicationAScopedDependency
24
{
3-
public class ApplicationAScopedDependency
5+
public override string ToString()
46
{
5-
public override string ToString()
6-
{
7-
return $"{GetType().Name} registered only for ApplicationA";
8-
}
7+
return $"{GetType().Name} registered only for ApplicationA";
98
}
109
}
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
namespace AspNetCoreChildLifetimeScope.Services
1+
namespace AspNetCoreChildLifetimeScope.Services;
2+
3+
public class ApplicationBScopedDependency
24
{
3-
public class ApplicationBScopedDependency
5+
public override string ToString()
46
{
5-
public override string ToString()
6-
{
7-
return $"{GetType().Name} registered only for ApplicationB";
8-
}
7+
return $"{GetType().Name} registered only for ApplicationB";
98
}
109
}
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
namespace AspNetCoreChildLifetimeScope.Services
1+
namespace AspNetCoreChildLifetimeScope.Services;
2+
3+
public class SingletonRootDependency
24
{
3-
public class SingletonRootDependency
5+
public override string ToString()
46
{
5-
public override string ToString()
6-
{
7-
return $"{GetType().Name} registered in the root and available to ApplicationA and ApplicationB";
8-
}
7+
return $"{GetType().Name} registered in the root and available to ApplicationA and ApplicationB";
98
}
109
}
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
namespace AspNetCoreChildLifetimeScope.Services
1+
namespace AspNetCoreChildLifetimeScope.Services;
2+
3+
public class TransientChildScopeDependency
24
{
3-
public class TransientChildScopeDependency
5+
public override string ToString()
46
{
5-
public override string ToString()
6-
{
7-
return $"{GetType().Name} registered in the specific scope for ApplicationA and ApplicationB";
8-
}
7+
return $"{GetType().Name} registered in the specific scope for ApplicationA and ApplicationB";
98
}
109
}

‎src/AspNetCoreExample/AutofacModule.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
using AspNetCoreExample.Services;
12
using Autofac;
2-
using AspNetCoreExample.Services;
33

44
namespace AspNetCoreExample;
55

0 commit comments

Comments
 (0)