diff --git a/eng/Directory.Build.Common.targets b/eng/Directory.Build.Common.targets index e18cfa51a351a..e4e1d83c88c54 100644 --- a/eng/Directory.Build.Common.targets +++ b/eng/Directory.Build.Common.targets @@ -198,7 +198,6 @@ - diff --git a/sdk/core/Azure.Core/src/Azure.Core.csproj b/sdk/core/Azure.Core/src/Azure.Core.csproj index f1b330f3c8718..db3874ab03887 100644 --- a/sdk/core/Azure.Core/src/Azure.Core.csproj +++ b/sdk/core/Azure.Core/src/Azure.Core.csproj @@ -81,7 +81,6 @@ - diff --git a/sdk/core/Azure.Core/src/Shared/GeoRedundantFallbackPolicy.cs b/sdk/core/Azure.Core/src/Internal/GeoRedundantFallbackPolicy.cs similarity index 99% rename from sdk/core/Azure.Core/src/Shared/GeoRedundantFallbackPolicy.cs rename to sdk/core/Azure.Core/src/Internal/GeoRedundantFallbackPolicy.cs index a5c9e8ff13e8c..1d200d41d6d8e 100644 --- a/sdk/core/Azure.Core/src/Shared/GeoRedundantFallbackPolicy.cs +++ b/sdk/core/Azure.Core/src/Internal/GeoRedundantFallbackPolicy.cs @@ -4,11 +4,10 @@ using System; using System.Diagnostics; using System.Threading; -using Azure.Core.Pipeline; #nullable enable -namespace Azure.Core.Shared +namespace Azure.Core.Pipeline { /// /// Internal policy that can be used to support georedundant fallbacks for Azure services. The policy maintains the current healthy host @@ -172,4 +171,4 @@ public void ResetPrimaryIfNeeded() } } } -} \ No newline at end of file +} diff --git a/sdk/core/Azure.Core/src/Shared/ErrorResponse.cs b/sdk/core/Azure.Core/src/Shared/ErrorResponse.cs deleted file mode 100644 index 6fad0180f5964..0000000000000 --- a/sdk/core/Azure.Core/src/Shared/ErrorResponse.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable enable - -namespace Azure.Core -{ - internal class ErrorResponse : Response - { - private readonly Response _response; - private readonly RequestFailedException _exception; - - public ErrorResponse(Response response, RequestFailedException exception) - { - _response = response; - _exception = exception; - } - - public override T Value { get => throw _exception; } - - public override Response GetRawResponse() => _response; - } -} diff --git a/sdk/core/Azure.Core/src/Shared/HttpPipelineExtensions.cs b/sdk/core/Azure.Core/src/Shared/HttpPipelineExtensions.cs index 1be1252193dcc..231f13cf537e7 100644 --- a/sdk/core/Azure.Core/src/Shared/HttpPipelineExtensions.cs +++ b/sdk/core/Azure.Core/src/Shared/HttpPipelineExtensions.cs @@ -90,5 +90,21 @@ private static (CancellationToken CancellationToken, ErrorOptions ErrorOptions) return (requestContext.CancellationToken, requestContext.ErrorOptions); } + + internal class ErrorResponse : Response + { + private readonly Response _response; + private readonly RequestFailedException _exception; + + public ErrorResponse(Response response, RequestFailedException exception) + { + _response = response; + _exception = exception; + } + + public override T Value { get => throw _exception; } + + public override Response GetRawResponse() => _response; + } } } diff --git a/sdk/core/Azure.Core/tests/Azure.Core.Tests.csproj b/sdk/core/Azure.Core/tests/Azure.Core.Tests.csproj index 21f85ac21e45d..c4a965be26e4f 100644 --- a/sdk/core/Azure.Core/tests/Azure.Core.Tests.csproj +++ b/sdk/core/Azure.Core/tests/Azure.Core.Tests.csproj @@ -35,11 +35,8 @@ - - - @@ -48,7 +45,6 @@ - diff --git a/sdk/monitor/Azure.Monitor.Ingestion/src/Azure.Monitor.Ingestion.csproj b/sdk/monitor/Azure.Monitor.Ingestion/src/Azure.Monitor.Ingestion.csproj index b72fde602d22b..4f71491c5461b 100644 --- a/sdk/monitor/Azure.Monitor.Ingestion/src/Azure.Monitor.Ingestion.csproj +++ b/sdk/monitor/Azure.Monitor.Ingestion/src/Azure.Monitor.Ingestion.csproj @@ -16,7 +16,6 @@ - diff --git a/sdk/core/Azure.Core/src/Shared/GZipUtf8JsonRequestContent.cs b/sdk/monitor/Azure.Monitor.Ingestion/src/GZipUtf8JsonRequestContent.cs similarity index 100% rename from sdk/core/Azure.Core/src/Shared/GZipUtf8JsonRequestContent.cs rename to sdk/monitor/Azure.Monitor.Ingestion/src/GZipUtf8JsonRequestContent.cs diff --git a/sdk/core/Azure.Core/tests/GZipUtf8JsonRequestContentTests.cs b/sdk/monitor/Azure.Monitor.Ingestion/tests/GZipUtf8JsonRequestContentTests.cs similarity index 100% rename from sdk/core/Azure.Core/tests/GZipUtf8JsonRequestContentTests.cs rename to sdk/monitor/Azure.Monitor.Ingestion/tests/GZipUtf8JsonRequestContentTests.cs diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj index 2cf8caf1afcd5..3cc6e988c0baf 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj @@ -42,7 +42,6 @@ - diff --git a/sdk/core/Azure.Core/src/Shared/GuidUtilities.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/GuidUtilities.cs similarity index 100% rename from sdk/core/Azure.Core/src/Shared/GuidUtilities.cs rename to sdk/servicebus/Azure.Messaging.ServiceBus/src/GuidUtilities.cs diff --git a/sdk/core/Azure.Core/tests/GuidUtilitiesTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Core/GuidUtilitiesTests.cs similarity index 96% rename from sdk/core/Azure.Core/tests/GuidUtilitiesTests.cs rename to sdk/servicebus/Azure.Messaging.ServiceBus/tests/Core/GuidUtilitiesTests.cs index af11bede20934..622598fb21ab1 100644 --- a/sdk/core/Azure.Core/tests/GuidUtilitiesTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Core/GuidUtilitiesTests.cs @@ -5,7 +5,7 @@ using Azure.Core.Shared; using NUnit.Framework; -namespace Azure.Core.Tests; +namespace Azure.Messaging.ServiceBus.Tests; public class GuidUtilitiesTests { diff --git a/sdk/tables/Azure.Data.Tables/src/Azure.Data.Tables.csproj b/sdk/tables/Azure.Data.Tables/src/Azure.Data.Tables.csproj index 1fa7cd5172e16..3ca231af11356 100644 --- a/sdk/tables/Azure.Data.Tables/src/Azure.Data.Tables.csproj +++ b/sdk/tables/Azure.Data.Tables/src/Azure.Data.Tables.csproj @@ -17,7 +17,6 @@ - diff --git a/sdk/core/Azure.Core/src/Shared/NoValueResponseOfT.cs b/sdk/tables/Azure.Data.Tables/src/NoValueResponseOfT.cs similarity index 100% rename from sdk/core/Azure.Core/src/Shared/NoValueResponseOfT.cs rename to sdk/tables/Azure.Data.Tables/src/NoValueResponseOfT.cs diff --git a/sdk/core/Azure.Core/tests/NoValueResponseOfTTests.cs b/sdk/tables/Azure.Data.Tables/tests/NoValueResponseOfTTests.cs similarity index 100% rename from sdk/core/Azure.Core/tests/NoValueResponseOfTTests.cs rename to sdk/tables/Azure.Data.Tables/tests/NoValueResponseOfTTests.cs