Skip to content

Commit

Permalink
chore: remove unused using statements (#1618)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Pulman <chris.pulman@yahoo.com>
  • Loading branch information
TimothyMakkison and ChrisPulman authored Nov 21, 2023
1 parent cd37b46 commit cb9a5b7
Show file tree
Hide file tree
Showing 32 changed files with 34 additions and 141 deletions.
8 changes: 2 additions & 6 deletions Refit.Benchmarks/EndToEndBenchmark.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Net;

using AutoFixture;
using BenchmarkDotNet.Attributes;

Expand Down
10 changes: 1 addition & 9 deletions Refit.Benchmarks/IGitHubService.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;

using Refit;
using System.Threading.Tasks;

namespace Refit.Benchmarks
namespace Refit.Benchmarks
{
public interface IGitHubService
{
Expand Down
4 changes: 1 addition & 3 deletions Refit.Benchmarks/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;

using BenchmarkDotNet.Running;
using BenchmarkDotNet.Running;

namespace Refit.Benchmarks
{
Expand Down
7 changes: 1 addition & 6 deletions Refit.Benchmarks/StaticFileHttpResponseHandler.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Net;

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

namespace Refit
namespace Refit
{
sealed class AnonymousDisposable : IDisposable
{
Expand Down
4 changes: 1 addition & 3 deletions Refit/ApiException.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System;
using System.Net;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

namespace Refit
{
Expand Down
4 changes: 1 addition & 3 deletions Refit/ApiResponse.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

namespace Refit
{
Expand Down
3 changes: 1 addition & 2 deletions Refit/Attributes.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Net.Http;
using System.Net.Http;

namespace Refit
{
Expand Down
5 changes: 1 addition & 4 deletions Refit/AuthenticatedHttpClientHandler.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.Net.Http;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;

namespace Refit
{
Expand Down
6 changes: 1 addition & 5 deletions Refit/Buffers/PooledBufferWriter.Stream.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Buffers;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using System.Buffers;

#nullable enable

Expand Down
3 changes: 1 addition & 2 deletions Refit/Buffers/PooledBufferWriter.ThrowExceptions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;

namespace Refit.Buffers
{
Expand Down
4 changes: 1 addition & 3 deletions Refit/Buffers/PooledBufferWriter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Buffers;
using System.IO;
using System.Buffers;
using System.Runtime.CompilerServices;

namespace Refit.Buffers
Expand Down
4 changes: 1 addition & 3 deletions Refit/CachedRequestBuilderImplementation.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Concurrent;
using System.Linq;
using System.Collections.Concurrent;
using System.Net.Http;

namespace Refit
Expand Down
4 changes: 1 addition & 3 deletions Refit/CloseGenericMethodKey.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Linq;
using System.Reflection;
using System.Reflection;

namespace Refit
{
Expand Down
6 changes: 1 addition & 5 deletions Refit/FormValueMultimap.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Collections;
using System.Reflection;
using System.Text.Json.Serialization;

namespace Refit
{
Expand Down
9 changes: 1 addition & 8 deletions Refit/HttpContentExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Net.Http;

namespace Refit
{
Expand Down
7 changes: 1 addition & 6 deletions Refit/JsonContentSerializer.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
using System;
using System.IO;
using System.Net.Http;
using System.Net.Http;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Refit
{
Expand Down
4 changes: 1 addition & 3 deletions Refit/MultipartItem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.IO;
using System.Net.Http;
using System.Net.Http;
using System.Net.Http.Headers;

namespace Refit
Expand Down
5 changes: 1 addition & 4 deletions Refit/NameValueCollection.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System.Collections.Generic;
using System.Linq;

namespace System.Collections.Specialized
namespace System.Collections.Specialized
{
class NameValueCollection : Dictionary<string, string>
{
Expand Down
4 changes: 1 addition & 3 deletions Refit/ProblemDetails.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;

namespace Refit
{
Expand Down
3 changes: 0 additions & 3 deletions Refit/PushStreamContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@

using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.IO;
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;

namespace System.Net.Http
{
Expand Down
9 changes: 2 additions & 7 deletions Refit/RefitSettings.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.Concurrent;
using System.Globalization;
using System.Linq;
using System.Net.Http;
using System.Reflection;
using System.Runtime.Serialization;
using System.Threading;
using System.Threading.Tasks;

namespace Refit
{
Expand Down Expand Up @@ -86,7 +81,7 @@ public RefitSettings(
public bool Buffered { get; set; } = false;

/// <summary>
/// Optional Key-Value pairs, which are displayed in the property <see cref="HttpRequestMessage.Options"/> or <see cref="HttpRequestMessage.Properties"/>.
/// Optional Key-Value pairs, which are displayed in the property <see cref="HttpRequestMessage.Options"/> or <see cref="HttpRequestMessage.Properties"/>.
/// </summary>
public Dictionary<string, object> HttpRequestMessageOptions { get; set; }
}
Expand Down
3 changes: 1 addition & 2 deletions Refit/RequestBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Net.Http;
using System.Net.Http;

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

namespace Refit
namespace Refit
{
interface IRequestBuilderFactory
{
Expand Down
6 changes: 1 addition & 5 deletions Refit/RequestBuilderImplementation.TaskToObservable.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Threading;
using System.Threading.Tasks;

namespace Refit
namespace Refit
{
partial class RequestBuilderImplementation
{
Expand Down
11 changes: 2 additions & 9 deletions Refit/RequestBuilderImplementation.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
using System;
using System.Collections;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Web;

namespace Refit
Expand Down Expand Up @@ -753,7 +746,7 @@ Func<object[], HttpRequestMessage> BuildRequestFactoryForMethod(RestMethodInfoIn
#else
ret.Properties[HttpRequestMessageOptions.InterfaceType] = TargetType;
ret.Properties[HttpRequestMessageOptions.RestMethodInfo] = restMethod.ToRestMethodInfo();
#endif
#endif

// NB: The URI methods in .NET are dumb. Also, we do this
// UriBuilder business so that we preserve any hardcoded query
Expand Down
8 changes: 1 addition & 7 deletions Refit/RestMethodInfo.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Net.Http;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
using System.Threading;

// Enable support for C# 9 record types
#if NETSTANDARD2_1 || !NET6_0_OR_GREATER
Expand Down
3 changes: 1 addition & 2 deletions Refit/RestMethodParameterInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Reflection;
using System.Reflection;

namespace Refit
{
Expand Down
3 changes: 1 addition & 2 deletions Refit/RestService.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 System.Net.Http;

namespace Refit
Expand Down
12 changes: 1 addition & 11 deletions Refit/SystemTextJsonContentSerializer.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
using System;
using System.Buffers;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Net.Http;
using System.Net.Http.Json;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading;
using System.Threading.Tasks;
using Refit.Buffers;

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

namespace Refit
namespace Refit
{
class UniqueName
{
Expand Down
4 changes: 1 addition & 3 deletions Refit/ValidationApiException.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Text.Json;
using System.Threading.Tasks;
using System.Text.Json;

namespace Refit
{
Expand Down

0 comments on commit cb9a5b7

Please sign in to comment.