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

Build with implicit usings #146

Merged
merged 1 commit into from
Feb 11, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@

namespace Castle.DynamicProxy;

using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;

/// <summary>
/// Intercepts method invocations and determines if is an asynchronous method.
Expand Down
2 changes: 0 additions & 2 deletions src/Castle.Core.AsyncInterceptor/AsyncInterceptorBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@

namespace Castle.DynamicProxy;

using System;
using System.Collections.Concurrent;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Threading.Tasks;
using Castle.DynamicProxy.NoCoverage;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<CodeAnalysisRuleSet>..\stylecop.ruleset</CodeAnalysisRuleSet>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
Expand Down Expand Up @@ -51,6 +52,10 @@
</PackageReference>
</ItemGroup>

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

<ItemGroup>
<AdditionalFiles Include="..\stylecop.json" Link="stylecop.json" />
<None Include="..\..\docs\images\castle-logo.png" Pack="true" PackagePath="" />
Expand Down
2 changes: 0 additions & 2 deletions src/Castle.Core.AsyncInterceptor/IAsyncInterceptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

namespace Castle.DynamicProxy;

using System.Threading.Tasks;

/// <summary>
/// Implement this interface to intercept method invocations with DynamicProxy2.
/// </summary>
Expand Down
4 changes: 0 additions & 4 deletions src/Castle.Core.AsyncInterceptor/NoCoverage/RethrowHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@

namespace Castle.DynamicProxy.NoCoverage;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.ExceptionServices;
using System.Threading.Tasks;

/// <summary>
/// A helper class to re-throw exceptions and retain the stack trace.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

namespace Castle.DynamicProxy;

using System.Threading.Tasks;

/// <summary>
/// A base type for an <see cref="IAsyncInterceptor"/> which executes only minimal processing when intercepting a
/// method <see cref="IInvocation"/>.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2016-2022 James Skimming. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

using System;
using System.Reflection;
using System.Runtime.InteropServices;

Expand Down
4 changes: 0 additions & 4 deletions src/Castle.Core.AsyncInterceptor/ProxyGeneratorExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

namespace Castle.DynamicProxy;

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

/// <summary>
/// Extension methods to <see cref="IProxyGenerator"/>.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

namespace Castle.DynamicProxy;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Castle.DynamicProxy.InterfaceProxies;
using Xunit;
using Xunit.Abstractions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

namespace Castle.DynamicProxy;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Castle.DynamicProxy.InterfaceProxies;
using Xunit;
using Xunit.Abstractions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

namespace Castle.DynamicProxy;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Castle.DynamicProxy.InterfaceProxies;
using Xunit;
using Xunit.Abstractions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

namespace Castle.DynamicProxy;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Castle.DynamicProxy.InterfaceProxies;
using Xunit;
using Xunit.Abstractions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<IsPackable>false</IsPackable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<CodeAnalysisRuleSet>..\test-stylecop.ruleset</CodeAnalysisRuleSet>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

namespace Castle.DynamicProxy;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Castle.DynamicProxy.InterfaceProxies;
using Xunit;
using Xunit.Abstractions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@

namespace Castle.DynamicProxy.InterfaceProxies;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

public class ClassWithAlwaysCompletedAsync : IInterfaceToProxy
{
private readonly ListLogger _log;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@

namespace Castle.DynamicProxy.InterfaceProxies;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

public class ClassWithAlwaysIncompleteAsync : IInterfaceToProxy
{
private readonly ListLogger _log;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@

namespace Castle.DynamicProxy.InterfaceProxies;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;

public class ClassWithInterfaceToProxy : IInterfaceToProxy
{
private readonly ListLogger _log;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

namespace Castle.DynamicProxy.InterfaceProxies;

using System;
using System.Collections.Generic;
using System.Threading.Tasks;

public class ClassWithVirtualMethodToProxy
{
private ListLogger _log = null!;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

namespace Castle.DynamicProxy.InterfaceProxies;

using System;
using System.Collections.Generic;
using System.Threading.Tasks;

public interface IInterfaceToProxy
{
IReadOnlyList<string> Log { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@

namespace Castle.DynamicProxy.InterfaceProxies;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

public class TestAsyncInterceptor : IAsyncInterceptor
{
private readonly ListLogger _log;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

namespace Castle.DynamicProxy.InterfaceProxies;

using System;
using System.Collections.Generic;
using System.Threading.Tasks;

public class TestAsyncInterceptorBase : AsyncInterceptorBase
{
private readonly ListLogger _log;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

namespace Castle.DynamicProxy.InterfaceProxies;

using System;
using System.Collections.Generic;
using System.Diagnostics;

public class TestAsyncTimingInterceptor : AsyncTimingInterceptor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

namespace Castle.DynamicProxy.InterfaceProxies;

using System;
using System.Collections.Generic;

public class TestProcessingAsyncInterceptor : ProcessingAsyncInterceptor<string>
{
private readonly ListLogger _log;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

namespace Castle.DynamicProxy.InterfaceProxies;

using System;
using System.Collections.Generic;

public class TestProcessingReturnValueAsyncInterceptor : ProcessingAsyncInterceptor<object>
{
private readonly ListLogger _log;
Expand Down
3 changes: 0 additions & 3 deletions test/Castle.Core.AsyncInterceptor.Tests/ListLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

namespace Castle.DynamicProxy;

using System;
using System.Collections.Generic;
using System.Linq;
using Xunit.Abstractions;

public class ListLogger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@

namespace Castle.DynamicProxy;

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using Castle.DynamicProxy.InterfaceProxies;
using Xunit;
using Xunit.Abstractions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

namespace Castle.DynamicProxy;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Castle.DynamicProxy.InterfaceProxies;
using Xunit;
using Xunit.Abstractions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2016-2022 James Skimming. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

using System;
using System.Reflection;
using System.Runtime.InteropServices;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

namespace Castle.DynamicProxy;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Castle.DynamicProxy.InterfaceProxies;
using Xunit;
using Xunit.Abstractions;
Expand Down