Skip to content

Commit 29ccc15

Browse files
committed
remove some usings
1 parent b800dcd commit 29ccc15

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

src/Serilog.Expressions/Expressions/Compilation/Linq/Intrinsics.cs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
using System.Text.RegularExpressions;
2121
using Serilog.Events;
2222
using Serilog.Expressions.Runtime;
23-
using Serilog.Formatting.Display;
2423
using Serilog.Parsing;
2524
using Serilog.Templates.Compilation;
2625

@@ -32,7 +31,7 @@ static class Intrinsics
3231
{
3332
static readonly LogEventPropertyValue NegativeOne = new ScalarValue(-1);
3433
static readonly LogEventPropertyValue Tombstone = new ScalarValue("😬 (if you see this you have found a bug.)");
35-
34+
3635
public static List<LogEventPropertyValue?> CollectSequenceElements(LogEventPropertyValue?[] elements)
3736
{
3837
return elements.ToList();
@@ -53,18 +52,18 @@ static class Intrinsics
5352
if (content is SequenceValue sequence)
5453
foreach (var element in sequence.Elements)
5554
elements.Add(element);
56-
55+
5756
return elements;
5857
}
5958

6059
public static LogEventPropertyValue ConstructSequenceValue(List<LogEventPropertyValue?> elements)
6160
{
6261
if (elements.Any(el => el == null))
6362
return new SequenceValue(elements.Where(el => el != null));
64-
63+
6564
return new SequenceValue(elements);
6665
}
67-
66+
6867
public static List<LogEventProperty> CollectStructureProperties(string[] names, LogEventPropertyValue?[] values)
6968
{
7069
var properties = new List<LogEventProperty>();
@@ -85,7 +84,7 @@ public static LogEventPropertyValue ConstructStructureValue(List<LogEventPropert
8584

8685
return new StructureValue(properties);
8786
}
88-
87+
8988
public static List<LogEventProperty> ExtendStructureValueWithSpread(
9089
List<LogEventProperty> properties,
9190
LogEventPropertyValue? content)
@@ -99,7 +98,7 @@ public static List<LogEventProperty> ExtendStructureValueWithSpread(
9998

10099
return properties;
101100
}
102-
101+
103102
public static List<LogEventProperty> ExtendStructureValueWithProperty(
104103
List<LogEventProperty> properties,
105104
string name,
@@ -129,7 +128,7 @@ public static bool CoerceToScalarBoolean(LogEventPropertyValue value)
129128
return b;
130129
return false;
131130
}
132-
131+
133132
public static LogEventPropertyValue? IndexOfMatch(LogEventPropertyValue value, Regex regex)
134133
{
135134
if (value is ScalarValue scalar &&
@@ -193,9 +192,9 @@ public static string RenderMessage(CompiledMessageToken formatter, EvaluationCon
193192
if (token is PropertyToken {Format: { }} pt)
194193
{
195194
elements ??= new List<LogEventPropertyValue>();
196-
195+
197196
var space = new StringWriter();
198-
197+
199198
pt.Render(logEvent.Properties, space, formatProvider);
200199
elements.Add(new ScalarValue(space.ToString()));
201200
}

src/Serilog.Expressions/Templates/ExpressionTemplate.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
using System.IO;
1818
using Serilog.Events;
1919
using Serilog.Expressions;
20-
using Serilog.Expressions.Compilation;
2120
using Serilog.Formatting;
2221
using Serilog.Templates.Compilation;
2322
using Serilog.Templates.Compilation.NameResolution;
@@ -32,7 +31,7 @@ namespace Serilog.Templates
3231
public class ExpressionTemplate : ITextFormatter
3332
{
3433
readonly CompiledTemplate _compiled;
35-
34+
3635
/// <summary>
3736
/// Construct an <see cref="ExpressionTemplate"/>.
3837
/// </summary>
@@ -89,10 +88,10 @@ public static bool TryParse(
8988
formatProvider,
9089
TemplateFunctionNameResolver.Build(nameResolver, planned),
9190
SelectTheme(theme, applyThemeWhenOutputIsRedirected)));
92-
91+
9392
return true;
9493
}
95-
94+
9695
ExpressionTemplate(CompiledTemplate compiled)
9796
{
9897
_compiled = compiled;
@@ -121,9 +120,9 @@ public ExpressionTemplate(
121120
var templateParser = new TemplateParser();
122121
if (!templateParser.TryParse(template, out var parsed, out var error))
123122
throw new ArgumentException(error);
124-
123+
125124
var planned = TemplateLocalNameBinder.BindLocalValueNames(parsed);
126-
125+
127126
_compiled = TemplateCompiler.Compile(
128127
planned,
129128
formatProvider,

test/Serilog.Expressions.Tests/ExpressionEvaluationTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Globalization;
4-
using System.IO;
5-
using System.Linq;
64
using Serilog.Events;
75
using Serilog.Expressions.Runtime;
86
using Serilog.Expressions.Tests.Support;

0 commit comments

Comments
 (0)