Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global usings #1736

Merged
merged 3 commits into from Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Directory.Build.props
Expand Up @@ -9,6 +9,7 @@
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="all" />
Expand Down
7 changes: 7 additions & 0 deletions Directory.Build.targets
@@ -0,0 +1,7 @@
<Project>

<ItemGroup>
<Using Remove="System.Net.Http" />
</ItemGroup>

</Project>
7 changes: 0 additions & 7 deletions src/Serilog/Capturing/DepthLimiter.cs
Expand Up @@ -12,13 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;

using Serilog.Core;
using Serilog.Debugging;
using Serilog.Events;
using Serilog.Parsing;

namespace Serilog.Capturing;

partial class PropertyValueConverter
Expand Down
5 changes: 0 additions & 5 deletions src/Serilog/Capturing/GetablePropertyFinder.cs
Expand Up @@ -12,11 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace Serilog.Capturing;

static class GetablePropertyFinder
Expand Down
5 changes: 0 additions & 5 deletions src/Serilog/Capturing/MessageTemplateProcessor.cs
Expand Up @@ -12,11 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Serilog.Core;
using Serilog.Core.Pipeline;
using Serilog.Events;
using Serilog.Parsing;

namespace Serilog.Capturing;

class MessageTemplateProcessor : ILogEventPropertyFactory
Expand Down
5 changes: 0 additions & 5 deletions src/Serilog/Capturing/PropertyBinder.cs
Expand Up @@ -12,11 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using Serilog.Debugging;
using Serilog.Events;
using Serilog.Parsing;

namespace Serilog.Capturing;

// Performance relevant - on the hot path when creating log events from existing templates.
Expand Down
13 changes: 0 additions & 13 deletions src/Serilog/Capturing/PropertyValueConverter.cs
Expand Up @@ -12,19 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;
using Serilog.Core;
using Serilog.Debugging;
using Serilog.Events;
using Serilog.Parsing;
using Serilog.Policies;
using System.Runtime.CompilerServices;

namespace Serilog.Capturing;

// Values in Serilog are simplified down into a lowest-common-denominator internal
Expand Down
4 changes: 0 additions & 4 deletions src/Serilog/Configuration/LoggerAuditSinkConfiguration.cs
Expand Up @@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using Serilog.Core;
using Serilog.Events;

namespace Serilog.Configuration;

/// <summary>
Expand Down
5 changes: 0 additions & 5 deletions src/Serilog/Configuration/LoggerDestructuringConfiguration.cs
Expand Up @@ -12,11 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Collections;
using Serilog.Core;
using Serilog.Policies;

namespace Serilog.Configuration;

/// <summary>
Expand Down
9 changes: 0 additions & 9 deletions src/Serilog/Configuration/LoggerEnrichmentConfiguration.cs
Expand Up @@ -12,15 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Collections.Generic;
using System.Linq;
using Serilog.Context;
using Serilog.Core;
using Serilog.Core.Enrichers;
using Serilog.Debugging;
using Serilog.Events;

namespace Serilog.Configuration;

/// <summary>
Expand Down
5 changes: 0 additions & 5 deletions src/Serilog/Configuration/LoggerFilterConfiguration.cs
Expand Up @@ -12,11 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using Serilog.Core;
using Serilog.Core.Filters;
using Serilog.Events;

namespace Serilog.Configuration;

/// <summary>
Expand Down
4 changes: 0 additions & 4 deletions src/Serilog/Configuration/LoggerMinimumLevelConfiguration.cs
Expand Up @@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using Serilog.Core;
using Serilog.Events;

namespace Serilog.Configuration;

/// <summary>
Expand Down
4 changes: 0 additions & 4 deletions src/Serilog/Configuration/LoggerSettingsConfiguration.cs
Expand Up @@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Collections.Generic;
using Serilog.Settings.KeyValuePairs;

namespace Serilog.Configuration;

/// <summary>
Expand Down
9 changes: 0 additions & 9 deletions src/Serilog/Configuration/LoggerSinkConfiguration.cs
Expand Up @@ -12,15 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using Serilog.Core;
using Serilog.Core.Sinks;
using Serilog.Debugging;
using Serilog.Events;

namespace Serilog.Configuration;

/// <summary>
Expand Down
5 changes: 1 addition & 4 deletions src/Serilog/Context/EnricherStack.cs
Expand Up @@ -12,10 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Collections;
using System.Collections.Generic;
using Serilog.Core;


// General-purpose type; not all features are used here.
// ReSharper disable MemberCanBePrivate.Global
Expand Down
14 changes: 0 additions & 14 deletions src/Serilog/Context/LogContext.cs
Expand Up @@ -12,20 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.ComponentModel;
using Serilog.Core;
using Serilog.Core.Enrichers;
using Serilog.Events;

#if ASYNCLOCAL
using System.Threading;
#elif REMOTING
using System.Runtime.Remoting;
using System.Runtime.Remoting.Lifetime;
using System.Runtime.Remoting.Messaging;
#endif

namespace Serilog.Context;

