Skip to content

Commit 858373f

Browse files
authored
Added editorconfig file (#807)
1 parent 2b25c06 commit 858373f

File tree

19 files changed

+49
-45
lines changed

19 files changed

+49
-45
lines changed

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
; Top-most EditorConfig file
2+
root = true
3+
4+
; Unix-style newlines
5+
[*]
6+
end_of_line = crlf
7+
8+
; 4-column space indentation
9+
[*.cs]
10+
indent_style = space
11+
indent_size = 4
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true
14+
15+
# .NET formatting rules
16+
[*.{cs,vb}]
17+
dotnet_sort_system_directives_first = true

examples/NetCore2/HostingExample/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using Microsoft.Extensions.DependencyInjection;
55
using Microsoft.Extensions.Hosting;
66
using Microsoft.Extensions.Logging;
7-
using NLog;
87
using NLog.Extensions.Hosting;
98

109
namespace HostingExample

src/NLog.Extensions.Hosting/LayoutRenderers/HostAppNameLayoutRenderer.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
using System.Text;
1+
using System.Text;
32
using Microsoft.Extensions.Hosting;
43
using NLog.Config;
54
using NLog.LayoutRenderers;

src/NLog.Extensions.Logging/Config/NLogLoggingConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public LoggingConfigurationElement(IConfigurationSection configurationSection, s
205205
}
206206
}
207207
}
208-
208+
209209
private static bool IgnoreTopElementChildNullValue(string configKey, object? configValue)
210210
{
211211
if (configValue is null)

src/NLog.Extensions.Logging/Config/SetupExtensionsBuilderExtensions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
using System.Reflection;
1+
using System.Reflection;
32
using Microsoft.Extensions.Configuration;
43
using NLog.Config;
54

src/NLog.Extensions.Logging/Layouts/MicrosoftConsoleJsonLayout.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public string? TimestampFormat
8989
{
9090
Attributes.RemoveAt(index);
9191
}
92-
92+
9393
if (value != null && !string.IsNullOrEmpty(value))
9494
{
9595
var dateLayoutRenderer = _timestampLayout.LayoutRenderers.OfType<DateLayoutRenderer>().First();

src/NLog.Extensions.Logging/Logging/NLogBeginScopeParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ private static bool TryLookupExtractor<TState>(ExtractorDictionary stateExtracto
268268
return keyValueExtractor != null;
269269
}
270270

271-
private static bool TryBuildExtractor(Type propertyType, out Func<object , KeyValuePair<string, object?>>? keyValueExtractor)
271+
private static bool TryBuildExtractor(Type propertyType, out Func<object, KeyValuePair<string, object?>>? keyValueExtractor)
272272
{
273273
keyValueExtractor = null;
274274

src/NLog.Extensions.Logging/Logging/NLogLoggerFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class NLogLoggerFactory : ILoggerFactory
1818
/// New factory with default options
1919
/// </summary>
2020
public NLogLoggerFactory()
21-
:this(NLogProviderOptions.Default)
21+
: this(NLogProviderOptions.Default)
2222
{
2323
}
2424

@@ -27,7 +27,7 @@ public NLogLoggerFactory()
2727
/// </summary>
2828
/// <param name="options"></param>
2929
public NLogLoggerFactory(NLogProviderOptions options)
30-
:this(options, LogManager.LogFactory)
30+
: this(options, LogManager.LogFactory)
3131
{
3232
}
3333

test/NLog.Extensions.Hosting.Tests/ExtensionMethodTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void AddNLog_withShutdownOnDispose_worksWithNLog()
8585
[Fact]
8686
public void UseNLog_withAddNLog_worksWithNLog()
8787
{
88-
var actual = new HostBuilder().UseNLog().ConfigureServices((h,s) => s.AddLogging(l => l.AddNLog())).Build();
88+
var actual = new HostBuilder().UseNLog().ConfigureServices((h, s) => s.AddLogging(l => l.AddNLog())).Build();
8989
TestHostingResult(actual, true);
9090
}
9191

test/NLog.Extensions.Hosting.Tests/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System.Reflection;
21
using System.Runtime.InteropServices;
32

43
[assembly: ComVisible(false)]

0 commit comments

Comments
 (0)