Skip to content

Commit

Permalink
Enable ImplicitUsings (#762)
Browse files Browse the repository at this point in the history
  • Loading branch information
Romfos authored Dec 25, 2023
1 parent 4d262d3 commit 8b2beb2
Show file tree
Hide file tree
Showing 222 changed files with 105 additions and 511 deletions.
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<TargetIsNetFx Condition="$(TargetFramework.StartsWith('net4'))">true</TargetIsNetFx>
<TargetIsNet5OrNewer Condition="'$(TargetFramework)' == 'net6.0'">true</TargetIsNet5OrNewer>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion src/NSubstitute/Arg.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Linq.Expressions;
using NSubstitute.Core.Arguments;

Expand Down
3 changes: 1 addition & 2 deletions src/NSubstitute/Callback.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Concurrent;
using NSubstitute.Callbacks;
using NSubstitute.Core;

Expand Down
3 changes: 1 addition & 2 deletions src/NSubstitute/Callbacks/ConfiguredCallback.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using NSubstitute.Core;
using NSubstitute.Core;

// Disable nullability for client API, so it does not affect clients.
#nullable disable annotations
Expand Down
4 changes: 1 addition & 3 deletions src/NSubstitute/ClearOptions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;

namespace NSubstitute
namespace NSubstitute
{
[Flags]
public enum ClearOptions
Expand Down
3 changes: 1 addition & 2 deletions src/NSubstitute/Compatibility/CompatArg.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Linq.Expressions;
using System.Linq.Expressions;

// Disable nullability for client API, so it does not affect clients.
#nullable disable annotations
Expand Down
5 changes: 1 addition & 4 deletions src/NSubstitute/Core/Argument.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Reflection;

namespace NSubstitute.Core
namespace NSubstitute.Core
{
public class Argument
{
Expand Down
4 changes: 1 addition & 3 deletions src/NSubstitute/Core/ArgumentSpecificationDequeue.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Reflection;
using NSubstitute.Core.Arguments;

namespace NSubstitute.Core
Expand Down
2 changes: 0 additions & 2 deletions src/NSubstitute/Core/Arguments/AnyArgumentMatcher.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

namespace NSubstitute.Core.Arguments
{
public class AnyArgumentMatcher : IArgumentMatcher
Expand Down
5 changes: 1 addition & 4 deletions src/NSubstitute/Core/Arguments/ArgumentFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Reflection;

namespace NSubstitute.Core.Arguments
namespace NSubstitute.Core.Arguments
{
public class ArgumentFormatter : IArgumentFormatter
{
Expand Down
2 changes: 0 additions & 2 deletions src/NSubstitute/Core/Arguments/ArgumentMatcher.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;
using System.Diagnostics.CodeAnalysis;
using NSubstitute.Exceptions;

namespace NSubstitute.Core.Arguments
Expand Down
2 changes: 0 additions & 2 deletions src/NSubstitute/Core/Arguments/ArgumentSpecification.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

namespace NSubstitute.Core.Arguments
{
public class ArgumentSpecification : IArgumentSpecification
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Reflection;

namespace NSubstitute.Core.Arguments
namespace NSubstitute.Core.Arguments
{
public class ArgumentSpecificationCompatibilityTester : IArgumentSpecificationCompatibilityTester
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using NSubstitute.Exceptions;

namespace NSubstitute.Core.Arguments
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection;
using NSubstitute.Exceptions;

namespace NSubstitute.Core.Arguments
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;

namespace NSubstitute.Core.Arguments
{
Expand Down
5 changes: 1 addition & 4 deletions src/NSubstitute/Core/Arguments/DefaultChecker.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;

namespace NSubstitute.Core.Arguments
namespace NSubstitute.Core.Arguments
{
public class DefaultChecker : IDefaultChecker
{
Expand Down
2 changes: 0 additions & 2 deletions src/NSubstitute/Core/Arguments/EqualsArgumentMatcher.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;

namespace NSubstitute.Core.Arguments
{
public class EqualsArgumentMatcher : IArgumentMatcher
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Linq.Expressions;

namespace NSubstitute.Core.Arguments
Expand Down
2 changes: 0 additions & 2 deletions src/NSubstitute/Core/Arguments/IArgumentSpecification.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

namespace NSubstitute.Core.Arguments
{
public interface IArgumentSpecification
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;

namespace NSubstitute.Core.Arguments
namespace NSubstitute.Core.Arguments
{
public interface IArgumentSpecificationCompatibilityTester
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Collections.Generic;
using System.Reflection;

namespace NSubstitute.Core.Arguments
Expand Down
4 changes: 1 addition & 3 deletions src/NSubstitute/Core/Arguments/IDefaultChecker.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;

namespace NSubstitute.Core.Arguments
namespace NSubstitute.Core.Arguments
{
public interface IDefaultChecker
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;

namespace NSubstitute.Core.Arguments
{
public interface ISuppliedArgumentSpecifications
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;

namespace NSubstitute.Core.Arguments
{
public interface ISuppliedArgumentSpecificationsFactory
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;

namespace NSubstitute.Core.Arguments
namespace NSubstitute.Core.Arguments
{
public class SuppliedArgumentSpecifications : ISuppliedArgumentSpecifications
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Collections.Generic;

namespace NSubstitute.Core.Arguments
namespace NSubstitute.Core.Arguments
{
public class SuppliedArgumentSpecificationsFactory : ISuppliedArgumentSpecificationsFactory
{
Expand Down
4 changes: 0 additions & 4 deletions src/NSubstitute/Core/Call.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading;
using NSubstitute.Core.Arguments;
using NSubstitute.Exceptions;

Expand Down
3 changes: 1 addition & 2 deletions src/NSubstitute/Core/CallActions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Concurrent;

namespace NSubstitute.Core
{
Expand Down
3 changes: 1 addition & 2 deletions src/NSubstitute/Core/CallBaseConfiguration.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Concurrent;

namespace NSubstitute.Core
{
Expand Down
2 changes: 0 additions & 2 deletions src/NSubstitute/Core/CallCollection.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using NSubstitute.Exceptions;

namespace NSubstitute.Core
Expand Down
5 changes: 1 addition & 4 deletions src/NSubstitute/Core/CallFactory.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection;
using NSubstitute.Core.Arguments;

namespace NSubstitute.Core
Expand Down
4 changes: 1 addition & 3 deletions src/NSubstitute/Core/CallFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection;

namespace NSubstitute.Core
{
Expand Down
3 changes: 0 additions & 3 deletions src/NSubstitute/Core/CallInfo.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using NSubstitute.Exceptions;

// Disable nullability for entry-point API
Expand Down
2 changes: 0 additions & 2 deletions src/NSubstitute/Core/CallRouter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;
using System.Collections.Generic;
using NSubstitute.Exceptions;
using NSubstitute.Routing;

Expand Down
1 change: 0 additions & 1 deletion src/NSubstitute/Core/CallRouterFactory.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using NSubstitute.Routing;

namespace NSubstitute.Core
Expand Down
3 changes: 1 addition & 2 deletions src/NSubstitute/Core/CallRouterResolver.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using NSubstitute.Exceptions;
using NSubstitute.Exceptions;

namespace NSubstitute.Core
{
Expand Down
3 changes: 0 additions & 3 deletions src/NSubstitute/Core/CallSpecification.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using NSubstitute.Core.Arguments;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using NSubstitute.Core.DependencyInjection;
using NSubstitute.Core.DependencyInjection;

namespace NSubstitute.Core
{
Expand Down
4 changes: 1 addition & 3 deletions src/NSubstitute/Core/ConfiguredCall.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;

// Disable nullability for entry-point API
// Disable nullability for entry-point API
#nullable disable annotations

namespace NSubstitute.Core
Expand Down
4 changes: 1 addition & 3 deletions src/NSubstitute/Core/CustomHandlers.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Collections.Generic;

namespace NSubstitute.Core
namespace NSubstitute.Core
{
public class CustomHandlers : ICustomHandlers
{
Expand Down
3 changes: 1 addition & 2 deletions src/NSubstitute/Core/DefaultForType.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Reflection;
using System.Reflection;

namespace NSubstitute.Core
{
Expand Down
2 changes: 0 additions & 2 deletions src/NSubstitute/Core/DependencyInjection/INSubContainer.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

namespace NSubstitute.Core.DependencyInjection
{
public interface INSubResolver
Expand Down
4 changes: 0 additions & 4 deletions src/NSubstitute/Core/DependencyInjection/NSubContainer.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;

namespace NSubstitute.Core.DependencyInjection
{
Expand Down
5 changes: 1 addition & 4 deletions src/NSubstitute/Core/EventCallFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection;

namespace NSubstitute.Core
{
Expand Down
3 changes: 0 additions & 3 deletions src/NSubstitute/Core/EventHandlerRegistry.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;

namespace NSubstitute.Core
{
public class EventHandlerRegistry : IEventHandlerRegistry
Expand Down
2 changes: 0 additions & 2 deletions src/NSubstitute/Core/Events/DelegateEventWrapper.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;
using System.Linq;
using System.Reflection;

namespace NSubstitute.Core.Events
Expand Down
2 changes: 0 additions & 2 deletions src/NSubstitute/Core/Events/EventHandlerWrapper.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

namespace NSubstitute.Core.Events
{
public class EventHandlerWrapper<TEventArgs> : RaiseEventWrapper where TEventArgs : EventArgs
Expand Down
1 change: 0 additions & 1 deletion src/NSubstitute/Core/Events/RaiseEventWrapper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Reflection;
using NSubstitute.Exceptions;

Expand Down
3 changes: 0 additions & 3 deletions src/NSubstitute/Core/Extensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using NSubstitute.Exceptions;
Expand Down
4 changes: 1 addition & 3 deletions src/NSubstitute/Core/GetCallSpec.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;

namespace NSubstitute.Core
namespace NSubstitute.Core
{
public class GetCallSpec : IGetCallSpec
{
Expand Down
4 changes: 1 addition & 3 deletions src/NSubstitute/Core/IArgumentSpecificationDequeue.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Reflection;
using NSubstitute.Core.Arguments;

namespace NSubstitute.Core
Expand Down
2 changes: 0 additions & 2 deletions src/NSubstitute/Core/ICall.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using NSubstitute.Core.Arguments;

Expand Down
2 changes: 0 additions & 2 deletions src/NSubstitute/Core/ICallActions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

namespace NSubstitute.Core
{
public interface ICallActions
Expand Down
2 changes: 0 additions & 2 deletions src/NSubstitute/Core/ICallCollection.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;

namespace NSubstitute.Core
{
public interface ICallCollection
Expand Down
Loading

0 comments on commit 8b2beb2

Please sign in to comment.