/// <summary>
Expand Down
3 changes: 0 additions & 3 deletions src/Serilog/Context/LogContextEnricher.cs
Expand Up @@ -12,9 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Serilog.Core;
using Serilog.Events;

namespace Serilog.Context;

sealed class LogContextEnricher : ILogEventEnricher
Expand Down
@@ -1,7 +1,5 @@
#if FEATURE_DEFAULT_INTERFACE

using System;

namespace Serilog.Core;

[AttributeUsage(AttributeTargets.Method | AttributeTargets.Interface)]
Expand Down
3 changes: 0 additions & 3 deletions src/Serilog/Core/Enrichers/ConditionalEnricher.cs
Expand Up @@ -12,9 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using Serilog.Events;

namespace Serilog.Core.Enrichers;

class ConditionalEnricher : ILogEventEnricher, IDisposable
Expand Down
2 changes: 0 additions & 2 deletions src/Serilog/Core/Enrichers/EmptyEnricher.cs
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Serilog.Events;

namespace Serilog.Core.Enrichers;

class EmptyEnricher : ILogEventEnricher
Expand Down
3 changes: 0 additions & 3 deletions src/Serilog/Core/Enrichers/FixedPropertyEnricher.cs
Expand Up @@ -12,9 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using Serilog.Events;

namespace Serilog.Core.Enrichers;

class FixedPropertyEnricher : ILogEventEnricher
Expand Down
3 changes: 0 additions & 3 deletions src/Serilog/Core/Enrichers/PropertyEnricher.cs
Expand Up @@ -12,9 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using Serilog.Events;

namespace Serilog.Core.Enrichers;

/// <summary>
Expand Down
6 changes: 0 additions & 6 deletions src/Serilog/Core/Enrichers/SafeAggregateEnricher.cs
Expand Up @@ -12,12 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Collections.Generic;
using System.Linq;
using Serilog.Debugging;
using Serilog.Events;

namespace Serilog.Core.Enrichers;

class SafeAggregateEnricher : ILogEventEnricher
Expand Down
3 changes: 0 additions & 3 deletions src/Serilog/Core/Filters/DelegateFilter.cs
Expand Up @@ -12,9 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using Serilog.Events;

namespace Serilog.Core.Filters;

class DelegateFilter : ILogEventFilter
Expand Down
3 changes: 0 additions & 3 deletions src/Serilog/Core/IDestructuringPolicy.cs
Expand Up @@ -12,9 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System.Diagnostics.CodeAnalysis;
using Serilog.Events;

namespace Serilog.Core;

/// <summary>
Expand Down
2 changes: 0 additions & 2 deletions src/Serilog/Core/ILogEventEnricher.cs
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Serilog.Events;

namespace Serilog.Core;

/// <summary>
Expand Down
2 changes: 0 additions & 2 deletions src/Serilog/Core/ILogEventFilter.cs
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Serilog.Events;

namespace Serilog.Core;

/// <summary>
Expand Down
2 changes: 0 additions & 2 deletions src/Serilog/Core/ILogEventPropertyFactory.cs
Expand Up @@ -13,8 +13,6 @@
// limitations under the License.


using Serilog.Events;

namespace Serilog.Core;

/// <summary>
Expand Down
4 changes: 1 addition & 3 deletions src/Serilog/Core/ILogEventPropertyValueFactory.cs
@@ -1,6 +1,4 @@
using Serilog.Events;

namespace Serilog.Core;
namespace Serilog.Core;

/// <summary>
/// Supports the policy-driven construction of <see cref="LogEventPropertyValue"/>s given
Expand Down
2 changes: 0 additions & 2 deletions src/Serilog/Core/ILogEventSink.cs
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Serilog.Events;

namespace Serilog.Core;

/// <summary>
Expand Down
2 changes: 0 additions & 2 deletions src/Serilog/Core/IMessageTemplateParser.cs
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Serilog.Events;

namespace Serilog.Core;

interface IMessageTemplateParser
Expand Down
5 changes: 1 addition & 4 deletions src/Serilog/Core/IScalarConversionPolicy.cs
@@ -1,7 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using Serilog.Events;

namespace Serilog.Core;
namespace Serilog.Core;

/// <summary>
/// Determine how a simple value is carried through the logging
Expand Down
5 changes: 0 additions & 5 deletions src/Serilog/Core/LevelOverrideMap.cs
Expand Up @@ -12,11 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Collections.Generic;
using System.Linq;
using Serilog.Events;

namespace Serilog.Core;

class LevelOverrideMap
Expand Down
10 changes: 0 additions & 10 deletions src/Serilog/Core/Logger.cs
Expand Up @@ -12,16 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Serilog.Capturing;
using Serilog.Core.Enrichers;
using Serilog.Core.Pipeline;
using Serilog.Debugging;
using Serilog.Events;

#pragma warning disable Serilog004 // Constant MessageTemplate verifier

namespace Serilog.Core;
Expand Down
2 changes: 0 additions & 2 deletions src/Serilog/Core/LoggingLevelSwitch.cs
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Serilog.Events;

namespace Serilog.Core;

/// <summary>
Expand Down