Skip to content

Commit 9a85d87

Browse files
committed
implemented feedback
1 parent 6d5f8ef commit 9a85d87

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

src/Serilog.Expressions/Extensions/Helpers.cs renamed to src/Serilog.Expressions/Expressions/Helpers.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,33 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#if NETSTANDARD2_0
16+
1517
using System;
1618

17-
namespace Serilog.Extensions
19+
namespace Serilog.Expressions
1820
{
1921
/// <summary>
2022
/// Helper methods.
2123
/// </summary>
22-
public static class Helpers
24+
internal static class Helpers
2325
{
24-
#if NETSTANDARD2_0
2526
/// <summary>
2627
/// Backport .NET Standard 2.1 additions to maintain .NET Standard 2.0 compatibility.
2728
/// Returns a value indicating whether a specified string occurs within this string, using the specified comparison rules.
29+
///
30+
/// From;
31+
/// https://github.com/dotnet/runtime/issues/22198
32+
/// https://stackoverflow.com/questions/444798/case-insensitive-containsstring/444818#444818
2833
/// </summary>
2934
/// <param name="source">input string</param>
3035
/// <param name="value">The string to seek.</param>
3136
/// <param name="comparisonType">Specifies the rule to use in the comparison.</param>
3237
/// <returns></returns>
3338
public static bool Contains(this string source, string value, StringComparison comparisonType)
3439
{
35-
// See;
36-
// https://github.com/dotnet/runtime/issues/22198
37-
// https://stackoverflow.com/questions/444798/case-insensitive-containsstring/444818#444818
3840
return source?.IndexOf(value, comparisonType) >= 0;
3941
}
40-
#endif
4142
}
42-
}
43+
}
44+
#endif

src/Serilog.Expressions/Expressions/Runtime/RuntimeOperators.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Linq;
44
using Serilog.Events;
55
using Serilog.Expressions.Compilation.Linq;
6-
using Serilog.Extensions;
76

87
// ReSharper disable ForCanBeConvertedToForeach, InvertIf, MemberCanBePrivate.Global, UnusedMember.Global
98

src/Serilog.Expressions/System.Diagnostics.CodeAnalysis/NotNullAttributes.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
#if NETSTANDARD2_0
2-
//https://medium.com/@SergioPedri/enabling-and-using-c-9-features-on-older-and-unsupported-runtimes-ce384d8debb
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
#if NETSTANDARD2_0
5+
//From: https://medium.com/@SergioPedri/enabling-and-using-c-9-features-on-older-and-unsupported-runtimes-ce384d8debb
36
namespace System.Diagnostics.CodeAnalysis
47
{
58
/// <summary>Specifies that an output will not be null even if the corresponding type allows it. Specifies that an input argument was not null when the call returns.</summary>
@@ -19,9 +22,5 @@ internal sealed class MaybeNullWhenAttribute : Attribute
1922
/// <summary>Gets the return value condition.</summary>
2023
public bool ReturnValue { get; }
2124
}
22-
23-
// NOTE: you can find the full list of attributes in this gist:
24-
// https://gist.github.com/Sergio0694/eb988b243dd4a720a66fe369b63e5b08.
25-
// Keeping this one shorter so that the Medium embed doesn't take up too much space.
2625
}
2726
#endif

0 commit comments

Comments
 (0)