Skip to content

Commit

Permalink
Move HTTP related types to http namespace, and policy types to… (#6939)
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym authored Jul 16, 2019
1 parent 9dea72e commit f31e18d
Show file tree
Hide file tree
Showing 60 changed files with 316 additions and 327 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license information.

using Azure.Core.Pipeline;
using Azure.Core.Pipeline.Policies;
using NUnit.Framework;
using System;
using System.Net.Http;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT License.

using System;
using Azure.Core.Http;

namespace Azure.ApplicationModel.Configuration
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using System.Threading;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Core.Http;
using Azure.Core.Pipeline;

namespace Azure.ApplicationModel.Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Collections.Generic;
using System.ComponentModel;
using Azure.Core;
using Azure.Core.Http;

namespace Azure.ApplicationModel.Configuration
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Azure.Core.Http;

namespace Azure.ApplicationModel.Configuration
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Azure.Core.Http;
using NUnit.Framework;

namespace Azure.ApplicationModel.Configuration.Tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using Azure.Core;
using Azure.Core.Http;

namespace Azure.ApplicationModel.Configuration.Tests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System;

namespace Azure
namespace Azure.Core.Http
{
public readonly struct ETag : IEquatable<ETag>
{
Expand Down
3 changes: 1 addition & 2 deletions sdk/core/Azure.Core/src/Http/HttpHeader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
// Licensed under the MIT License.

using System;
using System.Runtime.InteropServices;

namespace Azure.Core.Pipeline
namespace Azure.Core.Http
{
public readonly struct HttpHeader : IEquatable<HttpHeader>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System;
using System.Text;

namespace Azure.Core
namespace Azure.Core.Http
{
public class RequestUriBuilder
{
Expand Down
1 change: 0 additions & 1 deletion sdk/core/Azure.Core/src/Http/HttpRange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System;
using System.ComponentModel;
using System.Globalization;
using Azure.Core.Pipeline;

namespace Azure.Core.Http
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using System.Collections;
using System.Collections.Generic;
using Azure.Core.Pipeline;

namespace Azure.Core.Http
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using Azure.Core.Pipeline;

namespace Azure
namespace Azure.Core.Http
{
public readonly struct ResponseHeaders: IEnumerable<HttpHeader>
{
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/Azure.Core/src/OperationOfT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected set
public abstract bool HasValue { get; }

/// <summary>
/// Polling interval used by WaitCompletionAsync method.
/// Polling interval used by WaitCompletionAsync method.
/// </summary>
/// <remarks>
/// The interval can change based on information returned from the server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Azure.Core.Http;

namespace Azure.Core.Pipeline.Policies
namespace Azure.Core.Pipeline
{
public class BearerTokenAuthenticationPolicy: HttpPipelinePolicy
{
private readonly TokenCredential _credential;

private readonly string[] _scopes;

private string _headerValue;

private DateTimeOffset _refreshOn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.IO;
using System.Threading.Tasks;

namespace Azure.Core.Pipeline.Policies
namespace Azure.Core.Pipeline
{
internal class BufferResponsePolicy: HttpPipelinePolicy
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

namespace Azure.Core.Pipeline.Policies
namespace Azure.Core.Pipeline
{
internal class ClientRequestIdPolicy : SynchronousHttpPipelinePolicy
{
Expand Down
1 change: 0 additions & 1 deletion sdk/core/Azure.Core/src/Pipeline/HttpPipelineBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using Azure.Core.Pipeline.Policies;

namespace Azure.Core.Pipeline
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
using System.Threading;
using System.Threading.Tasks;
using Azure.Core.Diagnostics;
using Azure.Core.Http;

namespace Azure.Core.Pipeline.Policies
namespace Azure.Core.Pipeline
{
internal class LoggingPolicy : HttpPipelinePolicy
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
using System.Threading;
using System.Threading.Tasks;
using Azure.Core.Pipeline;
using Azure.Core.Pipeline.Policies;

namespace Azure.Core
namespace Azure.Core.Pipeline
{
public static class RetriableStream
{
Expand Down
1 change: 0 additions & 1 deletion sdk/core/Azure.Core/src/Pipeline/RetryOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Licensed under the MIT License.

using System;
using Azure.Core.Pipeline.Policies;

namespace Azure.Core.Pipeline
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.Threading.Tasks;
using Azure.Core.Diagnostics;

namespace Azure.Core.Pipeline.Policies
namespace Azure.Core.Pipeline
{
internal class RetryPolicy : HttpPipelinePolicy
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Diagnostics;
using System.Threading.Tasks;

namespace Azure.Core.Pipeline.Policies
namespace Azure.Core.Pipeline
{
internal static class TaskExtensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
// Licensed under the MIT License.

using System.Runtime.InteropServices;
using Azure.Core.Http;

namespace Azure.Core.Pipeline.Policies
namespace Azure.Core.Pipeline
{
public class TelemetryPolicy : SynchronousHttpPipelinePolicy
internal class TelemetryPolicy : SynchronousHttpPipelinePolicy
{
private readonly string _header;

Expand Down
1 change: 1 addition & 0 deletions sdk/core/Azure.Core/src/Response.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using Azure.Core.Http;
using Azure.Core.Pipeline;

namespace Azure
Expand Down
2 changes: 0 additions & 2 deletions sdk/core/Azure.Core/src/ResponseExceptionExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Globalization;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Azure.Core.Pipeline;
using Azure.Core.Pipeline.Policies;

namespace Azure.Core
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Azure.Core.Pipeline.Policies;
using Azure.Core.Pipeline;
using Azure.Core.Testing;
using Moq;
using NUnit.Framework;
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/Azure.Core/tests/BufferResponsePolicyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System;
using System.IO;
using System.Threading.Tasks;
using Azure.Core.Pipeline.Policies;
using Azure.Core.Pipeline;
using Azure.Core.Testing;
using NUnit.Framework;

Expand Down
2 changes: 1 addition & 1 deletion sdk/core/Azure.Core/tests/ClientRequestIdPolicyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

using System.Threading.Tasks;
using Azure.Core.Pipeline.Policies;
using Azure.Core.Pipeline;
using Azure.Core.Testing;
using NUnit.Framework;

Expand Down
5 changes: 1 addition & 4 deletions sdk/core/Azure.Core/tests/ETagTests.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Collections.Generic;
using System.Text;
using NUnit;
using Azure.Core.Http;
using NUnit.Framework;

namespace Azure.Core.Tests
Expand Down
1 change: 0 additions & 1 deletion sdk/core/Azure.Core/tests/EventSourceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using Azure.Core.Diagnostics;
using Azure.Core.Http;
using Azure.Core.Pipeline;
using Azure.Core.Pipeline.Policies;
using Azure.Core.Testing;
using NUnit.Framework;

Expand Down
3 changes: 1 addition & 2 deletions sdk/core/Azure.Core/tests/ExponentialPolicyTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
// Licensed under the MIT License.

using System;
using System.Threading;
using System.Threading.Tasks;
using Azure.Core.Http;
using Azure.Core.Pipeline;
using Azure.Core.Pipeline.Policies;
using Azure.Core.Testing;
using NUnit.Framework;

Expand Down
1 change: 1 addition & 0 deletions sdk/core/Azure.Core/tests/FailedResponseExceptionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Threading.Tasks;
using Azure.Core.Http;
using Azure.Core.Pipeline;
using Azure.Core.Testing;
using NUnit.Framework;
Expand Down
3 changes: 1 addition & 2 deletions sdk/core/Azure.Core/tests/FixedRetryPolicyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
// Licensed under the MIT License.

using System;
using System.Threading;
using System.Threading.Tasks;
using Azure.Core.Http;
using Azure.Core.Pipeline;
using Azure.Core.Pipeline.Policies;
using Azure.Core.Testing;
using NUnit.Framework;

Expand Down
1 change: 1 addition & 0 deletions sdk/core/Azure.Core/tests/HeadersTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System;
using System.Text;
using System.Text.RegularExpressions;
using Azure.Core.Http;
using Azure.Core.Pipeline;
using Azure.Core.Testing;
using NUnit.Framework;
Expand Down
2 changes: 0 additions & 2 deletions sdk/core/Azure.Core/tests/PipelineTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
// Licensed under the MIT License.

using Azure.Core.Pipeline;
using Azure.Core.Pipeline.Policies;
using Azure.Core.Testing;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

Expand Down
1 change: 1 addition & 0 deletions sdk/core/Azure.Core/tests/RequestUriBuilderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT License.

using System;
using Azure.Core.Http;
using NUnit.Framework;

namespace Azure.Core.Tests
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/Azure.Core/tests/RetryPolicyTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
using System.Threading;
using System.Threading.Tasks;
using Azure.Core.Diagnostics;
using Azure.Core.Http;
using Azure.Core.Pipeline;
using Azure.Core.Pipeline.Policies;
using Azure.Core.Testing;
using NUnit.Framework;

Expand Down
2 changes: 0 additions & 2 deletions sdk/core/Azure.Core/tests/TelemetryPolicyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
// Licensed under the MIT License.

using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Azure.Core.Pipeline;
using Azure.Core.Pipeline.Policies;
using Azure.Core.Testing;
using NUnit.Framework;

Expand Down
1 change: 1 addition & 0 deletions sdk/core/Azure.Core/tests/TestFramework/MockResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.IO;
using System.Linq;
using System.Text;
using Azure.Core.Http;
using Azure.Core.Pipeline;

namespace Azure.Core.Testing
Expand Down
1 change: 0 additions & 1 deletion sdk/identity/Azure.Identity/src/AadIdentityClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using Azure.Core;
using Azure.Core.Pipeline;
using Azure.Core.Pipeline.Policies;
using System;
using System.Buffers;
using System.Collections.Generic;
Expand Down
Loading

0 comments on commit f31e18d

Please sign in to comment.