From 1f801b6094006dd944109096af9dd978b65cabe5 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Thu, 3 Dec 2020 14:16:59 -0800 Subject: [PATCH 1/4] Enable multiple blank lines StyleCop rule --- eng/CodeAnalysis.ruleset | 2 +- .../tests/ConfigurationMockTests.cs | 1 - .../ConfigurationClientBenchmark.cs | 1 - .../samples/Sample2_HelloWorldExtended.cs | 1 - .../tests/samples/SampleSnippets.cs | 1 - ...pConfigurationManagementTestEnvironment.cs | 1 - ...PhoneNumberReservationPurchaseOperation.cs | 1 - .../CommunicationUserCredentialTest.cs | 1 - .../tests/Helpers/Helpers.cs | 1 - .../tests/ScenarioTests/OSProfileTests.cs | 1 - .../ProximityPlacementGroupTests.cs | 1 - .../tests/ScenarioTests/VMOperationalTests.cs | 1 - .../VMScaleSetNetworkProfileTests.cs | 1 - .../VMScaleSetRollingUpgradeTests.cs | 1 - .../VMScaleSetScenarioTests.cs | 2 - .../VMScaleSetServiceFabricScenarioTests.cs | 1 - .../VMScaleSetTests/VMScaleSetTestsBase.cs | 1 - .../VMScaleSetTests/VMScaleSetUpdateTests.cs | 2 - .../VMScaleSetVMOperationalTests.cs | 1 - .../src/DynamicJson.cs | 4 +- .../src/Spatial/GeoPosition.cs | 1 - .../tests/DynamicJsonTest.cs | 3 +- .../src/ClientTestBase.cs | 1 - .../src/TaskExtensions.cs | 1 - sdk/core/Azure.Core/generate_solution.ps1 | 46 +++++++++++++------ sdk/core/Azure.Core/src/ClientOptions.cs | 1 - .../src/Pipeline/HttpClientTransport.cs | 2 - sdk/core/Azure.Core/src/RequestHeaders.cs | 1 - .../src/Shared/Multipart/Multipart.cs | 1 - .../Azure.Core/src/TokenRequestContext.cs | 1 - .../tests/ClientRequestIdPolicyTests.cs | 1 - .../Azure.Core/tests/ClientTestBaseTests.cs | 1 - .../Azure.Core/tests/ETagConverterTests.cs | 1 - sdk/core/Azure.Core/tests/ETagTests.cs | 1 - sdk/core/Azure.Core/tests/EventSourceTests.cs | 1 - .../tests/HttpClientTransportTests.cs | 2 - .../tests/HttpPipelineFunctionalTests.cs | 1 - .../Azure.Core/tests/JsonConverterTestBase.cs | 1 - sdk/core/Azure.Core/tests/MultipartTests.cs | 2 - sdk/core/Azure.Core/tests/PipelineTests.cs | 1 - .../tests/RequestActivityPolicyTests.cs | 1 - .../tests/ResponseBodyPolicyTests.cs | 1 - sdk/core/Azure.Core/tests/ResponseTests.cs | 1 - .../tests/TransportFunctionalTests.cs | 1 - .../NewtonsoftJsonObjectSerializerTest.cs | 1 - .../MicrosoftSpatialGeoJsonConverterTests.cs | 1 - .../tests/BinaryDataTests.cs | 1 - .../GetDigitalTwinsEventRouteOptions.cs | 1 - .../tests/TestSettings.cs | 1 - .../Tests/ScenarioTests.DnsTests.RecordSet.cs | 5 -- .../tests/ConsumeEventTests.cs | 4 -- .../EventGridTestEnvironment.cs | 1 - .../src/EventGridExtensionConfigProvider.cs | 1 - .../tests/JobhostEndToEnd.cs | 1 - .../Sample04_ProcessingEventsLiveTests.cs | 1 - .../src/Processor/StorageManager.cs | 1 - .../Processor/PartitionLoadBalancerTests.cs | 1 - .../src/Core/ChannelReaderExtensions.cs | 1 - .../tests/Amqp/AmqpMessageConverterTests.cs | 1 - .../Producer/EventHubProducerClientTests.cs | 2 - .../src/Config/EventHubOptions.cs | 1 - .../src/Listeners/EventHubsScaleMonitor.cs | 1 - .../src/Utility.cs | 1 - .../tests/EventHubEndToEndTests.cs | 1 - .../src/KeyVaultSecretManager.cs | 1 - .../src/Properties/AssemblyInfo.cs | 3 +- .../tests/AzureKeyVaultConfigurationTests.cs | 1 - .../tests/Snippets.cs | 3 +- .../tests/shared/TestHelpers.cs | 3 -- .../src/Internal/ClientFactory.cs | 1 - .../src/Internal/ClientRegistration.cs | 1 - .../tests/LogForwarderTests.cs | 1 - .../src/CreateComposedModelOperation.cs | 1 - .../src/FormRecognizerClient.cs | 1 - .../src/FormRecognizerModelFactory.cs | 1 - .../src/FormTrainingClient.cs | 1 - .../tests/samples/Sample8_CopyModel.cs | 1 - .../src/AuthenticationRecord.cs | 1 - .../src/AzureArcManagedIdentitySource.cs | 1 - sdk/identity/Azure.Identity/src/Base64Url.cs | 1 - .../src/ClientCertificateCredential.cs | 1 - .../src/DefaultAzureCredentialOptions.cs | 1 - .../src/EnvironmentCredential.cs | 1 - sdk/identity/Azure.Identity/src/TokenCache.cs | 2 - .../src/UsernamePasswordCredential.cs | 1 - .../src/VisualStudioCredential.cs | 1 - .../tests/DeviceCodeCredentialTests.cs | 2 - .../InteractiveBrowserCredentialLiveTests.cs | 2 - .../InteractiveBrowserCredentialTests.cs | 1 - .../ManagedIdentityCredentialArcLiveTests.cs | 1 - .../Azure.Identity/tests/Mock/MockToken.cs | 2 - .../tests/SharedTokenCacheCredentialTests.cs | 3 -- .../tests/UsernamePasswordCredentialTests.cs | 1 - .../samples/UserAuthenticationSnippets.cs | 2 - .../tests/BasicTests/ActivityLogsTest.cs | 1 - .../ServiceDiagnosticSettingsTests.cs | 1 - .../BasicTests/TenantActivityLogsTest.cs | 1 - .../InsightsManagementClientMockedBase.cs | 1 - .../src/IotHubServiceClientOptions.cs | 1 - .../tests/TestSettings.cs | 1 - .../tests/VaultOperationsTests.cs | 1 - .../tests/VaultOperationsTestsBase.cs | 1 - .../src/KeyVaultAdministrationModelFactory.cs | 1 - .../src/RestoreOperationParameters.cs | 1 - .../tests/AdministrationTestBase.cs | 1 - .../tests/CertificatePolicyTests.cs | 1 - .../src/KeyClient.cs | 1 - .../tests/LocalCryptographyClientTests.cs | 4 -- .../tests/SecretClientLiveTests.cs | 1 - .../tests/TestFramework/MockRequest.cs | 1 - .../tests/TestFramework/TaskExtensions.cs | 1 - .../TagObjectsGetValuesBenchmarks.cs | 1 - .../OpenTelemetryTests.cs | 1 - .../NetworkTestsManagementClientBase.cs | 2 - .../tests/Tests/GatewayOperationsTests.cs | 1 - .../InMemoryTests/FeatureTests.InMemory.cs | 1 - .../InMemoryTests/ProviderTests.InMemory.cs | 1 - .../InMemoryTests/ResourceTests.InMemory.cs | 2 - .../ScenarioTests/TagTests.ScenarioTests.cs | 1 - .../src/Indexes/Models/SearchField.cs | 1 - .../src/Indexes/SearchIndexerClient.cs | 1 - .../src/SearchClientBuilderExtensions.cs | 1 - .../DocumentOperations/GetDocumentTests.cs | 1 - .../Administration/HttpRequestAndResponse.cs | 1 - .../src/Administration/TopicProperties.cs | 1 - .../src/Core/TransportClient.cs | 2 - .../src/Primitives/ServiceBusRetryPolicy.cs | 1 - .../src/Sender/ServiceBusSender.cs | 2 - .../ServiceBusManagementClientLiveTests.cs | 1 - .../tests/Amqp/AmqpReceiverTests.cs | 2 - .../tests/Diagnostics/EventSourceLiveTests.cs | 1 - .../tests/Diagnostics/EventSourceTests.cs | 1 - .../tests/Message/MessageLiveTests.cs | 2 - .../Processor/SessionProcessorLiveTests.cs | 1 - .../tests/Samples/Sample07_CrudOperations.cs | 1 - .../tests/Tests/BlobServiceTests.cs | 4 -- .../tests/Tests/StorageAccountTests.cs | 1 - .../samples/Sample02_Auth.cs | 1 - .../tests/BlobChangeFeedAsyncPagableTests.cs | 2 - .../tests/BlobChangeFeedExtensionsTests.cs | 1 - .../tests/ChunkTests.cs | 1 - .../tests/ShardTests.cs | 1 - .../samples/Sample01a_HelloWorld.cs | 2 - .../src/BlobQuickQueryStream.cs | 2 - .../src/Models/BlobContainerStates.cs | 1 - .../src/Models/CommitBlockListOptions.cs | 1 - .../src/PartitionedDownloader.cs | 1 - .../tests/AppendBlobClientTests.cs | 1 - .../tests/BlobBaseClientTests.cs | 10 ---- .../tests/BlobClientTests.cs | 1 - .../tests/BlobQuickQueryTests.cs | 1 - .../Azure.Storage.Blobs/tests/BlobTestBase.cs | 1 - .../tests/BlobUriBuilderTests.cs | 1 - .../tests/BlockBlobClientTests.cs | 3 -- .../tests/ContainerClientTests.cs | 3 -- .../tests/PageBlobClientTests.cs | 1 - .../tests/PartitionedUploaderTests.cs | 1 - .../tests/ServiceClientTests.cs | 1 - .../src/Sas/SasQueryParameters.cs | 1 - .../ClientSideDecryptor.cs | 1 - .../src/Shared/StorageConnectionString.cs | 1 - .../tests/PartitionedUploaderTests.cs | 1 - .../tests/PooledMemoryStreamTests.cs | 1 - .../tests/Shared/TestProgress.cs | 1 - .../tests/StorageConnectionStringTests.cs | 4 -- .../tests/StorageWriteStreamTests.cs | 1 - .../samples/Sample01a_HelloWorld.cs | 1 - .../samples/Sample01b_HelloWorldAsync.cs | 1 - .../src/DataLakeDirectoryClient.cs | 1 - .../src/DataLakeFileClient.cs | 1 - .../src/DataLakeFileSystemClient.cs | 3 -- .../src/DataLakePathClient.cs | 2 - .../src/Models/DataLakeAccessPolicy.cs | 1 - .../tests/DataLakeTestBase.cs | 2 - .../tests/DirectoryClientTests.cs | 2 - .../tests/FileClientTests.cs | 6 --- .../tests/PathAccessControlExtensionsTests.cs | 1 - .../src/Models/ShareFileDownloadDetails.cs | 1 - .../src/Models/ShareStatistics.cs | 1 - .../src/ShareClient.cs | 1 - .../src/ShareFileClient.cs | 3 -- .../tests/DirectoryClientTests.cs | 2 - .../tests/FileClientTests.cs | 6 --- .../tests/ShareClientTests.cs | 2 - .../src/AvroReader.cs | 1 - .../tests/QueueClientTests.cs | 1 - .../samples/BlobExtensionSamples.cs | 1 - .../src/BlobPath.cs | 1 - .../src/Listeners/ScanContainersStrategy.cs | 1 - .../RequestFailedExceptionExtensions.Blobs.cs | 2 - .../src/StorageLoadBalancerQueue.cs | 1 - .../tests/BlobConfigurationTests.cs | 1 - .../tests/BlobPathSourceTests.cs | 1 - .../tests/BlobTriggerTests.cs | 1 - .../Listeners/BlobTriggerExecutorTests.cs | 1 - ...anBlobScanLogHybridPollingStrategyTests.cs | 1 - .../samples/QueueExtensionSamples.cs | 1 - .../tests/DataBindingFunctionalTests.cs | 1 - .../tests/HostStartTests.cs | 1 - .../tests/QueueProcessorTests.cs | 1 - .../tests/QueueTriggerTests.cs | 2 - .../tests/BlobBindingEndToEndTests.cs | 1 - .../tests/BlobTriggerEndToEndTests.cs | 2 - .../MultipleStorageAccountsEndToEndTests.cs | 2 - .../tests/SynapseTestEnvironment.cs | 1 - .../src/Queryable/ClientConvert.cs | 1 - .../src/Sas/TableSasQueryParameters.cs | 1 - .../Azure.Data.Tables/src/TableClient.cs | 1 - .../src/TableConnectionString.cs | 1 - .../tests/TableClientLiveTests.cs | 1 - .../tests/TableClientQueryableLiveTests.cs | 15 ------ .../tests/TableServiceLiveTestsBase.cs | 1 - .../src/AnalyzeOperation.cs | 1 - .../src/HealthcareOperation.cs | 1 - .../src/TextAnalyticsClient.cs | 1 - .../tests/RecognizeHealthcareEntitiesTests.cs | 1 - .../tests/TestSettings.cs | 1 - 217 files changed, 37 insertions(+), 325 deletions(-) diff --git a/eng/CodeAnalysis.ruleset b/eng/CodeAnalysis.ruleset index 2ebb3f39641b2..d8c59552e649b 100644 --- a/eng/CodeAnalysis.ruleset +++ b/eng/CodeAnalysis.ruleset @@ -144,7 +144,7 @@ - + diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationMockTests.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationMockTests.cs index ef39bf5b205d4..91d91a02493f0 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationMockTests.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationMockTests.cs @@ -814,7 +814,6 @@ public async Task CustomHeadersAreAddedOnceWithRetries() Assert.AreEqual(1, correlationContexts.Count()); } - private void AssertContent(byte[] expected, MockRequest request, bool compareAsString = true) { using (var stream = new MemoryStream()) diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/Performance/ConfigurationClientBenchmark.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/Performance/ConfigurationClientBenchmark.cs index 4a91ebf2382ab..994b94420e1cb 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/Performance/ConfigurationClientBenchmark.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/Performance/ConfigurationClientBenchmark.cs @@ -48,7 +48,6 @@ public async Task GetAsync() await s_configurationClient.GetConfigurationSettingAsync("key"); } - private class MockClientHandler : HttpClientHandler { private readonly Func _responseMessage; diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/samples/Sample2_HelloWorldExtended.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/samples/Sample2_HelloWorldExtended.cs index 049c744b58ea7..d2af80c18fdb7 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/samples/Sample2_HelloWorldExtended.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/samples/Sample2_HelloWorldExtended.cs @@ -45,7 +45,6 @@ public async Task HelloWorldExtended() await client.SetConfigurationSettingAsync(instancesToUpdate); #endregion - #region Snippet:AzConfigSample2_GetConfigurationSettingsAsync var selector = new SettingSelector { LabelFilter = "production" }; diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/samples/SampleSnippets.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/samples/SampleSnippets.cs index a08e2efd5fc99..bd76083dc0333 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/samples/SampleSnippets.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/samples/SampleSnippets.cs @@ -58,7 +58,6 @@ public void GetSetting() var setupClient = new ConfigurationClient(connectionString); setupClient.SetConfigurationSetting("some_key", "some_value"); - #region Snippet:GetConfigurationSetting //@@ string connectionString = ""; var client = new ConfigurationClient(connectionString); diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/tests/AppConfigurationManagementTestEnvironment.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/tests/AppConfigurationManagementTestEnvironment.cs index 3b4776587b379..90c740a054158 100644 --- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/tests/AppConfigurationManagementTestEnvironment.cs +++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/tests/AppConfigurationManagementTestEnvironment.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - using Azure.Core.TestFramework; namespace Azure.ResourceManager.AppConfiguration.Tests diff --git a/sdk/communication/Azure.Communication.Administration/src/Models/PhoneNumberReservationPurchaseOperation.cs b/sdk/communication/Azure.Communication.Administration/src/Models/PhoneNumberReservationPurchaseOperation.cs index d055759f61d0f..14b3c247d5fe5 100644 --- a/sdk/communication/Azure.Communication.Administration/src/Models/PhoneNumberReservationPurchaseOperation.cs +++ b/sdk/communication/Azure.Communication.Administration/src/Models/PhoneNumberReservationPurchaseOperation.cs @@ -168,7 +168,6 @@ public override ValueTask> WaitForCompletionAsync(Ca public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken) => this.DefaultWaitForCompletionAsync(pollingInterval, cancellationToken); - private static string GetErrorMessage(ReservationStatus? reservationStatus) { if (reservationStatus == ReservationStatus.Cancelled) diff --git a/sdk/communication/Azure.Communication.Common/tests/Identity/CommunicationUserCredentialTest.cs b/sdk/communication/Azure.Communication.Common/tests/Identity/CommunicationUserCredentialTest.cs index 7dea1a8687372..f1114d21fea20 100644 --- a/sdk/communication/Azure.Communication.Common/tests/Identity/CommunicationUserCredentialTest.cs +++ b/sdk/communication/Azure.Communication.Common/tests/Identity/CommunicationUserCredentialTest.cs @@ -99,7 +99,6 @@ public void CommunicationUserCredential_ThrowsIfInvalidToken(string token) public void CommunicationUserCredential_ThrowsIfTokenIsNull() => Assert.Throws(() => new CommunicationUserCredential(null!)); - [Test] [TestCase(false)] [TestCase(true)] diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/Helpers/Helpers.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/Helpers/Helpers.cs index 0d3267812dfb2..fda7f9f57553c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/Helpers/Helpers.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/Helpers/Helpers.cs @@ -94,7 +94,6 @@ private static List GetExpectedVirtualMachineSize(bool hasAZ expectedVMSizePropertiesList.Add(new VirtualMachineSize(VirtualMachineSizeTypes.StandardA1.ToString(),1,130048,71680, 1792, 2)); } - return expectedVMSizePropertiesList; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/OSProfileTests.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/OSProfileTests.cs index 0177edcabcd2d..3e1dd9c68c01e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/OSProfileTests.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/OSProfileTests.cs @@ -291,7 +291,6 @@ private async Task TestVMWithOSProfile( await WaitForCompletionAsync(await VirtualMachinesOperations.StartDeleteAsync(rgName, vm.Name)); } - //Not used public static string ReadFromEmbeddedResource(Type type, string resourceName) { diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/ProximityPlacementGroupTests.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/ProximityPlacementGroupTests.cs index 5b9576acef75d..057b9ac143fd1 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/ProximityPlacementGroupTests.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/ProximityPlacementGroupTests.cs @@ -12,7 +12,6 @@ using Azure.ResourceManager.Resources.Models; using NUnit.Framework; - namespace Azure.ResourceManager.Compute.Tests { [AsyncOnly] diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMOperationalTests.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMOperationalTests.cs index f58e309c5a5c9..67803125b0196 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMOperationalTests.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMOperationalTests.cs @@ -361,7 +361,6 @@ public async Task TestVMOperations_SimulateEviction() VirtualMachine vm1 = returnTwoVM.Item1; inputVM1 = returnTwoVM.Item2; - await VirtualMachinesOperations.SimulateEvictionAsync(rg1Name, vm1.Name); passed = true; Assert.True(passed); diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetNetworkProfileTests.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetNetworkProfileTests.cs index ac1bdac0e98be..4430d7b40f5ab 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetNetworkProfileTests.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetNetworkProfileTests.cs @@ -207,7 +207,6 @@ public async Task TestVMScaleSetWithPublicIPAndIPTags() publicipConfiguration.IpTags.Add(new VirtualMachineScaleSetIpTag("FirstPartyUsage", "/Sql")); - var getTwoVirtualMachineScaleSet = await CreateVMScaleSet_NoAsyncTracking( rgName: rgName, vmssName: vmssName, diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetRollingUpgradeTests.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetRollingUpgradeTests.cs index 6a131bbcf979f..97e2364ff3c15 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetRollingUpgradeTests.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetRollingUpgradeTests.cs @@ -10,7 +10,6 @@ using Azure.ResourceManager.Resources; using NUnit.Framework; - namespace Azure.ResourceManager.Compute.Tests { public class VMScaleSetRollingUpgradeTests : VMScaleSetTestsBase diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetScenarioTests.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetScenarioTests.cs index 9a914d1ea139e..153e9006e1ef8 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetScenarioTests.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetScenarioTests.cs @@ -285,7 +285,6 @@ public async Task TestVMScaleSetScenarioOperations_OrchestrationService() Assert.AreEqual("Running", getInstanceViewResponse.OrchestrationServices[0].ServiceState.ToString()); Assert.AreEqual("AutomaticRepairs", getInstanceViewResponse.OrchestrationServices[0].ServiceName.ToString()); - ////TODO OrchestrationServiceStateInput orchestrationServiceStateInput = new OrchestrationServiceStateInput(OrchestrationServiceNames.AutomaticRepairs, OrchestrationServiceStateAction.Suspend); //OrchestrationServiceStateAction orchestrationServiceStateAction = new OrchestrationServiceStateAction(); @@ -302,7 +301,6 @@ public async Task TestVMScaleSetScenarioOperations_OrchestrationService() await WaitForCompletionAsync(await VirtualMachineScaleSetsOperations.StartDeleteAsync(rgName, vmssName)); } - private async Task TestScaleSetOperationsInternal(string vmSize = null, bool hasManagedDisks = false, bool useVmssExtension = true, bool hasDiffDisks = false, IList zones = null, int? osDiskSizeInGB = null, bool isPpgScenario = false, bool? enableUltraSSD = false, Action vmScaleSetCustomizer = null, Action vmScaleSetValidator = null, string diskEncryptionSetId = null) diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetServiceFabricScenarioTests.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetServiceFabricScenarioTests.cs index 4faeb02a411ce..558eb19dcf12f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetServiceFabricScenarioTests.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetServiceFabricScenarioTests.cs @@ -5,7 +5,6 @@ using NUnit.Framework; - namespace Azure.ResourceManager.Compute.Tests { public class VMScaleSetServiceFabricScenarioTests : VMScaleSetTestsBase diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetTestsBase.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetTestsBase.cs index 2670d6a401da4..10161121aec0a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetTestsBase.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetTestsBase.cs @@ -437,7 +437,6 @@ protected async Task PatchVMScaleSet(string rgName, string vmssName, VirtualMach return (createOrUpdateResponse, inputVMScaleSet); } - protected void ValidateVMScaleSetInstanceView(VirtualMachineScaleSet vmScaleSet, VirtualMachineScaleSetInstanceView vmScaleSetInstanceView) { diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetUpdateTests.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetUpdateTests.cs index 6b3769c08e1aa..55895331afc6a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetUpdateTests.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetUpdateTests.cs @@ -42,7 +42,6 @@ public async Task TestVMScaleSetScalingOperations() await WaitForCompletionAsync(await VirtualMachineScaleSetsOperations.StartDeleteAsync(rgName, "VMScaleSetDoesNotExist")); - var getTwoVirtualMachineScaleSet = await CreateVMScaleSet_NoAsyncTracking(rgName, vmssName, storageAccountOutput, imageRef); VirtualMachineScaleSet vmScaleSet = getTwoVirtualMachineScaleSet.Item1; inputVMScaleSet = getTwoVirtualMachineScaleSet.Item2; @@ -171,7 +170,6 @@ public async Task TestVMScaleSetPatchOperations() getResponse = await VirtualMachineScaleSetsOperations.GetAsync(rgName, vmScaleSet.Name); ValidateVMScaleSet(inputVMScaleSet, getResponse); - // Scaling the VMScaleSet now to 3 instances VirtualMachineScaleSetUpdate patchVMScaleSet2 = new VirtualMachineScaleSetUpdate() { diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetVMOperationalTests.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetVMOperationalTests.cs index 9e837b5cd5045..a014df97aeb9d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetVMOperationalTests.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetVMOperationalTests.cs @@ -297,7 +297,6 @@ private async Task AttachDataDiskToVMScaleSetVM(VirtualMachineScaleSetVM vmssVM, var disk = await CreateDataDisk(diskName); - var dd = new DataDisk(lun, DiskCreateOptionTypes.Attach) { Name = diskName, diff --git a/sdk/core/Azure.Core.Experimental/src/DynamicJson.cs b/sdk/core/Azure.Core.Experimental/src/DynamicJson.cs index 71a0ad4288d54..3426c8dff1355 100644 --- a/sdk/core/Azure.Core.Experimental/src/DynamicJson.cs +++ b/sdk/core/Azure.Core.Experimental/src/DynamicJson.cs @@ -371,7 +371,6 @@ public override DynamicMetaObject BindSetMember(SetMemberBinder binder, DynamicM } } - /// /// /// @@ -445,7 +444,6 @@ public static DynamicJson Array(params DynamicJson[] values) public static explicit operator float(DynamicJson json) => json.GetFloat(); public static explicit operator double(DynamicJson json) => json.GetDouble(); - public static explicit operator bool?(DynamicJson json) => json._kind == JsonValueKind.Null ? (bool?)null : json.GetBoolean(); public static explicit operator int?(DynamicJson json) => json._kind == JsonValueKind.Null ? (int?)null : json.GetIn32(); public static explicit operator long?(DynamicJson json) => json._kind == JsonValueKind.Null ? (long?)null : json.GetLong(); @@ -587,4 +585,4 @@ public double AsDouble() } } -} \ No newline at end of file +} diff --git a/sdk/core/Azure.Core.Experimental/src/Spatial/GeoPosition.cs b/sdk/core/Azure.Core.Experimental/src/Spatial/GeoPosition.cs index e550ffd64bf12..eeb0d192001ff 100644 --- a/sdk/core/Azure.Core.Experimental/src/Spatial/GeoPosition.cs +++ b/sdk/core/Azure.Core.Experimental/src/Spatial/GeoPosition.cs @@ -47,7 +47,6 @@ public GeoPosition(double longitude, double latitude, double? altitude) Altitude = altitude; } - /// public bool Equals(GeoPosition other) { diff --git a/sdk/core/Azure.Core.Experimental/tests/DynamicJsonTest.cs b/sdk/core/Azure.Core.Experimental/tests/DynamicJsonTest.cs index e9d3adbd54cc9..7110759165547 100644 --- a/sdk/core/Azure.Core.Experimental/tests/DynamicJsonTest.cs +++ b/sdk/core/Azure.Core.Experimental/tests/DynamicJsonTest.cs @@ -159,7 +159,6 @@ public void FloatUnderflowThrows() Assert.AreEqual(-34028234663852885981170418348451692544000d, (double)json); } - [Test] public void IntOverflowThrows() { @@ -212,4 +211,4 @@ protected DynamicJsonSubclass(JsonElement element) : base(element) } } } -} \ No newline at end of file +} diff --git a/sdk/core/Azure.Core.TestFramework/src/ClientTestBase.cs b/sdk/core/Azure.Core.TestFramework/src/ClientTestBase.cs index e592fa01be026..7115ceba24f40 100644 --- a/sdk/core/Azure.Core.TestFramework/src/ClientTestBase.cs +++ b/sdk/core/Azure.Core.TestFramework/src/ClientTestBase.cs @@ -59,7 +59,6 @@ internal object InstrumentClient(Type clientType, object client, IEnumerable TimeoutAfter(this Task task, TimeSpan timeout, [CallerFilePath] string filePath = null, [CallerLineNumber] int lineNumber = default) diff --git a/sdk/core/Azure.Core/generate_solution.ps1 b/sdk/core/Azure.Core/generate_solution.ps1 index e1c459077a01e..33a8a73aad5f2 100644 --- a/sdk/core/Azure.Core/generate_solution.ps1 +++ b/sdk/core/Azure.Core/generate_solution.ps1 @@ -1,21 +1,39 @@ +Set-StrictMode -Version Latest + $RepoRoot = Resolve-Path $PSScriptRoot\..\..\.. $ObjDirectory = "$RepoRoot\artifacts\obj"; -dotnet restore $RepoRoot\eng\service.proj +#dotnet restore $RepoRoot\eng\service.proj -$slnName = "Azure.Core.All.sln"; -if (!(Test-Path $slnName)) -{ - dotnet new sln -n "Azure.Core.All" -} -foreach ($projectName in Get-ChildItem -Directory $ObjDirectory) -{ - Write-Host "Processing $projectName\project.assets.json" - $assets = Get-Content -Raw $projectName\project.assets.json; +pushd $PSScriptRoot - if (($projectName.Name.StartsWith("Azure.")) -or ($assets -Match "Azure.Core")) +try +{ + $slnName = "Azure.Core.All.sln"; + if (!(Test-Path $slnName)) { - $assetsJson = ConvertFrom-Json $assets; - $projectPath = $assetsJson.project.restore.projectPath; - dotnet sln $slnName add $projectPath + dotnet new sln -n "Azure.Core.All" + } + $projects = Get-ChildItem -Directory $ObjDirectory | %{ + $assetsFile = "$_\project.assets.json" + + if (!(Test-Path $assetsFile)) + { + return; + } + + Write-Host "Processing $assetsFile" + $assets = Get-Content -Raw $assetsFile; + + if (($_.Name.StartsWith("Azure.")) -or ($assets -Match "Azure.Core")) + { + $assetsJson = ConvertFrom-Json $assets; + return $assetsJson.project.restore.projectPath; + } } + + dotnet sln $slnName add $projects +} +finally +{ + popd } \ No newline at end of file diff --git a/sdk/core/Azure.Core/src/ClientOptions.cs b/sdk/core/Azure.Core/src/ClientOptions.cs index 5a2858de25ac1..0bd9bbf0a53df 100644 --- a/sdk/core/Azure.Core/src/ClientOptions.cs +++ b/sdk/core/Azure.Core/src/ClientOptions.cs @@ -81,7 +81,6 @@ public void AddPolicy(HttpPipelinePolicy policy, HttpPipelinePosition position) [EditorBrowsable(EditorBrowsableState.Never)] public override string? ToString() => base.ToString(); - private static HttpPipelineTransport GetDefaultTransport() { #if NETFRAMEWORK diff --git a/sdk/core/Azure.Core/src/Pipeline/HttpClientTransport.cs b/sdk/core/Azure.Core/src/Pipeline/HttpClientTransport.cs index b64040657720c..a0db29126669b 100644 --- a/sdk/core/Azure.Core/src/Pipeline/HttpClientTransport.cs +++ b/sdk/core/Azure.Core/src/Pipeline/HttpClientTransport.cs @@ -108,7 +108,6 @@ private async Task ProcessAsync(HttpMessage message, bool async) contentStream = await responseMessage.Content.ReadAsStreamAsync().ConfigureAwait(false); #endif - } } catch (HttpRequestException e) @@ -288,7 +287,6 @@ public HttpRequestMessage BuildRequestMessage(CancellationToken cancellation) currentRequest.RequestUri = Uri.ToUri(); - if (Content != null) { PipelineContentAdapter currentContent; diff --git a/sdk/core/Azure.Core/src/RequestHeaders.cs b/sdk/core/Azure.Core/src/RequestHeaders.cs index bb72f9b64fc8d..9e47315d7a6b1 100644 --- a/sdk/core/Azure.Core/src/RequestHeaders.cs +++ b/sdk/core/Azure.Core/src/RequestHeaders.cs @@ -78,7 +78,6 @@ public bool TryGetValues(string name, [NotNullWhen(true)] out IEnumerable /// Returns true if the headers is stored in the collection. /// diff --git a/sdk/core/Azure.Core/src/Shared/Multipart/Multipart.cs b/sdk/core/Azure.Core/src/Shared/Multipart/Multipart.cs index a6aae7d3926b0..af0354eccd0da 100644 --- a/sdk/core/Azure.Core/src/Shared/Multipart/Multipart.cs +++ b/sdk/core/Azure.Core/src/Shared/Multipart/Multipart.cs @@ -169,7 +169,6 @@ internal static async Task ParseAsync( return ordered; } - /// /// Read the next line of text. /// diff --git a/sdk/core/Azure.Core/src/TokenRequestContext.cs b/sdk/core/Azure.Core/src/TokenRequestContext.cs index fc023cfa1739d..5ce510582c10f 100644 --- a/sdk/core/Azure.Core/src/TokenRequestContext.cs +++ b/sdk/core/Azure.Core/src/TokenRequestContext.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - namespace Azure.Core { /// diff --git a/sdk/core/Azure.Core/tests/ClientRequestIdPolicyTests.cs b/sdk/core/Azure.Core/tests/ClientRequestIdPolicyTests.cs index 375a0d7577217..7d7c2e3222e20 100644 --- a/sdk/core/Azure.Core/tests/ClientRequestIdPolicyTests.cs +++ b/sdk/core/Azure.Core/tests/ClientRequestIdPolicyTests.cs @@ -72,7 +72,6 @@ public async Task ReadsRequestIdValueOfNestedScope() { var transport = new MockTransport(r => new MockResponse(200)); - using (HttpPipeline.CreateClientRequestIdScope("custom-id")) using (HttpPipeline.CreateClientRequestIdScope("nested-custom-id")) { diff --git a/sdk/core/Azure.Core/tests/ClientTestBaseTests.cs b/sdk/core/Azure.Core/tests/ClientTestBaseTests.cs index 4e06f14b3029f..c19ec208c209e 100644 --- a/sdk/core/Azure.Core/tests/ClientTestBaseTests.cs +++ b/sdk/core/Azure.Core/tests/ClientTestBaseTests.cs @@ -267,7 +267,6 @@ public virtual TestClient GetAnotherTestClient() } public virtual Operations SubProperty => new Operations(); - public virtual string MethodA() { using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(TestClient)}.{nameof(MethodA)}"); diff --git a/sdk/core/Azure.Core/tests/ETagConverterTests.cs b/sdk/core/Azure.Core/tests/ETagConverterTests.cs index bf0231cdc7dd8..e93d160cd7057 100644 --- a/sdk/core/Azure.Core/tests/ETagConverterTests.cs +++ b/sdk/core/Azure.Core/tests/ETagConverterTests.cs @@ -57,7 +57,6 @@ public void CanSerializeAndDeserializeNullableETag(string value) Assert.AreEqual(expected, serialized); } - private class ClassWithEtagProperty { public ETag ETag { get; set; } diff --git a/sdk/core/Azure.Core/tests/ETagTests.cs b/sdk/core/Azure.Core/tests/ETagTests.cs index 47b155cfeb352..692b2db4ceb72 100644 --- a/sdk/core/Azure.Core/tests/ETagTests.cs +++ b/sdk/core/Azure.Core/tests/ETagTests.cs @@ -69,7 +69,6 @@ public void EqualityMembersNonDefault() Assert.False(eTag.Equals((object)new ETag("A"))); } - [Test] public void EqualityMembersDefault() { diff --git a/sdk/core/Azure.Core/tests/EventSourceTests.cs b/sdk/core/Azure.Core/tests/EventSourceTests.cs index cf5e973ac1659..14d1596bf7583 100644 --- a/sdk/core/Azure.Core/tests/EventSourceTests.cs +++ b/sdk/core/Azure.Core/tests/EventSourceTests.cs @@ -303,7 +303,6 @@ await SendRequestAsync(pipeline, request => AssertNoContentLogged(); } - [Test] public async Task RequestContentIsNotLoggedWhenDisabled() { diff --git a/sdk/core/Azure.Core/tests/HttpClientTransportTests.cs b/sdk/core/Azure.Core/tests/HttpClientTransportTests.cs index 9f1732dde68be..12e03aa918ca3 100644 --- a/sdk/core/Azure.Core/tests/HttpClientTransportTests.cs +++ b/sdk/core/Azure.Core/tests/HttpClientTransportTests.cs @@ -71,7 +71,6 @@ public async Task CanGetAndSetUri() Assert.AreEqual(expectedUri, requestUri); } - public static object[] HeadersWithValuesAndType => new object[] { @@ -147,7 +146,6 @@ public async Task SettingContentStreamPreservesHeaders(string headerName, string CollectionAssert.Contains(response.Headers, new HttpHeader(headerName, headerValue)); } - private static Request CreateRequest(HttpClientTransport transport, byte[] bytes = null) { Request request = transport.CreateRequest(); diff --git a/sdk/core/Azure.Core/tests/HttpPipelineFunctionalTests.cs b/sdk/core/Azure.Core/tests/HttpPipelineFunctionalTests.cs index 214d891927b8a..5b676142976b4 100644 --- a/sdk/core/Azure.Core/tests/HttpPipelineFunctionalTests.cs +++ b/sdk/core/Azure.Core/tests/HttpPipelineFunctionalTests.cs @@ -103,7 +103,6 @@ public async Task NonBufferedExtractedStreamReadableAfterMessageDisposed() } } - [Test] public async Task NonBufferedFailedResponsesAreDisposedOf() { diff --git a/sdk/core/Azure.Core/tests/JsonConverterTestBase.cs b/sdk/core/Azure.Core/tests/JsonConverterTestBase.cs index e741cccfc53fb..6baf2cae3fda2 100644 --- a/sdk/core/Azure.Core/tests/JsonConverterTestBase.cs +++ b/sdk/core/Azure.Core/tests/JsonConverterTestBase.cs @@ -29,7 +29,6 @@ public enum JsonSerializerType NewtonsoftJson } - protected string Serialize(T o) { return Serializer switch diff --git a/sdk/core/Azure.Core/tests/MultipartTests.cs b/sdk/core/Azure.Core/tests/MultipartTests.cs index 7edbbcf45b3dc..ca7e3b37d0d57 100644 --- a/sdk/core/Azure.Core/tests/MultipartTests.cs +++ b/sdk/core/Azure.Core/tests/MultipartTests.cs @@ -98,7 +98,6 @@ public class MultipartTests "--batchresponse_6040fee7-a2b8-4e78-a674-02086369606a--\n" + ""; - [Test] [TestCase(TablesOdataBatchResponse)] [TestCase(CosmosTableBatchOdataResponse)] @@ -230,7 +229,6 @@ public async Task SendMultipartData() string requestBody = sr.ReadToEnd(); Console.WriteLine(requestBody); - Assert.That(requestBody, Is.EqualTo($"--batch_{batchGuid}\r\n" + $"{HttpHeader.Names.ContentType}: multipart/mixed; boundary=changeset_{changesetGuid}\r\n" + $"\r\n" + diff --git a/sdk/core/Azure.Core/tests/PipelineTests.cs b/sdk/core/Azure.Core/tests/PipelineTests.cs index 5381f6e392ff5..69fb3f6fc48a9 100644 --- a/sdk/core/Azure.Core/tests/PipelineTests.cs +++ b/sdk/core/Azure.Core/tests/PipelineTests.cs @@ -55,7 +55,6 @@ public void TryGetPropertyIsCaseSensitive() HttpMessage message = new HttpMessage(new MockRequest(), new ResponseClassifier()); message.SetProperty("someName", "value"); - Assert.False(message.TryGetProperty("SomeName", out _)); } diff --git a/sdk/core/Azure.Core/tests/RequestActivityPolicyTests.cs b/sdk/core/Azure.Core/tests/RequestActivityPolicyTests.cs index b2bed85e8684c..bf24bb2e1a4b6 100644 --- a/sdk/core/Azure.Core/tests/RequestActivityPolicyTests.cs +++ b/sdk/core/Azure.Core/tests/RequestActivityPolicyTests.cs @@ -64,7 +64,6 @@ public async Task ActivityIsCreatedForRequest() CollectionAssert.Contains(activity.Tags, new KeyValuePair("az.namespace", "Microsoft.Azure.Core.Cool.Tests")); } - [Test] [NonParallelizable] public void ActivityShouldBeStoppedWhenTransportThrows() diff --git a/sdk/core/Azure.Core/tests/ResponseBodyPolicyTests.cs b/sdk/core/Azure.Core/tests/ResponseBodyPolicyTests.cs index fdd22e248c7ea..8bf390aa0e50f 100644 --- a/sdk/core/Azure.Core/tests/ResponseBodyPolicyTests.cs +++ b/sdk/core/Azure.Core/tests/ResponseBodyPolicyTests.cs @@ -244,7 +244,6 @@ public override int Read(byte[] buffer, int offset, int count) return left; } - public override void Close() { IsClosed = true; diff --git a/sdk/core/Azure.Core/tests/ResponseTests.cs b/sdk/core/Azure.Core/tests/ResponseTests.cs index 8e4a5f03585b2..76209ba10d26d 100644 --- a/sdk/core/Azure.Core/tests/ResponseTests.cs +++ b/sdk/core/Azure.Core/tests/ResponseTests.cs @@ -87,7 +87,6 @@ public void ToStringsFormatsStatusAndMessageForNoBodyResponse() Assert.AreEqual("Status: 200, Service returned no content", response.ToString()); } - internal class TestPayload { public string Name { get; } diff --git a/sdk/core/Azure.Core/tests/TransportFunctionalTests.cs b/sdk/core/Azure.Core/tests/TransportFunctionalTests.cs index 88375603d9f44..ffeb19dcb0105 100644 --- a/sdk/core/Azure.Core/tests/TransportFunctionalTests.cs +++ b/sdk/core/Azure.Core/tests/TransportFunctionalTests.cs @@ -68,7 +68,6 @@ public async Task ContentLengthIsSetForArrayContent(RequestContent content, int Assert.AreEqual(expectedLength, contentLength); } - [Test] public async Task SettingHeaderOverridesDefaultContentLength() { diff --git a/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/tests/NewtonsoftJsonObjectSerializerTest.cs b/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/tests/NewtonsoftJsonObjectSerializerTest.cs index 36a02b5c58be8..71bea3435735d 100644 --- a/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/tests/NewtonsoftJsonObjectSerializerTest.cs +++ b/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/tests/NewtonsoftJsonObjectSerializerTest.cs @@ -44,7 +44,6 @@ public NewtonsoftJsonObjectSerializerTest(bool camelCase) private string SerializedName(string name) => _resolver.GetResolvedPropertyName(name); - [Test] public void ConstructorRequiresArgument() { diff --git a/sdk/core/Microsoft.Azure.Core.Spatial/tests/Serialization/MicrosoftSpatialGeoJsonConverterTests.cs b/sdk/core/Microsoft.Azure.Core.Spatial/tests/Serialization/MicrosoftSpatialGeoJsonConverterTests.cs index e9272e175845f..f4e06652e6895 100644 --- a/sdk/core/Microsoft.Azure.Core.Spatial/tests/Serialization/MicrosoftSpatialGeoJsonConverterTests.cs +++ b/sdk/core/Microsoft.Azure.Core.Spatial/tests/Serialization/MicrosoftSpatialGeoJsonConverterTests.cs @@ -120,7 +120,6 @@ public void Write() StringAssert.IsMatch(@"\{""type\"":""Point"",""coordinates"":\[-121\.72690\d+,46\.87996\d+\]\}", json); } - [Test] public void ThrowsActionableExceptionMessage() { diff --git a/sdk/core/System.Memory.Data/tests/BinaryDataTests.cs b/sdk/core/System.Memory.Data/tests/BinaryDataTests.cs index 183a1669d3fe1..aa788594ba85d 100644 --- a/sdk/core/System.Memory.Data/tests/BinaryDataTests.cs +++ b/sdk/core/System.Memory.Data/tests/BinaryDataTests.cs @@ -524,7 +524,6 @@ public void ValidatesSeekArguments() Assert.Throws(() => stream.Seek(0, (SeekOrigin)3)); } - [Fact] public async Task ValidatesReadArguments() { diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/GetDigitalTwinsEventRouteOptions.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/GetDigitalTwinsEventRouteOptions.cs index cf996114bf28f..5ff0875e6a0a6 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/GetDigitalTwinsEventRouteOptions.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/GetDigitalTwinsEventRouteOptions.cs @@ -22,7 +22,6 @@ internal partial class GetDigitalTwinsEventRouteOptions [CodeGenMember("Tracestate")] internal string TraceState { get; set; } - // This is internal because users should not set page size here. It should be set on the pageable instances's .AsPages() method. internal int? MaxItemsPerPage { get; set; } } diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/TestSettings.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/TestSettings.cs index 394df4c3c0ae5..43a95d0814b44 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/TestSettings.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/TestSettings.cs @@ -36,7 +36,6 @@ static TestSettings() return; } - string codeBase = Assembly.GetExecutingAssembly().Location; string workingDirectory = Path.GetDirectoryName(codeBase); diff --git a/sdk/dns/Azure.ResourceManager.Dns/tests/Tests/ScenarioTests.DnsTests.RecordSet.cs b/sdk/dns/Azure.ResourceManager.Dns/tests/Tests/ScenarioTests.DnsTests.RecordSet.cs index 9fb0e0eb51f1c..7b3a7f8644bc9 100644 --- a/sdk/dns/Azure.ResourceManager.Dns/tests/Tests/ScenarioTests.DnsTests.RecordSet.cs +++ b/sdk/dns/Azure.ResourceManager.Dns/tests/Tests/ScenarioTests.DnsTests.RecordSet.cs @@ -27,7 +27,6 @@ public class ScenarioTestsRecordSets : DnsManagementClientBase private Dictionary metadata; private bool setupRun = false; - public ScenarioTestsRecordSets() : base(true) { @@ -313,7 +312,6 @@ public async Task CreateGetPtr() Assert.True(Helper.AreEqual(createRecordSetResponse, testPtrRecordSet, ignoreEtag: true)); } - [TestCase] public async Task CreateGetSrv() { @@ -396,7 +394,6 @@ public async Task DnsUpdateARecordMultiRecord() Assert.NotNull(deleteRecordSetResponse); } - [TestCase] public async Task UpdateRecordSetPreconditionFailed() { @@ -430,7 +427,5 @@ await RecordSetsOperations.CreateOrUpdateAsync( } - - } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/tests/ConsumeEventTests.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/tests/ConsumeEventTests.cs index cb9be52160a10..049d59cbf0a95 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/tests/ConsumeEventTests.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/tests/ConsumeEventTests.cs @@ -822,7 +822,6 @@ public void ConsumeMediaLiveEventEncoderConnectedEvent() Assert.AreEqual("3557", eventData.EncoderPort); } - [Test] public void ConsumeMediaLiveEventConnectionRejectedEvent() { @@ -878,7 +877,6 @@ public void ConsumeMediaLiveEventIncomingStreamReceivedEvent() Assert.AreEqual("1000", eventData.Timescale); } - [Test] public void ConsumeMediaLiveEventIncomingStreamsOutOfSyncEvent() { @@ -2229,7 +2227,6 @@ public void ConsumeCloudEventMediaLiveEventEncoderConnectedEvent() Assert.AreEqual("3557", eventData.EncoderPort); } - [Test] public void ConsumeCloudEventMediaLiveEventConnectionRejectedEvent() { @@ -2285,7 +2282,6 @@ public void ConsumeCloudEventMediaLiveEventIncomingStreamReceivedEvent() Assert.AreEqual("1000", eventData.Timescale); } - [Test] public void ConsumeCloudEventMediaLiveEventIncomingStreamsOutOfSyncEvent() { diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/tests/Infrastructure/EventGridTestEnvironment.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/tests/Infrastructure/EventGridTestEnvironment.cs index 2bd611366fadc..a7652ec58a62a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/tests/Infrastructure/EventGridTestEnvironment.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/tests/Infrastructure/EventGridTestEnvironment.cs @@ -24,7 +24,6 @@ public EventGridTestEnvironment() : base("eventgrid") public const string CustomEventTopicKeyEnvironmentVariableName = "EVENT_GRID_CUSTOM_EVENT_TOPIC_KEY"; public const string CustomEventTopicEndpointEnvironmentVariableName = "EVENT_GRID_CUSTOM_EVENT_TOPIC_ENDPOINT"; - public string TopicHost => GetRecordedVariable(TopicEndpointEnvironmentVariableName); public string TopicKey => GetRecordedVariable(TopicKeyEnvironmentVariableName, options => options.IsSecret(SanitizedValue.Base64)); diff --git a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/EventGridExtensionConfigProvider.cs b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/EventGridExtensionConfigProvider.cs index 814fc4d50ccd4..8b8ec0f49f318 100644 --- a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/EventGridExtensionConfigProvider.cs +++ b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/EventGridExtensionConfigProvider.cs @@ -75,7 +75,6 @@ public void Initialize(ExtensionConfigContext context) .AddOpenConverter(typeof(JTokenToPocoConverter<>)) .BindToTrigger(new EventGridTriggerAttributeBindingProvider(this)); - // Register the output binding var rule = context .AddBindingRule() diff --git a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/tests/JobhostEndToEnd.cs b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/tests/JobhostEndToEnd.cs index 32b80f0ef51dd..25b2392ef3482 100644 --- a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/tests/JobhostEndToEnd.cs +++ b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/tests/JobhostEndToEnd.cs @@ -173,7 +173,6 @@ public void OutputBindingInvalidCredentialTests() Assert.AreEqual($"The '{nameof(EventGridAttribute.TopicKeySetting)}' property must be the name of an application setting containing the Topic Key", indexException.InnerException.Message); } - [Theory] [TestCase("SingleEvent", "0")] [TestCase("SingleReturnEvent", "0")] diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample04_ProcessingEventsLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample04_ProcessingEventsLiveTests.cs index 35364bb1f97f5..f2fd20d2c722d 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample04_ProcessingEventsLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample04_ProcessingEventsLiveTests.cs @@ -687,7 +687,6 @@ public static Task ProcessEventBatchAsync(IReadOnlyList eventData, public static void HandleInitializeException(PartitionInitializingEventArgs eventArgs, Exception exception) {} - /// /// A simulated method for handling an exception that occurs during /// event processing. diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Processor/StorageManager.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Processor/StorageManager.cs index d8632969c448d..45f1424a48480 100755 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Processor/StorageManager.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Processor/StorageManager.cs @@ -42,7 +42,6 @@ public abstract Task> ListOwnershi public abstract Task> ClaimOwnershipAsync(IEnumerable partitionOwnership, CancellationToken cancellationToken); - /// /// Retrieves a complete checkpoints list from the chosen storage service. /// diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Processor/PartitionLoadBalancerTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Processor/PartitionLoadBalancerTests.cs index d6947f31c4f13..2edc3bb4bc83e 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Processor/PartitionLoadBalancerTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Processor/PartitionLoadBalancerTests.cs @@ -601,7 +601,6 @@ public async Task RunLoadBalancingAsyncReclaimsOwnershipWhenLeaseRenewalFails() Assert.That(loadBalancer.OwnedPartitionIds.Count(), Is.EqualTo(OrphanedPartitionCount), "The load balancer should have ownership of all orphaned partitions and none additional."); } - /// /// Verifies that claimable partitions are claimed by a after RunAsync is called. /// diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Core/ChannelReaderExtensions.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Core/ChannelReaderExtensions.cs index 5c2c1e2e3ba4e..7c4eb0dddd353 100755 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Core/ChannelReaderExtensions.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Core/ChannelReaderExtensions.cs @@ -41,7 +41,6 @@ public static async IAsyncEnumerable EnumerateChannel(this ChannelReader /// Verifies functionality of the /// method. @@ -2597,7 +2596,6 @@ private class MockConnection : EventHubConnection public Func TransportProducerFactory = (partition, features, options, retry) => Mock.Of(); - public MockConnection(string namespaceName = "fakeNamespace", string eventHubName = "fakeEventHub") : base(namespaceName, eventHubName, new Mock(Mock.Of(), "{namespace}.servicebus.windows.net").Object) { diff --git a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Config/EventHubOptions.cs b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Config/EventHubOptions.cs index 23fa767b1cf10..4be856cfd79ad 100644 --- a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Config/EventHubOptions.cs +++ b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Config/EventHubOptions.cs @@ -284,7 +284,6 @@ internal IEventHubConsumerClient GetEventHubConsumerClient(string eventHubName, throw new InvalidOperationException("No event hub receiver named " + eventHubName); } - internal string GetCheckpointStoreConnectionString(IConfiguration config, string eventHubName) { ReceiverCreds creds; diff --git a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Listeners/EventHubsScaleMonitor.cs b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Listeners/EventHubsScaleMonitor.cs index 90180d173e556..4cdcb24a7b9d5 100644 --- a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Listeners/EventHubsScaleMonitor.cs +++ b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Listeners/EventHubsScaleMonitor.cs @@ -147,7 +147,6 @@ private EventHubsTriggerMetrics CreateTriggerMetrics(List p }; } - // Get the number of unprocessed events by deriving the delta between the server side info and the partition lease info, private static long GetUnprocessedEventCount(PartitionProperties partitionInfo, BlobsCheckpointStore.BlobStorageCheckpoint partitionLeaseInfo) { diff --git a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Utility.cs b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Utility.cs index 2634f8c14c647..1622bd0ae8bc3 100644 --- a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Utility.cs +++ b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Utility.cs @@ -42,7 +42,6 @@ private static LogLevel GetLevel(Exception ex) throw new ArgumentNullException(nameof(ex)); } - if (IsConflictLeaseIdMismatchWithLeaseOperation(ex)) { // For EventProcessorHost these exceptions can happen as part diff --git a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubEndToEndTests.cs b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubEndToEndTests.cs index a2df425094c55..0fc8508f3bf71 100644 --- a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubEndToEndTests.cs +++ b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubEndToEndTests.cs @@ -184,7 +184,6 @@ public async Task EventHub_PartitionKey() } } - public class EventHubTestSingleDispatchJobs { public static void SendEvent_TestHub(string input, [EventHub(TestHubName)] out EventData evt) diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/src/KeyVaultSecretManager.cs b/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/src/KeyVaultSecretManager.cs index f721d899e01cf..8cdb61415dfb8 100644 --- a/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/src/KeyVaultSecretManager.cs +++ b/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/src/KeyVaultSecretManager.cs @@ -14,7 +14,6 @@ public class KeyVaultSecretManager { internal static KeyVaultSecretManager Instance { get; } = new KeyVaultSecretManager(); - /// /// Maps secret to a configuration key. /// diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/src/Properties/AssemblyInfo.cs b/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/src/Properties/AssemblyInfo.cs index 1426df5dfc39e..f4b5662cdff20 100644 --- a/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/src/Properties/AssemblyInfo.cs +++ b/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/src/Properties/AssemblyInfo.cs @@ -3,6 +3,5 @@ using System.Runtime.CompilerServices; - [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] -[assembly: InternalsVisibleTo("Azure.Extensions.AspNetCore.Configuration.Secrets.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] \ No newline at end of file +[assembly: InternalsVisibleTo("Azure.Extensions.AspNetCore.Configuration.Secrets.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/tests/AzureKeyVaultConfigurationTests.cs b/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/tests/AzureKeyVaultConfigurationTests.cs index b01c018b4f16b..43954677bf1e5 100644 --- a/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/tests/AzureKeyVaultConfigurationTests.cs +++ b/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/tests/AzureKeyVaultConfigurationTests.cs @@ -484,7 +484,6 @@ public void LimitsMaxParallelism() Enumerable.Range(0, 10).Select(b => CreateSecret("Secret" + (a * 10 + b), (a * 10 + b).ToString())).ToArray() ).ToArray(); - SetPages(client, async (string id) => { diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/tests/Snippets.cs b/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/tests/Snippets.cs index 0dc95dd3ae44d..bd766274ab927 100644 --- a/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/tests/Snippets.cs +++ b/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/tests/Snippets.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - using System; using Azure.Identity; using Microsoft.Extensions.Configuration; @@ -21,4 +20,4 @@ public void ConfigurationHelloWorld() #endregion } } -} \ No newline at end of file +} diff --git a/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/tests/shared/TestHelpers.cs b/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/tests/shared/TestHelpers.cs index 6ff7740b33cf5..00fa672488e7c 100644 --- a/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/tests/shared/TestHelpers.cs +++ b/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/tests/shared/TestHelpers.cs @@ -120,8 +120,6 @@ public static T New() return (T)constructor.Invoke(null); } - - // Test that we get an indexing error (FunctionIndexingException) // functionName - the function name that has the indexing error. // expectedErrorMessage - inner exception's message with details. @@ -207,7 +205,6 @@ public static IHostBuilder ConfigureTestLogger(this IHostBuilder builder) }); } - public static IHostBuilder ConfigureTypeLocator(this IHostBuilder builder, params Type[] types) { return builder.ConfigureServices(services => diff --git a/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientFactory.cs b/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientFactory.cs index c250191c3f921..86c22bcc1b2ff 100644 --- a/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientFactory.cs +++ b/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientFactory.cs @@ -134,7 +134,6 @@ internal static TokenCredential CreateCredential(IConfiguration configuration, T return null; } - internal static object CreateClientOptions(object version, Type optionsType) { ConstructorInfo parameterlessConstructor = null; diff --git a/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientRegistration.cs b/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientRegistration.cs index d926aedeab09f..4957e207626c2 100644 --- a/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientRegistration.cs +++ b/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientRegistration.cs @@ -45,7 +45,6 @@ public TClient GetClient(object options, TokenCredential tokenCredential) return _cachedClient; } - if (RequiresTokenCredential && tokenCredential == null) { throw new InvalidOperationException("Client registration requires a TokenCredential. Configure it using UseCredential method."); diff --git a/sdk/extensions/Microsoft.Extensions.Azure/tests/LogForwarderTests.cs b/sdk/extensions/Microsoft.Extensions.Azure/tests/LogForwarderTests.cs index a6ea353a4d3c4..eb1f2f015a653 100644 --- a/sdk/extensions/Microsoft.Extensions.Azure/tests/LogForwarderTests.cs +++ b/sdk/extensions/Microsoft.Extensions.Azure/tests/LogForwarderTests.cs @@ -47,7 +47,6 @@ public void CanDisposeNonStarted() forwarder.Dispose(); } - public class MockLogger : ILogger { public string CategoryName { get; } diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/CreateComposedModelOperation.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/CreateComposedModelOperation.cs index 96c69dff455ad..dcd374a34b05f 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/CreateComposedModelOperation.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/CreateComposedModelOperation.cs @@ -12,7 +12,6 @@ public class CreateComposedModelOperation : CreateCustomFormModelOperation { internal CreateComposedModelOperation(string location, FormRecognizerRestClient allOperations, ClientDiagnostics diagnostics) : base(location, allOperations, diagnostics) { } - /// /// Initializes a new instance of the class. /// diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormRecognizerClient.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormRecognizerClient.cs index 3486c10328817..19aad59457075 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormRecognizerClient.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormRecognizerClient.cs @@ -733,7 +733,6 @@ public virtual RecognizeInvoicesOperation StartRecognizeInvoicesFromUri(Uri invo } #endregion - #region Custom Forms /// diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormRecognizerModelFactory.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormRecognizerModelFactory.cs index 35639d7af4c40..e9ed7b4742f24 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormRecognizerModelFactory.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormRecognizerModelFactory.cs @@ -127,7 +127,6 @@ public static CustomFormModelInfo CustomFormModelInfo(string modelId, DateTimeOf public static CustomFormModelProperties CustomFormModelProperties(bool isComposedModel) => new CustomFormModelProperties(isComposedModel); - /// /// Initializes a new instance of the class. /// diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormTrainingClient.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormTrainingClient.cs index 15773d9dac5a7..fdc7d0809bb70 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormTrainingClient.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormTrainingClient.cs @@ -189,7 +189,6 @@ public virtual async Task StartTrainingAsync(Uri trainingFile } } - /// /// Trains a model from a collection of custom forms in a blob storage container. /// diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/samples/Sample8_CopyModel.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/samples/Sample8_CopyModel.cs index a1b862ea2f3d2..f45941ccf1ace 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/samples/Sample8_CopyModel.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/samples/Sample8_CopyModel.cs @@ -21,7 +21,6 @@ public async Task CopyModel() string resourceId = TestEnvironment.TargetResourceId; string resourceRegion = TestEnvironment.TargetResourceRegion; - #region Snippet:FormRecognizerSampleCreateCopySourceClient //@@ string endpoint = ""; //@@ string apiKey = ""; diff --git a/sdk/identity/Azure.Identity/src/AuthenticationRecord.cs b/sdk/identity/Azure.Identity/src/AuthenticationRecord.cs index c74a76b1aae54..7d4a442079364 100644 --- a/sdk/identity/Azure.Identity/src/AuthenticationRecord.cs +++ b/sdk/identity/Azure.Identity/src/AuthenticationRecord.cs @@ -103,7 +103,6 @@ public async Task SerializeAsync(Stream stream, CancellationToken cancellationTo await SerializeAsync(stream, true, cancellationToken).ConfigureAwait(false); } - /// /// Deserializes the from the specified . /// diff --git a/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs b/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs index 5e85f4adbacd5..27b5f94eb0e5a 100644 --- a/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs +++ b/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs @@ -66,7 +66,6 @@ protected override Request CreateRequest(string[] scopes) request.Uri.AppendQuery("resource", resource); - return request; } diff --git a/sdk/identity/Azure.Identity/src/Base64Url.cs b/sdk/identity/Azure.Identity/src/Base64Url.cs index 27af46cbe9013..0eff21475264a 100644 --- a/sdk/identity/Azure.Identity/src/Base64Url.cs +++ b/sdk/identity/Azure.Identity/src/Base64Url.cs @@ -20,7 +20,6 @@ public static string Encode(byte[] bytes) return new StringBuilder(Convert.ToBase64String(bytes)).Replace('+', '-').Replace('/', '_').Replace("=", "").ToString(); } - public static string HexToBase64Url(string hex) { byte[] bytes = new byte[hex.Length / 2]; diff --git a/sdk/identity/Azure.Identity/src/ClientCertificateCredential.cs b/sdk/identity/Azure.Identity/src/ClientCertificateCredential.cs index f5ab1cbf781af..6304d4f670c29 100644 --- a/sdk/identity/Azure.Identity/src/ClientCertificateCredential.cs +++ b/sdk/identity/Azure.Identity/src/ClientCertificateCredential.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - using Azure.Core; using Azure.Core.Pipeline; using Microsoft.Identity.Client; diff --git a/sdk/identity/Azure.Identity/src/DefaultAzureCredentialOptions.cs b/sdk/identity/Azure.Identity/src/DefaultAzureCredentialOptions.cs index 9007c10cae309..17d9652a5c88b 100644 --- a/sdk/identity/Azure.Identity/src/DefaultAzureCredentialOptions.cs +++ b/sdk/identity/Azure.Identity/src/DefaultAzureCredentialOptions.cs @@ -90,7 +90,6 @@ public class DefaultAzureCredentialOptions : TokenCredentialOptions /// public bool ExcludeVisualStudioCredential { get; set; } - /// /// Specifies whether the will be excluded from the authentication flow. /// diff --git a/sdk/identity/Azure.Identity/src/EnvironmentCredential.cs b/sdk/identity/Azure.Identity/src/EnvironmentCredential.cs index 29874bda400df..35acef5a75e50 100644 --- a/sdk/identity/Azure.Identity/src/EnvironmentCredential.cs +++ b/sdk/identity/Azure.Identity/src/EnvironmentCredential.cs @@ -52,7 +52,6 @@ public EnvironmentCredential(TokenCredentialOptions options) { } - internal EnvironmentCredential(CredentialPipeline pipeline) { _pipeline = pipeline; diff --git a/sdk/identity/Azure.Identity/src/TokenCache.cs b/sdk/identity/Azure.Identity/src/TokenCache.cs index bce569e8a8ecf..5596c567e24d6 100644 --- a/sdk/identity/Azure.Identity/src/TokenCache.cs +++ b/sdk/identity/Azure.Identity/src/TokenCache.cs @@ -88,7 +88,6 @@ public async Task SerializeAsync(Stream stream, CancellationToken cancellationTo await SerializeAsync(stream, true, cancellationToken).ConfigureAwait(false); } - /// /// Deserializes the from the specified . /// @@ -192,7 +191,6 @@ private async Task OnBeforeCacheAccessAsync(TokenCacheNotificationArgs args) } } - private async Task OnAfterCacheAccessAsync(TokenCacheNotificationArgs args) { if (_disposedValue) diff --git a/sdk/identity/Azure.Identity/src/UsernamePasswordCredential.cs b/sdk/identity/Azure.Identity/src/UsernamePasswordCredential.cs index f51e4d4976479..849ff4c4da59e 100644 --- a/sdk/identity/Azure.Identity/src/UsernamePasswordCredential.cs +++ b/sdk/identity/Azure.Identity/src/UsernamePasswordCredential.cs @@ -27,7 +27,6 @@ public class UsernamePasswordCredential : TokenCredential private readonly SecureString _password; private AuthenticationRecord _record; - /// /// Protected constructor for mocking /// diff --git a/sdk/identity/Azure.Identity/src/VisualStudioCredential.cs b/sdk/identity/Azure.Identity/src/VisualStudioCredential.cs index 9fc82549a8c7b..a8ce6db9c3f82 100644 --- a/sdk/identity/Azure.Identity/src/VisualStudioCredential.cs +++ b/sdk/identity/Azure.Identity/src/VisualStudioCredential.cs @@ -14,7 +14,6 @@ using Azure.Core; using Azure.Core.Pipeline; - namespace Azure.Identity { /// diff --git a/sdk/identity/Azure.Identity/tests/DeviceCodeCredentialTests.cs b/sdk/identity/Azure.Identity/tests/DeviceCodeCredentialTests.cs index faa83f0cf6ef7..c6ca6e0229464 100644 --- a/sdk/identity/Azure.Identity/tests/DeviceCodeCredentialTests.cs +++ b/sdk/identity/Azure.Identity/tests/DeviceCodeCredentialTests.cs @@ -425,6 +425,4 @@ private static MockResponse AuthorizationPendingResponse } } - - } diff --git a/sdk/identity/Azure.Identity/tests/InteractiveBrowserCredentialLiveTests.cs b/sdk/identity/Azure.Identity/tests/InteractiveBrowserCredentialLiveTests.cs index acc2f71bcd78d..cde4be6be740d 100644 --- a/sdk/identity/Azure.Identity/tests/InteractiveBrowserCredentialLiveTests.cs +++ b/sdk/identity/Azure.Identity/tests/InteractiveBrowserCredentialLiveTests.cs @@ -69,7 +69,6 @@ public async Task AuthenticateFollowedByGetTokenAsync() Assert.NotNull(token.Token); } - [Test] [Ignore("This test is an integration test which can only be run with user interaction")] public async Task AuthenticateWithSharedTokenCacheAsync() @@ -87,7 +86,6 @@ public async Task AuthenticateWithSharedTokenCacheAsync() Assert.NotNull(token.Token); } - [Test] [Ignore("This test is an integration test which can only be run with user interaction")] public async Task AuthenticateWithCommonTokenCacheAsync() diff --git a/sdk/identity/Azure.Identity/tests/InteractiveBrowserCredentialTests.cs b/sdk/identity/Azure.Identity/tests/InteractiveBrowserCredentialTests.cs index 08b716664bc32..fc242976089f2 100644 --- a/sdk/identity/Azure.Identity/tests/InteractiveBrowserCredentialTests.cs +++ b/sdk/identity/Azure.Identity/tests/InteractiveBrowserCredentialTests.cs @@ -18,7 +18,6 @@ public InteractiveBrowserCredentialTests(bool isAsync) : base(isAsync) { } - [Test] public async Task InteractiveBrowserAcquireTokenInteractiveException() { diff --git a/sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialArcLiveTests.cs b/sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialArcLiveTests.cs index 5ca373f04a185..8a3fdffd1e64c 100644 --- a/sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialArcLiveTests.cs +++ b/sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialArcLiveTests.cs @@ -46,7 +46,6 @@ public async Task ValidateSystemAssignedIdentity() } } - [NonParallelizable] [Test] public void ValidateUserAssignedIdentity() diff --git a/sdk/identity/Azure.Identity/tests/Mock/MockToken.cs b/sdk/identity/Azure.Identity/tests/Mock/MockToken.cs index 25b6bdbff1047..cd8c8db758078 100644 --- a/sdk/identity/Azure.Identity/tests/Mock/MockToken.cs +++ b/sdk/identity/Azure.Identity/tests/Mock/MockToken.cs @@ -30,7 +30,6 @@ public MockToken WithField(string name, string value) _tokenBuilder.Append($"{name}={value};"); } - return this; } @@ -39,7 +38,6 @@ public bool HasField(string name, string value) return Token.Contains($"{name}={value};"); } - public override string ToString() { return Token; diff --git a/sdk/identity/Azure.Identity/tests/SharedTokenCacheCredentialTests.cs b/sdk/identity/Azure.Identity/tests/SharedTokenCacheCredentialTests.cs index 4b53a039c2c99..5a5dcf53bcc84 100644 --- a/sdk/identity/Azure.Identity/tests/SharedTokenCacheCredentialTests.cs +++ b/sdk/identity/Azure.Identity/tests/SharedTokenCacheCredentialTests.cs @@ -100,7 +100,6 @@ public async Task OneMatchingAccountUsernameOnly() Assert.AreEqual(expExpiresOn, token.ExpiresOn); } - [Test] public async Task OneMatchingAccountUsernameDifferentCasing() { @@ -191,7 +190,6 @@ public async Task NoAccounts() Assert.AreEqual(SharedTokenCacheCredential.NoAccountsInCacheMessage, ex2.Message); - // with tenantId var credential3 = InstrumentClient(new SharedTokenCacheCredential(Guid.NewGuid().ToString(), null, null, null, mockMsalClient)); @@ -435,7 +433,6 @@ public async Task MatchAnyTenantIdWithEnableGuestTenantAuthenticationAndUsername SilentAuthFactory = (_) => { return AuthenticationResultFactory.Create(accessToken: expToken, expiresOn: expExpiresOn); } }; - var credential = InstrumentClient(new SharedTokenCacheCredential(tenantId, "mockuser@mockdomain.com", new SharedTokenCacheCredentialOptions { EnableGuestTenantAuthentication = true }, null, mockMsalClient)); AccessToken token = await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Default)); diff --git a/sdk/identity/Azure.Identity/tests/UsernamePasswordCredentialTests.cs b/sdk/identity/Azure.Identity/tests/UsernamePasswordCredentialTests.cs index bcdbd914693dd..1249a2a87aace 100644 --- a/sdk/identity/Azure.Identity/tests/UsernamePasswordCredentialTests.cs +++ b/sdk/identity/Azure.Identity/tests/UsernamePasswordCredentialTests.cs @@ -16,7 +16,6 @@ public UsernamePasswordCredentialTests(bool isAsync) : base(isAsync) { } - [Test] public async Task VerifyMsalClientExceptionAsync() { diff --git a/sdk/identity/Azure.Identity/tests/samples/UserAuthenticationSnippets.cs b/sdk/identity/Azure.Identity/tests/samples/UserAuthenticationSnippets.cs index dd26921b8fda5..05a1566552a8b 100644 --- a/sdk/identity/Azure.Identity/tests/samples/UserAuthenticationSnippets.cs +++ b/sdk/identity/Azure.Identity/tests/samples/UserAuthenticationSnippets.cs @@ -60,7 +60,6 @@ public async Task Identity_ClientSideUserAuthentication_DisableAutomaticAuthenti private const string AUTH_RECORD_PATH = @".\Data\authrecord.bin"; - public static async Task GetUserCredentialAsync() { if (!File.Exists(AUTH_RECORD_PATH)) @@ -96,7 +95,6 @@ public static async Task GetUserCredentialAsync() } } - public static async Task Main() { InteractiveBrowserCredential credential; diff --git a/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/ActivityLogsTest.cs b/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/ActivityLogsTest.cs index 11a505a07602d..f0182bd39fe60 100644 --- a/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/ActivityLogsTest.cs +++ b/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/ActivityLogsTest.cs @@ -148,7 +148,6 @@ private void AreEqual(EventData exp, EventData act) AreEqual(exp.Status, act.Status); AreEqual(exp.SubStatus, act.SubStatus); - AreEqual(exp.Claims, act.Claims); AreEqual(exp.Properties, act.Properties); diff --git a/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/ServiceDiagnosticSettingsTests.cs b/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/ServiceDiagnosticSettingsTests.cs index 7081cb36c67da..b308fc4c17a52 100644 --- a/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/ServiceDiagnosticSettingsTests.cs +++ b/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/ServiceDiagnosticSettingsTests.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - using System; using System.Collections.Generic; using System.Net; diff --git a/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/TenantActivityLogsTest.cs b/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/TenantActivityLogsTest.cs index 1516525dd494f..0e22c83efe224 100644 --- a/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/TenantActivityLogsTest.cs +++ b/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/TenantActivityLogsTest.cs @@ -139,7 +139,6 @@ private void AreEqual(EventData exp, EventData act) AreEqual(exp.Status, act.Status); AreEqual(exp.SubStatus, act.SubStatus); - AreEqual(exp.Claims, act.Claims); AreEqual(exp.Properties, act.Properties); diff --git a/sdk/insights/Azure.ResourceManager.Insights/tests/InsightsManagementClientMockedBase.cs b/sdk/insights/Azure.ResourceManager.Insights/tests/InsightsManagementClientMockedBase.cs index 47b63f6aaa3ef..bb97011fa3d4e 100644 --- a/sdk/insights/Azure.ResourceManager.Insights/tests/InsightsManagementClientMockedBase.cs +++ b/sdk/insights/Azure.ResourceManager.Insights/tests/InsightsManagementClientMockedBase.cs @@ -12,7 +12,6 @@ public class InsightsManagementClientMockedBase : InsightsManagementClientBase { protected InsightsManagementClientMockedBase(bool isAsync) : base(isAsync) { } - public InsightsManagementClient GetInsightsManagementClient(HttpPipelineTransport transport) { InsightsManagementClientOptions options = new InsightsManagementClientOptions(); diff --git a/sdk/iot/Azure.Iot.Hub.Service/src/IotHubServiceClientOptions.cs b/sdk/iot/Azure.Iot.Hub.Service/src/IotHubServiceClientOptions.cs index e09f7dff906a5..bd4815e6cdf8c 100644 --- a/sdk/iot/Azure.Iot.Hub.Service/src/IotHubServiceClientOptions.cs +++ b/sdk/iot/Azure.Iot.Hub.Service/src/IotHubServiceClientOptions.cs @@ -41,7 +41,6 @@ public IotHubServiceClientOptions(ServiceVersion version = LatestVersion) Version = version; } - internal string GetVersionString() { return Version switch diff --git a/sdk/iot/Azure.Iot.Hub.Service/tests/TestSettings.cs b/sdk/iot/Azure.Iot.Hub.Service/tests/TestSettings.cs index 779b3112845cc..317a1a625bff0 100644 --- a/sdk/iot/Azure.Iot.Hub.Service/tests/TestSettings.cs +++ b/sdk/iot/Azure.Iot.Hub.Service/tests/TestSettings.cs @@ -36,7 +36,6 @@ static TestSettings() return; } - string codeBase = Assembly.GetExecutingAssembly().Location; string workingDirectory = Path.GetDirectoryName(codeBase); diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/VaultOperationsTests.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/VaultOperationsTests.cs index cecc06f757f38..936ea487ec86a 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/VaultOperationsTests.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/VaultOperationsTests.cs @@ -211,7 +211,6 @@ public async Task KeyVaultManagementVaultTestCompoundIdentityAccessControlPolicy new[] { AccessPolicy }, Tags); - // Delete await VaultsClient.DeleteAsync( resourceGroupName: ResGroupName, diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/VaultOperationsTestsBase.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/VaultOperationsTestsBase.cs index f163ec4c570a0..aca17a027352c 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/VaultOperationsTestsBase.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/VaultOperationsTestsBase.cs @@ -31,7 +31,6 @@ public abstract class VaultOperationsTestsBase : ManagementRecordedTestBase new BackupResult(backupFolderUri, startTime, endTime); - /// /// Initializes a new instance of a for mocking purposes. /// diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperationParameters.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperationParameters.cs index f84a94d93392f..100eaabed71ef 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperationParameters.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperationParameters.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - namespace Azure.Security.KeyVault.Administration.Models { /// diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AdministrationTestBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AdministrationTestBase.cs index 5575d1c0960db..166bf768e9cf9 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AdministrationTestBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AdministrationTestBase.cs @@ -48,7 +48,6 @@ protected AdministrationTestBase(bool isAsync, RecordedTestMode? mode) ? TimeSpan.Zero : TimeSpan.FromSeconds(2); - [TearDown] public virtual async Task Cleanup() { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificatePolicyTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificatePolicyTests.cs index 44f6910f3642a..221bc4c253b05 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificatePolicyTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificatePolicyTests.cs @@ -176,7 +176,6 @@ public void DeserializesSerializesRoundtrip() ] }"; - Assert.AreEqual(expectedJson, json.ToString()); } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClient.cs index 426be674e3885..c0d45e2e6c477 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClient.cs @@ -1129,7 +1129,6 @@ public virtual async Task> ImportKeyAsync(ImportKeyOptions public virtual Response ExportKey(string name, string environment, CancellationToken cancellationToken = default) => ExportKey(name, null, environment, cancellationToken); - /// /// Exports the latest version of a including the private key if originally created with set to true, /// or imported with in set to true. diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/LocalCryptographyClientTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/LocalCryptographyClientTests.cs index 5175d455f1542..45404584dbd17 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/LocalCryptographyClientTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/LocalCryptographyClientTests.cs @@ -142,7 +142,6 @@ public void SignAlgorithmNotSupported([EnumValues(Exclude = new[] { nameof(KeyTy Assert.ThrowsAsync(async () => await client.SignAsync(new SignatureAlgorithm("ignored"), TestData)); } - [Test] public void VerifyOperationNotSupported() { @@ -204,7 +203,6 @@ public void SignDataAlgorithmNotSupported([EnumValues(Exclude = new[] { nameof(K Assert.ThrowsAsync(async () => await client.SignDataAsync(new SignatureAlgorithm("ignored"), TestData)); } - [Test] public void VerifyDataOperationNotSupported() { @@ -264,7 +262,6 @@ public void SignDataStreamAlgorithmNotSupported([EnumValues(Exclude = new[] { na Assert.ThrowsAsync(async () => await client.SignDataAsync(new SignatureAlgorithm("ignored"), TestStream)); } - [Test] public void VerifyDataStreamOperationNotSupported() { @@ -324,7 +321,6 @@ public void WrapKeyAlgorithmNotSupported([EnumValues(Exclude = new[] { nameof(Ke Assert.ThrowsAsync(async () => await client.WrapKeyAsync(new KeyWrapAlgorithm("ignored"), TestData)); } - [Test] public void UnwrapKeyOperationNotSupported() { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/SecretClientLiveTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/SecretClientLiveTests.cs index a8553c2527a8e..81d87690a67d8 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/SecretClientLiveTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/SecretClientLiveTests.cs @@ -427,7 +427,6 @@ public async Task GetPropertiesOfSecretVersions() } } - [Test] public async Task GetDeletedSecrets() { diff --git a/sdk/keyvault/samples/keyvaultproxy/tests/TestFramework/MockRequest.cs b/sdk/keyvault/samples/keyvaultproxy/tests/TestFramework/MockRequest.cs index 6b975bcc9a268..2f6fae2220ea2 100644 --- a/sdk/keyvault/samples/keyvaultproxy/tests/TestFramework/MockRequest.cs +++ b/sdk/keyvault/samples/keyvaultproxy/tests/TestFramework/MockRequest.cs @@ -36,7 +36,6 @@ public override RequestContent Content } } - protected override void AddHeader(string name, string value) { if (!_headers.TryGetValue(name, out List values)) diff --git a/sdk/keyvault/samples/keyvaultproxy/tests/TestFramework/TaskExtensions.cs b/sdk/keyvault/samples/keyvaultproxy/tests/TestFramework/TaskExtensions.cs index 3ad64ec22a527..06cabec320c2c 100644 --- a/sdk/keyvault/samples/keyvaultproxy/tests/TestFramework/TaskExtensions.cs +++ b/sdk/keyvault/samples/keyvaultproxy/tests/TestFramework/TaskExtensions.cs @@ -27,7 +27,6 @@ public static Task TimeoutAfterDefault(this Task task, return task.TimeoutAfter(DefaultTimeout, filePath, lineNumber); } - public static async Task TimeoutAfter(this Task task, TimeSpan timeout, [CallerFilePath] string filePath = null, [CallerLineNumber] int lineNumber = default) diff --git a/sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/tests/Benchmarks/TagObjectsGetValuesBenchmarks.cs b/sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/tests/Benchmarks/TagObjectsGetValuesBenchmarks.cs index ba805252be228..b02456be470e3 100644 --- a/sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/tests/Benchmarks/TagObjectsGetValuesBenchmarks.cs +++ b/sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/tests/Benchmarks/TagObjectsGetValuesBenchmarks.cs @@ -62,7 +62,6 @@ public void Setup() ["somekey"] = "value" }; - using var activitySource = new ActivitySource("test"); this.ItemActivity = activitySource.StartActivity("WithTags"); this.ItemActivity.AddTag("intKey", 1); diff --git a/sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/tests/Microsoft.OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/OpenTelemetryTests.cs b/sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/tests/Microsoft.OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/OpenTelemetryTests.cs index 74d87fdca4ecf..b61d98a1e1851 100644 --- a/sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/tests/Microsoft.OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/OpenTelemetryTests.cs +++ b/sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/tests/Microsoft.OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/OpenTelemetryTests.cs @@ -24,7 +24,6 @@ public OpenTelemetryTests(OpenTelemetryWebApplicationFactory /// This test validates that when an app instrumented with the AzureMonitorExporter receives an HTTP request, diff --git a/sdk/network/Azure.ResourceManager.Network/tests/Helpers/NetworkTestsManagementClientBase.cs b/sdk/network/Azure.ResourceManager.Network/tests/Helpers/NetworkTestsManagementClientBase.cs index 1fe4d6ec63f0f..64a99398f6246 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Helpers/NetworkTestsManagementClientBase.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Helpers/NetworkTestsManagementClientBase.cs @@ -42,7 +42,6 @@ public NetworkTestsManagementClientBase(bool isAsync) : base(isAsync) public NetworkManagementOperations ServiceOperations { get; set; } public PrivateLinkServicesOperations PrivateLinkServicesOperations { get; set; } - protected void Initialize() { ResourceManagementClient = GetResourceManagementClient(); @@ -263,7 +262,6 @@ public async Task UpdateDefaultExpressRouteCircuitWithMicro return getCircuitResponse; } - public async Task CreateDefaultRouteFilter(string resourceGroupName, string filterName, string location, NetworkManagementClient nrpClient, bool containsRule = false) { diff --git a/sdk/network/Azure.ResourceManager.Network/tests/Tests/GatewayOperationsTests.cs b/sdk/network/Azure.ResourceManager.Network/tests/Tests/GatewayOperationsTests.cs index 07ddc08942fb7..85251b94cb0e4 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Tests/GatewayOperationsTests.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Tests/GatewayOperationsTests.cs @@ -1053,7 +1053,6 @@ public async Task VirtualNetworkGatewayP2SOperationsApisTest() Assert.True(getVirtualNetworkGatewayResponse.Value.VpnClientConfiguration.VpnClientRevokedCertificates.Count() == 0); } - // Tests Resource:-VirtualNetworkGateway ActiveActive Feature Test:- [Test] [Ignore("Track2: The current operation failed due to an intermittent error with gateway 'azsmnet123'. Please try again")] diff --git a/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/FeatureTests.InMemory.cs b/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/FeatureTests.InMemory.cs index 6bc63a0e2a055..ffdbffb0159d4 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/FeatureTests.InMemory.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/FeatureTests.InMemory.cs @@ -158,7 +158,6 @@ public async Task ListPreviewedFeatures() string resourceProviderNamespace = "Providers.Test"; - //-------------Verify get all features within a resource provider var getResult = await client.Features.ListAsync(resourceProviderNamespace).ToEnumerableAsync(); diff --git a/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/ProviderTests.InMemory.cs b/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/ProviderTests.InMemory.cs index f7a2f21189d8f..1731e3a21b4af 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/ProviderTests.InMemory.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/ProviderTests.InMemory.cs @@ -91,7 +91,6 @@ public async Task ProviderGetValidateMessage() Assert.AreEqual(HttpMethod.Get.Method, request.Method.Method); Assert.IsTrue(request.Headers.Contains("Authorization")); - // Validate result Assert.AreEqual("Microsoft.Websites", result.Namespace); Assert.AreEqual("Registered", result.RegistrationState); diff --git a/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/ResourceTests.InMemory.cs b/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/ResourceTests.InMemory.cs index baa451e726efb..1209a42a2ff7c 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/ResourceTests.InMemory.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/ResourceTests.InMemory.cs @@ -261,7 +261,6 @@ public async Task ResourceListForResourceGroupValidateMessage() var result = await client.Resources.ListByResourceGroupAsync("foo", "$filter=resourceType eq 'Sites'").ToEnumerableAsync(); - // Validate headers var request = mockTransport.Requests[0]; Assert.AreEqual(HttpMethod.Get.Method, request.Method.Method); @@ -589,7 +588,6 @@ await client.Resources.StartDeleteAsync( } } - [Test] public async Task ResourceExistsValidateNoContentMessage() { diff --git a/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/TagTests.ScenarioTests.cs b/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/TagTests.ScenarioTests.cs index edf70320f6cbb..3efa2619dd297 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/TagTests.ScenarioTests.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/TagTests.ScenarioTests.cs @@ -84,7 +84,6 @@ public async Task CreateTagValueWithoutCreatingTag() } } - /// /// Utility method to test Put request for Tags Operation within tracked resources and proxy resources /// diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchField.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchField.cs index cdcd462f57b8b..e4520942a6ccf 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchField.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchField.cs @@ -190,7 +190,6 @@ public bool? IsHidden [CodeGenMember("fields")] public IList Fields { get; } - /// /// /// This always returns " : " and is meant for debugging purposes. diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.cs b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.cs index f174221ae49fa..4639c7b0d0dac 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.cs @@ -28,7 +28,6 @@ public class SearchIndexerClient private SkillsetsRestClient _skillsetsClient; private string _serviceName; - /// /// Initializes a new instance of the class for mocking. /// diff --git a/sdk/search/Azure.Search.Documents/src/SearchClientBuilderExtensions.cs b/sdk/search/Azure.Search.Documents/src/SearchClientBuilderExtensions.cs index 3f493d4d52231..f7638a9de0cf2 100644 --- a/sdk/search/Azure.Search.Documents/src/SearchClientBuilderExtensions.cs +++ b/sdk/search/Azure.Search.Documents/src/SearchClientBuilderExtensions.cs @@ -63,7 +63,6 @@ public static IAzureClientBuilder AddSearchCl where TBuilder : IAzureClientFactoryBuilderWithConfiguration => builder.RegisterClientFactory(configuration); - /// /// Registers a instance with the /// provided and . diff --git a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/GetDocumentTests.cs b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/GetDocumentTests.cs index 0b069e4f983e7..f1f0991fa1abd 100644 --- a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/GetDocumentTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/GetDocumentTests.cs @@ -116,7 +116,6 @@ public async Task GetDocumentDynamic() Assert.AreEqual("3", hotel.hotelId); } - [Test] public async Task GetDocumentStatic() { diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/HttpRequestAndResponse.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/HttpRequestAndResponse.cs index 854009a00452f..0df31b4964046 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/HttpRequestAndResponse.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/HttpRequestAndResponse.cs @@ -41,7 +41,6 @@ public HttpRequestAndResponse( _port = GetPort(_fullyQualifiedNamespace); } - internal async Task ThrowIfRequestFailedAsync(Request request, Response response) { if ((response.Status >= 200) && (response.Status < 400)) diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/TopicProperties.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/TopicProperties.cs index 225c5e45edd2d..570e2e5d741f9 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/TopicProperties.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/TopicProperties.cs @@ -202,7 +202,6 @@ public string UserMetadata internal bool EnableSubscriptionPartitioning { get; set; } - /// /// List of properties that were retrieved using GetTopic but are not understood by this version of client is stored here. /// The list will be sent back when an already retrieved TopicDescription will be used in UpdateTopic call. diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Core/TransportClient.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Core/TransportClient.cs index ccea6b4d100c5..92cef5b33096c 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Core/TransportClient.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Core/TransportClient.cs @@ -35,8 +35,6 @@ internal abstract class TransportClient : IAsyncDisposable /// public virtual Uri ServiceEndpoint { get; } - - /// /// Creates a sender strongly aligned with the active protocol and transport, /// responsible for sending to the entity. diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusRetryPolicy.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusRetryPolicy.cs index 41ed0938e3d8a..9e38130fccf73 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusRetryPolicy.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusRetryPolicy.cs @@ -117,7 +117,6 @@ internal async Task RunOperation( { var failedAttemptCount = 0; - TimeSpan tryTimeout = CalculateTryTimeout(0); if (IsServerBusy && tryTimeout < ServerBusyBaseSleepTime) { diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSender.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSender.cs index 1b74fb68b803f..917f3d0462ee0 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSender.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSender.cs @@ -411,8 +411,6 @@ public virtual async Task ScheduleMessageAsync( return sequenceNumbers[0]; } - - /// /// Schedules a set of messages to appear on Service Bus at a later time. /// diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Administration/ServiceBusManagementClientLiveTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Administration/ServiceBusManagementClientLiveTests.cs index e436dc7c0280b..61fa67bd34d8f 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Administration/ServiceBusManagementClientLiveTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Administration/ServiceBusManagementClientLiveTests.cs @@ -678,7 +678,6 @@ await client.DeleteSubscriptionAsync("NonExistingTopic", "NonExistingPath"), Throws.InstanceOf().And.Property(nameof(ServiceBusException.Reason)).EqualTo(ServiceBusFailureReason.MessagingEntityNotFound). And.Property(nameof(Exception.InnerException)).InstanceOf(typeof(RequestFailedException))); - var queueName = Recording.Random.NewGuid().ToString("D").Substring(0, 8); var topicName = Recording.Random.NewGuid().ToString("D").Substring(0, 8); diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Amqp/AmqpReceiverTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Amqp/AmqpReceiverTests.cs index f4cfefd1a3e07..01b75afab2cce 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Amqp/AmqpReceiverTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Amqp/AmqpReceiverTests.cs @@ -281,7 +281,6 @@ public void ReceiveAsyncAppliesTheRetryPolicyForAmqpErrors(ServiceBusRetryOption It.IsAny())) .Throws(retriableException); - var receiver = new AmqpReceiver(entityName, ServiceBusReceiveMode.PeekLock, prefetchCount, mockScope.Object, retryPolicy, "someIdentifier", sessionId, isSession); Assert.That(async () => await receiver.ReceiveMessagesAsync( 100, @@ -357,7 +356,6 @@ public void ReceiveAsyncDetectsAnEmbeddedErrorForOperationCanceled() Times.Once()); } - /// /// Verifies functionality of the /// method. diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Diagnostics/EventSourceLiveTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Diagnostics/EventSourceLiveTests.cs index b91b7daccedad..512a1752a80e9 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Diagnostics/EventSourceLiveTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Diagnostics/EventSourceLiveTests.cs @@ -204,7 +204,6 @@ public async Task LogsTransactionEvents() var client = new ServiceBusClient(TestEnvironment.ServiceBusConnectionString); ServiceBusSender sender = client.CreateSender(scope.QueueName); - ServiceBusMessage message = GetMessage(); using (var ts = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled)) diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Diagnostics/EventSourceTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Diagnostics/EventSourceTests.cs index ef971b7f2f5bb..9055766e8ac7f 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Diagnostics/EventSourceTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Diagnostics/EventSourceTests.cs @@ -342,7 +342,6 @@ public async Task ReceiveSingleMessageLogsEvents() Logger = mockLogger.Object }; - await receiver.ReceiveMessageAsync(); mockLogger diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Message/MessageLiveTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Message/MessageLiveTests.cs index 1b2dc9f561531..c421a02ce670e 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Message/MessageLiveTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Message/MessageLiveTests.cs @@ -273,8 +273,6 @@ public async Task CanSetMessageId() } } - - private class TestBody { public string A { get; set; } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Processor/SessionProcessorLiveTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Processor/SessionProcessorLiveTests.cs index a37d0ebc88e33..522f29f7b23eb 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Processor/SessionProcessorLiveTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Processor/SessionProcessorLiveTests.cs @@ -414,7 +414,6 @@ async Task ProcessMessage(ProcessSessionMessageEventArgs args) // otherwise the message completion may have been cancelled if it didn't finish // before calling StopProcessingAsync. - if (!autoComplete) { Assert.That(async () => diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Samples/Sample07_CrudOperations.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Samples/Sample07_CrudOperations.cs index 153419e758391..f277dd168dd08 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Samples/Sample07_CrudOperations.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Samples/Sample07_CrudOperations.cs @@ -81,7 +81,6 @@ await client.GetQueueAsync(queueName), Throws.InstanceOf().And.Property(nameof(ServiceBusException.Reason)).EqualTo(ServiceBusFailureReason.MessagingEntityNotFound)); } - [Test] public async Task CreateTopicAndSubscription() { diff --git a/sdk/storage/Azure.ResourceManager.Storage/tests/Tests/BlobServiceTests.cs b/sdk/storage/Azure.ResourceManager.Storage/tests/Tests/BlobServiceTests.cs index 40f481626e86e..7a1d261a22a2e 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/tests/Tests/BlobServiceTests.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/tests/Tests/BlobServiceTests.cs @@ -129,7 +129,6 @@ public async Task BlobContainersEncryptionScopeTest() StorageAccount account = await CreateStorageAccountAsync(rgName, accountName); VerifyAccountProperties(account, true); - // implement case //Create EcryptionScope string scopeName1 = "testscope1"; @@ -261,7 +260,6 @@ public async Task BlobContainersGetTest() Assert.AreEqual(3, immutabilityPolicy.Value.ImmutabilityPeriodSinceCreationInDays); Assert.AreEqual(ImmutabilityPolicyState.Unlocked, immutabilityPolicy.Value.State); - immutabilityPolicy = await BlobContainersClient.LockImmutabilityPolicyAsync(rgName, accountName, containerName, ifMatch: immutabilityPolicy.Value.Etag); Assert.NotNull(immutabilityPolicy.Value.Id); Assert.NotNull(immutabilityPolicy.Value.Type); @@ -362,7 +360,6 @@ public async Task BlobContainersSetLegalHoldTest() // LeaseContainerResponse leaseResponse = storageMgmtClient.BlobContainers.Lease(rgName, accountName, containerName); // Assert.NotNull(leaseResponse.LeaseId); - // blobContainer = storageMgmtClient.BlobContainers.Get(rgName, accountName, containerName); // Assert.Equal("Leased", blobContainer.LeaseState); // } @@ -501,7 +498,6 @@ public async Task ImmutabilityPolicyTest_AllowProtectedAppendWrites() Assert.False(immutabilityPolicy.Value.AllowProtectedAppendWrites.Value); } - // lock immutability policies. [Test] public async Task BlobContainersLockImmutabilityPolicyTest() diff --git a/sdk/storage/Azure.ResourceManager.Storage/tests/Tests/StorageAccountTests.cs b/sdk/storage/Azure.ResourceManager.Storage/tests/Tests/StorageAccountTests.cs index f76b1b366bb8b..e0f6283341af0 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/tests/Tests/StorageAccountTests.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/tests/Tests/StorageAccountTests.cs @@ -1327,7 +1327,6 @@ public async Task StorageAccountSetGetDeleteManagementPolicy() }; rules.Add(rule1); - ManagementPolicyAction Actions2 = new ManagementPolicyAction() { BaseBlob = new ManagementPolicyBaseBlob() diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/samples/Sample02_Auth.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/samples/Sample02_Auth.cs index 5a3f342dddea8..ad14a2b7e1eff 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/samples/Sample02_Auth.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/samples/Sample02_Auth.cs @@ -51,7 +51,6 @@ public void ConnectionStringAuth() } } - /// /// Use a shared key to access a Storage Account. /// diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/BlobChangeFeedAsyncPagableTests.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/BlobChangeFeedAsyncPagableTests.cs index 90fb4c0f87480..59b3c33d63b43 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/BlobChangeFeedAsyncPagableTests.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/BlobChangeFeedAsyncPagableTests.cs @@ -556,7 +556,6 @@ AsyncPageable blobChangeFeedAsyncPagable blobChangeFeedAsyncPagable = blobChangeFeedClient.GetChangesAsync(continuation); IList tail = await blobChangeFeedAsyncPagable.ToListAsync(); - // Assert Assert.AreEqual(0, tail.Count); Assert.Greater(AllEventIds.Count, 0); @@ -597,7 +596,6 @@ AsyncPageable blobChangeFeedAsyncPagable blobChangeFeedAsyncPagable = blobChangeFeedClient.GetChangesAsync(continuation); IList tail = await blobChangeFeedAsyncPagable.ToListAsync(); - // Assert Assert.AreEqual(0, tail.Count); Assert.Greater(AllEventIds.Count, 0); diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/BlobChangeFeedExtensionsTests.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/BlobChangeFeedExtensionsTests.cs index bf1bb48d9fa8b..3a9e853f1d7c9 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/BlobChangeFeedExtensionsTests.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/BlobChangeFeedExtensionsTests.cs @@ -111,7 +111,6 @@ public void RoundDownToNearestYearTests() ((DateTimeOffset?)null).RoundDownToNearestYear()); } - [Test] public async Task GetSegmentsInYearTest() { diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChunkTests.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChunkTests.cs index 325e7019e0eb8..ed15a1103ab53 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChunkTests.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChunkTests.cs @@ -69,7 +69,6 @@ public async Task HasNext_True() avroReader.Verify(r => r.HasNext()); } - /// /// Tests Chunk.HasNext() when the underlying AvroReader.HasNext() returns false. /// diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ShardTests.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ShardTests.cs index 5faa8e29b3442..96328a204f85e 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ShardTests.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ShardTests.cs @@ -83,7 +83,6 @@ public async Task GetCursor() shardCursor) .ConfigureAwait(false); - ShardCursor cursor = shard.GetCursor(); // Assert diff --git a/sdk/storage/Azure.Storage.Blobs/samples/Sample01a_HelloWorld.cs b/sdk/storage/Azure.Storage.Blobs/samples/Sample01a_HelloWorld.cs index d15e084d38e98..f294962407d64 100644 --- a/sdk/storage/Azure.Storage.Blobs/samples/Sample01a_HelloWorld.cs +++ b/sdk/storage/Azure.Storage.Blobs/samples/Sample01a_HelloWorld.cs @@ -167,8 +167,6 @@ public void List() container.Delete(); } - - /// /// Trigger a recoverable error. /// diff --git a/sdk/storage/Azure.Storage.Blobs/src/BlobQuickQueryStream.cs b/sdk/storage/Azure.Storage.Blobs/src/BlobQuickQueryStream.cs index 1db1e249a81db..fd13556a10228 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/BlobQuickQueryStream.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/BlobQuickQueryStream.cs @@ -73,7 +73,6 @@ public override int Read(byte[] buffer, int offset, int count) public new async Task ReadAsync(byte[] buffer, int offset, int count) => await ReadInternal(async: true, buffer, offset, count).ConfigureAwait(false); - // Note - offset is with respect to buffer. private async Task ReadInternal(bool async, byte[] buffer, int offset, int count) { @@ -211,7 +210,6 @@ private async Task ReadInternal(bool async, byte[] buffer, int offset, int return length; } - internal static void ValidateReadParameters(byte[] buffer, int offset, int count) { if (buffer == null) diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobContainerStates.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobContainerStates.cs index 8a130e171a665..bc22f1aac0853 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobContainerStates.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobContainerStates.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - using System; namespace Azure.Storage.Blobs.Models diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/CommitBlockListOptions.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/CommitBlockListOptions.cs index d5803eac5d023..009b587253b4b 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Models/CommitBlockListOptions.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Models/CommitBlockListOptions.cs @@ -5,7 +5,6 @@ using Metadata = System.Collections.Generic.IDictionary; using Tags = System.Collections.Generic.IDictionary; - namespace Azure.Storage.Blobs.Models { /// diff --git a/sdk/storage/Azure.Storage.Blobs/src/PartitionedDownloader.cs b/sdk/storage/Azure.Storage.Blobs/src/PartitionedDownloader.cs index 7c9c2dc34fa6a..76ede8f2304da 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/PartitionedDownloader.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/PartitionedDownloader.cs @@ -339,7 +339,6 @@ await source.CopyToAsync( .ConfigureAwait(false); } - private static void CopyTo( BlobDownloadInfo result, Stream destination, diff --git a/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs index 105e0b3a55fc1..5e690416464e2 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs @@ -1685,7 +1685,6 @@ public async Task OpenWriteAsync_OverwiteNewBlob(bool blobExists) await blob.CreateAsync(); } - byte[] expectedData = GetRandomBuffer(Constants.KB); using Stream stream = new MemoryStream(expectedData); diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs index 2775ed57aeb11..526cba598230d 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs @@ -1770,7 +1770,6 @@ public async Task StartCopyFromUriAsync_Destination_AccessConditions() { await using DisposingContainer test = await GetTestContainerAsync(); - // Arrange var data = GetRandomBuffer(Constants.KB); BlockBlobClient srcBlob = InstrumentClient(test.Container.GetBlockBlobClient(GetNewBlobName())); @@ -1814,7 +1813,6 @@ public async Task StartCopyFromUriAsync_Destination_AccessConditionsFail() { await using DisposingContainer test = await GetTestContainerAsync(); - // Arrange var data = GetRandomBuffer(Constants.KB); BlockBlobClient srcBlob = InstrumentClient(test.Container.GetBlockBlobClient(GetNewBlobName())); @@ -2120,7 +2118,6 @@ public async Task AbortCopyFromUriAsync() BlobServiceClient secondaryService = GetServiceClient_SecondaryAccount_SharedKey(); await using DisposingContainer destTest = await GetTestContainerAsync(service: secondaryService); - { BlockBlobClient destBlob = InstrumentClient(destTest.Container.GetBlockBlobClient(GetNewBlobName())); @@ -2159,7 +2156,6 @@ public async Task AbortCopyFromUriAsync_Lease() BlobServiceClient secondaryService = GetServiceClient_SecondaryAccount_SharedKey(); await using DisposingContainer destTest = await GetTestContainerAsync(service: secondaryService); - BlockBlobClient destBlob = InstrumentClient(destTest.Container.GetBlockBlobClient(GetNewBlobName())); using (var stream = new MemoryStream(data)) { @@ -2174,7 +2170,6 @@ public async Task AbortCopyFromUriAsync_Lease() source: srcBlob.Uri, destinationConditions: new BlobRequestConditions { LeaseId = leaseResponse.Value.LeaseId }); - // Act try { @@ -2200,7 +2195,6 @@ public async Task AbortCopyFromUriAsync_LeaseFail() { await using DisposingContainer test = await GetTestContainerAsync(); - // Arrange await test.Container.SetAccessPolicyAsync(PublicAccessType.Blob); var data = GetRandomBuffer(8 * Constants.MB); @@ -2410,7 +2404,6 @@ public async Task SyncCopyFromUriAsync_Destination_AccessConditions() { await using DisposingContainer test = await GetTestContainerAsync(); - // Arrange var data = GetRandomBuffer(Constants.KB); BlockBlobClient srcBlob = InstrumentClient(test.Container.GetBlockBlobClient(GetNewBlobName())); @@ -2454,7 +2447,6 @@ public async Task SyncCopyFromUriAsync_Destination_AccessConditionsFail() { await using DisposingContainer test = await GetTestContainerAsync(); - // Arrange var data = GetRandomBuffer(Constants.KB); BlockBlobClient srcBlob = InstrumentClient(test.Container.GetBlockBlobClient(GetNewBlobName())); @@ -2623,7 +2615,6 @@ public async Task DeleteAsync() { await using DisposingContainer test = await GetTestContainerAsync(); - // Arrange BlobBaseClient blob = await GetNewBlobClient(test.Container); @@ -2639,7 +2630,6 @@ public async Task DeleteAsync_Options() { await using DisposingContainer test = await GetTestContainerAsync(); - // Arrange BlobBaseClient blob = await GetNewBlobClient(test.Container); await blob.CreateSnapshotAsync(); diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs index e7daf7abffd3b..ff3f1a7f8ef25 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs @@ -479,7 +479,6 @@ public async Task UploadAsync_NonZeroStreamPositionMultipleBlocks() Position = position }; - BlobUploadOptions options = new BlobUploadOptions { TransferOptions = new StorageTransferOptions diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobQuickQueryTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobQuickQueryTests.cs index 14ec0120a1349..1e74c63730740 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobQuickQueryTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobQuickQueryTests.cs @@ -252,7 +252,6 @@ public async Task QueryAsync_NonFatalError() using StreamReader streamReader = new StreamReader(response.Value.Content); string s = await streamReader.ReadToEndAsync(); - // Act - with IBlobQueryErrorReceiver BlobQueryError expectedBlobQueryError = new BlobQueryError { diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobTestBase.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobTestBase.cs index 9c4fd0fe97381..0b711babebab8 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobTestBase.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobTestBase.cs @@ -286,7 +286,6 @@ public async Task GetTestContainerAsync( return new DisposingContainer(container); } - public StorageSharedKeyCredential GetNewSharedKeyCredentials() => new StorageSharedKeyCredential( TestConfigDefault.AccountName, diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobUriBuilderTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobUriBuilderTests.cs index ef1aba2b1f637..c33831505289e 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobUriBuilderTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobUriBuilderTests.cs @@ -212,7 +212,6 @@ public void BlobUriBuilder_RegularUrl_SasTest() Assert.AreEqual(originalUri, newUri); } - [Test] public void BlobUriBuilder_RegularUrl_CNAME() { diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlockBlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlockBlobClientTests.cs index 1fc41c80135f7..f960aef429f98 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlockBlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlockBlobClientTests.cs @@ -336,7 +336,6 @@ public async Task StageBlockAsync_WithUnreliableConnection() const int blobSize = 1 * Constants.MB; await using DisposingContainer test = await GetTestContainerAsync(); - var credentials = new StorageSharedKeyCredential(TestConfigDefault.AccountName, TestConfigDefault.AccountKey); BlobContainerClient containerFaulty = InstrumentClient( new BlobContainerClient( @@ -517,7 +516,6 @@ await RetryAsync( _retryStageBlockFromUri); } - [Test] public async Task StageBlockFromUriAsync_CPK() { @@ -2230,7 +2228,6 @@ public async Task UploadAsync_NonZeroStreamPositionMultipleBlocks() Position = position }; - BlobUploadOptions options = new BlobUploadOptions { TransferOptions = new StorageTransferOptions diff --git a/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs index 4eccf61145ef5..f20700db4b678 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs @@ -242,7 +242,6 @@ public void Ctor_Uri() BlobContainerClient client2 = InstrumentClient(new BlobContainerClient(blobEndpoint)); BlobContainerClient client3 = InstrumentClient(new BlobContainerClient(blobEndpoint, tokenCredentials)); - Assert.AreEqual(accountName, client1.AccountName); Assert.AreEqual(accountName, client2.AccountName); Assert.AreEqual(accountName, client3.AccountName); @@ -2319,7 +2318,6 @@ public async Task ListBlobsHierarchySegmentAsync_Prefix() // Act IList blobs = await test.Container.GetBlobsByHierarchyAsync(prefix: "foo").ToListAsync(); - // Assert Assert.AreEqual(3, blobs.Count); } @@ -2938,7 +2936,6 @@ public async Task ListContainersSegmentAsync_SecondaryStorageFirstRetrySuccessfu AssertSecondaryStorageFirstRetrySuccessful(SecondaryStorageTenantPrimaryHost(), SecondaryStorageTenantSecondaryHost(), testExceptionPolicy); } - private async Task PerformSecondaryStorageTest(int numberOfReadFailuresToSimulate, bool retryOn404 = false) { BlobContainerClient containerClient = GetBlobContainerClient_SecondaryAccount_ReadEnabledOnRetry(numberOfReadFailuresToSimulate, out TestExceptionPolicy testExceptionPolicy, retryOn404); diff --git a/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs index 9d62a89518e19..1502e1a060348 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs @@ -1075,7 +1075,6 @@ public async Task GetPageRangesAsync_Clear() Response diff = await blob.GetPageRangesDiffAsync(range: new HttpRange(0, 6 * Constants.KB), previousSnapshot: snapshot.Value.Snapshot); - // Assert Assert.AreEqual(2, result.Value.PageRanges.Count()); HttpRange pageRange1 = result.Value.PageRanges.First(); diff --git a/sdk/storage/Azure.Storage.Blobs/tests/PartitionedUploaderTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/PartitionedUploaderTests.cs index 93c9aa826ea9b..54bfac07e17ab 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/PartitionedUploaderTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/PartitionedUploaderTests.cs @@ -192,7 +192,6 @@ public async Task MergesBlocksUntilTheyReachOverHalfMaxSize() AssertStaged(sink, content); } - [Test] public async Task BlockIdsAre64BytesUniqueBase64Strings() { diff --git a/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs index 1f7cef27e21d2..9cd0c8df4e764 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs @@ -623,7 +623,6 @@ public async Task FindBlobsByTagAsync_AccountSas(AccountSasPermissions accountSa Assert.IsNotNull(filterBlob); } - [Test] [ServiceVersion(Min = BlobClientOptions.ServiceVersion.V2019_12_12)] public async Task FindBlobsByTagAsync_Error() diff --git a/sdk/storage/Azure.Storage.Common/src/Sas/SasQueryParameters.cs b/sdk/storage/Azure.Storage.Common/src/Sas/SasQueryParameters.cs index f78dc1f25a60c..eb038a204648c 100644 --- a/sdk/storage/Azure.Storage.Common/src/Sas/SasQueryParameters.cs +++ b/sdk/storage/Azure.Storage.Common/src/Sas/SasQueryParameters.cs @@ -193,7 +193,6 @@ public partial class SasQueryParameters /// public string ContentType => _contentType ?? string.Empty; - /// /// Gets the Authorized AAD Object Id associated with the shared access signature. /// The AAD Object ID of a user authorized by the owner of the User Delegation Key diff --git a/sdk/storage/Azure.Storage.Common/src/Shared/ClientsideEncryption/ClientSideDecryptor.cs b/sdk/storage/Azure.Storage.Common/src/Shared/ClientsideEncryption/ClientSideDecryptor.cs index 6c919630f84f5..c74da5096d1b4 100644 --- a/sdk/storage/Azure.Storage.Common/src/Shared/ClientsideEncryption/ClientSideDecryptor.cs +++ b/sdk/storage/Azure.Storage.Common/src/Shared/ClientsideEncryption/ClientSideDecryptor.cs @@ -212,7 +212,6 @@ private async Task> GetContentEncryptionKeyAsync( cancellationToken); } - /// /// Wraps a stream of ciphertext to stream plaintext. /// diff --git a/sdk/storage/Azure.Storage.Common/src/Shared/StorageConnectionString.cs b/sdk/storage/Azure.Storage.Common/src/Shared/StorageConnectionString.cs index 6ef9c69675297..185f6716005ef 100644 --- a/sdk/storage/Azure.Storage.Common/src/Shared/StorageConnectionString.cs +++ b/sdk/storage/Azure.Storage.Common/src/Shared/StorageConnectionString.cs @@ -130,7 +130,6 @@ public StorageConnectionString( DefaultEndpoints = false; } - /// /// Gets a object that references the well-known development storage account. /// diff --git a/sdk/storage/Azure.Storage.Common/tests/PartitionedUploaderTests.cs b/sdk/storage/Azure.Storage.Common/tests/PartitionedUploaderTests.cs index bee6a221908af..85456fbfba1f6 100644 --- a/sdk/storage/Azure.Storage.Common/tests/PartitionedUploaderTests.cs +++ b/sdk/storage/Azure.Storage.Common/tests/PartitionedUploaderTests.cs @@ -29,7 +29,6 @@ public PartitionedUploaderTests(bool async) IsAsync = async; } - private Mock.CreateScope> GetMockCreateScope() { var mock = new Mock.CreateScope>(MockBehavior.Strict); diff --git a/sdk/storage/Azure.Storage.Common/tests/PooledMemoryStreamTests.cs b/sdk/storage/Azure.Storage.Common/tests/PooledMemoryStreamTests.cs index 119ba55317f3c..44027d8fbacfa 100644 --- a/sdk/storage/Azure.Storage.Common/tests/PooledMemoryStreamTests.cs +++ b/sdk/storage/Azure.Storage.Common/tests/PooledMemoryStreamTests.cs @@ -65,7 +65,6 @@ public void StreamCanHoldLongData() PooledMemoryStream arrayPoolStream = PooledMemoryStream.BufferStreamPartitionInternal(originalStream, dataSize, dataSize, 0, _pool, bufferPartitionSize, false, default).EnsureCompleted(); originalStream.Position = 0; - // assert it holds the correct amount of data. other tests assert data validity and it's so expensive to do that here. // test without blowing up memory const int testSize = 256 * Constants.MB; diff --git a/sdk/storage/Azure.Storage.Common/tests/Shared/TestProgress.cs b/sdk/storage/Azure.Storage.Common/tests/Shared/TestProgress.cs index 140857cc5bab1..09d8e44adfbf0 100644 --- a/sdk/storage/Azure.Storage.Common/tests/Shared/TestProgress.cs +++ b/sdk/storage/Azure.Storage.Common/tests/Shared/TestProgress.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - using System; using System.Collections.Generic; using System.Text; diff --git a/sdk/storage/Azure.Storage.Common/tests/StorageConnectionStringTests.cs b/sdk/storage/Azure.Storage.Common/tests/StorageConnectionStringTests.cs index 89e85631df068..e107511237864 100644 --- a/sdk/storage/Azure.Storage.Common/tests/StorageConnectionStringTests.cs +++ b/sdk/storage/Azure.Storage.Common/tests/StorageConnectionStringTests.cs @@ -437,14 +437,12 @@ public void ValidateExpectedExceptions() accountKeyParams ); - var accountStringKeyPrimarySecondary = string.Format( "DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1};EndpointSuffix={2};" + endpointCombination[2], accountKeyParams ); - var conn = StorageConnectionString.Parse(accountStringKeyPrimary); // no exception expected // Query params should not be set as no Sas token is included @@ -473,14 +471,12 @@ public void ValidateExpectedExceptions() accountKeyParams ); - var accountStringKeyNoDefaultProtocolPrimarySecondary = string.Format( "AccountName={0};AccountKey={1};EndpointSuffix={2};" + endpointCombination[2], accountKeyParams ); - StorageConnectionString.Parse(accountStringKeyNoDefaultProtocolPrimary); // no exception expected TestHelper.AssertExpectedException( diff --git a/sdk/storage/Azure.Storage.Common/tests/StorageWriteStreamTests.cs b/sdk/storage/Azure.Storage.Common/tests/StorageWriteStreamTests.cs index 2134feba8d6c5..038e20cdbc207 100644 --- a/sdk/storage/Azure.Storage.Common/tests/StorageWriteStreamTests.cs +++ b/sdk/storage/Azure.Storage.Common/tests/StorageWriteStreamTests.cs @@ -184,7 +184,6 @@ public async Task WritesLargerThanBufferNonAligned() int writeSize = 2000; int writeCount = 2; - Mock mockBuffer = new Mock(MockBehavior.Strict); StorageWriteStreamImplementation stream = new StorageWriteStreamImplementation( position: 0, diff --git a/sdk/storage/Azure.Storage.Files.DataLake/samples/Sample01a_HelloWorld.cs b/sdk/storage/Azure.Storage.Files.DataLake/samples/Sample01a_HelloWorld.cs index ac09d7d3e0c25..46d3f157ff4cd 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/samples/Sample01a_HelloWorld.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/samples/Sample01a_HelloWorld.cs @@ -525,7 +525,6 @@ public void Errors() filesystem.Delete(); } - /// /// Set permissions in the access control list and gets access control list on a DataLake File /// diff --git a/sdk/storage/Azure.Storage.Files.DataLake/samples/Sample01b_HelloWorldAsync.cs b/sdk/storage/Azure.Storage.Files.DataLake/samples/Sample01b_HelloWorldAsync.cs index 24c53b79b61cd..086977b732de0 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/samples/Sample01b_HelloWorldAsync.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/samples/Sample01b_HelloWorldAsync.cs @@ -88,7 +88,6 @@ public async Task CreateFileClientAsync_Directory() await filesystem.DeleteAsync(); } - /// /// Create a DataLake Directory. /// diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeDirectoryClient.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeDirectoryClient.cs index 21168df997857..dd2acfa2dcf43 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeDirectoryClient.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeDirectoryClient.cs @@ -1339,7 +1339,6 @@ public virtual Response GetProperties( } } - /// /// The operation returns all /// user-defined metadata, standard HTTP properties, and system diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileClient.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileClient.cs index 406311c9e7a90..4f46baa0a7e47 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileClient.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileClient.cs @@ -1326,7 +1326,6 @@ public virtual Response GetProperties( } } - /// /// The operation returns all /// user-defined metadata, standard HTTP properties, and system diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileSystemClient.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileSystemClient.cs index 4f8ecad424340..ab834f4e8914a 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileSystemClient.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileSystemClient.cs @@ -375,7 +375,6 @@ public virtual DataLakeDirectoryClient GetDirectoryClient(string directoryName) } } - /// /// Creates a new for the /// root directory of the file system. @@ -765,7 +764,6 @@ public virtual Response Delete( } } - /// /// The operation marks the specified /// file system for deletion. The file system and any paths contained @@ -867,7 +865,6 @@ public virtual Response DeleteIfExists( } } - /// /// The operation marks the specified /// file system for deletion if it exists. The file system and any files diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakePathClient.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakePathClient.cs index 2b4624257b80f..b973c42e1ef54 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakePathClient.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakePathClient.cs @@ -895,7 +895,6 @@ public virtual Response CreateIfNotExists( cancellationToken) .EnsureCompleted(); - /// /// The /// operation creates a file or directory. If the file or directory already exists, it is not changed. @@ -956,7 +955,6 @@ public virtual async Task> CreateIfNotExistsAsync( cancellationToken) .ConfigureAwait(false); - /// /// The /// operation creates a file or directory. If the file or directory already exists, it is not changed. diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeAccessPolicy.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeAccessPolicy.cs index e6b9326948e73..106e5da032195 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeAccessPolicy.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeAccessPolicy.cs @@ -21,7 +21,6 @@ public class DataLakeAccessPolicy /// public DateTimeOffset? PolicyExpiresOn { get; set; } - /// /// The the policy becomes active. /// This value is non-nullable, please use . diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/DataLakeTestBase.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/DataLakeTestBase.cs index 6a4cc5522338d..8bf7b57e447d2 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/DataLakeTestBase.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/DataLakeTestBase.cs @@ -183,7 +183,6 @@ public void AssertMetadataEquality( Assert.AreEqual(expected.Count, actual.Count, "Metadata counts are not equal"); } - foreach (KeyValuePair kvp in expected) { if (!actual.TryGetValue(kvp.Key, out var value) || @@ -249,7 +248,6 @@ public DataLakeServiceClient GetServiceClient_DataLakeServiceIdentitySas_Path( (new Uri($"{TestConfigHierarchicalNamespace.BlobServiceEndpoint}?{sasCredentials ?? GetNewDataLakeServiceIdentitySasCredentialsPath(fileSystemName: fileSystemName, path: path, userDelegationKey: userDelegationKey, accountName: TestConfigHierarchicalNamespace.AccountName)}")).ToHttps(), GetOptions())); - public StorageSharedKeyCredential GetNewSharedKeyCredentials() => new StorageSharedKeyCredential( TestConfigHierarchicalNamespace.AccountName, diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs index c16f1f3381aab..4e7a045b8519c 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs @@ -807,7 +807,6 @@ public async Task GetAccessControlAsync_Oauth() Assert.IsNotNull(accessControl.AccessControlList); } - [Test] public async Task GetAccessControlAsync_FileSystemSAS() { @@ -2058,7 +2057,6 @@ public async Task UpdateAccessControlRecursiveAsync_ContinueOnFailure() DataLakeDirectoryClient subdirectory3 = await subdirectory2.CreateSubDirectoryAsync(GetNewDirectoryName()); string[] failedPathNames = { file4.Path, file5.Path, file6.Path, subdirectory3.Path }; - AccessControlChangeOptions options = new AccessControlChangeOptions() { ContinueOnFailure = true diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs index 0ce37da5c9ac6..9f3d4fab7b776 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs @@ -448,7 +448,6 @@ await TestHelper.AssertExpectedExceptionAsync( e => Assert.AreEqual("AuthenticationFailed", e.ErrorCode)); } - [Test] public async Task DeleteAsync() { @@ -2983,7 +2982,6 @@ public async Task UploadAsync_FileLarge() var data = GetRandomBuffer(300 * Constants.MB); - using (var stream = new MemoryStream(data)) { var path = System.IO.Path.GetTempFileName(); @@ -3020,7 +3018,6 @@ public async Task UploadAsync_MinFile(bool readOnlyFile) var data = GetRandomBuffer(Constants.KB); - using (var stream = new MemoryStream(data)) { var path = System.IO.Path.GetTempFileName(); @@ -3137,7 +3134,6 @@ public async Task UploadAsync_MinFileNoOverride() var data = GetRandomBuffer(Constants.KB); - using (var stream = new MemoryStream(data)) { var path = System.IO.Path.GetTempFileName(); @@ -3437,7 +3433,6 @@ public async Task QueryAsync_NonFatalError() using StreamReader streamReader = new StreamReader(response.Value.Content); string s = await streamReader.ReadToEndAsync(); - // Act - with IBlobQueryErrorReceiver DataLakeQueryError expectedBlobQueryError = new DataLakeQueryError { @@ -4585,7 +4580,6 @@ public async Task OpenWriteAsync_Overwite(bool fileExists) await file.CreateAsync(); } - byte[] data = GetRandomBuffer(Constants.KB); using Stream stream = new MemoryStream(data); diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/PathAccessControlExtensionsTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/PathAccessControlExtensionsTests.cs index 64cf300f2ee01..eeafddf99552d 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/PathAccessControlExtensionsTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/PathAccessControlExtensionsTests.cs @@ -155,7 +155,6 @@ public void ToSymbolicString() Assert.AreEqual("rwx", (RolePermissions.Read | RolePermissions.Write | RolePermissions.Execute).ToSymbolicRolePermissions()); } - [Test] public void SerializeAccessControlList() { diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileDownloadDetails.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileDownloadDetails.cs index fe1cf4bc42065..014e458709279 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileDownloadDetails.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileDownloadDetails.cs @@ -105,7 +105,6 @@ public partial class ShareFileDownloadDetails /// public bool IsServerEncrypted => _flattened.IsServerEncrypted; - /// /// When a file is leased, specifies whether the lease is of infinite or fixed duration. /// diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareStatistics.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareStatistics.cs index 0ed25d3fc4281..95d2be28ca81f 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareStatistics.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareStatistics.cs @@ -16,7 +16,6 @@ namespace Azure.Storage.Files.Shares.Models public partial class ShareStatistics { - /// /// Warning: ShareUsageBytes may exceed int.MaxValue. Use ShareUsageInBytes instead. /// diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareClient.cs index b2c4416b6a82e..0a4c05a6ae3f1 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareClient.cs @@ -329,7 +329,6 @@ public virtual ShareDirectoryClient GetDirectoryClient(string directoryName) ClientDiagnostics); } - /// /// Create a object for the root of the /// share. The new uses the same request diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs index fdec99fb207d7..bfc1943bbf571 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs @@ -3183,7 +3183,6 @@ public virtual Response ClearRange( cancellationToken: cancellationToken) .EnsureCompleted(); - /// /// The /// operation clears the of a file. @@ -3768,8 +3767,6 @@ await this.UploadRangeFromUriInternal( cancellationToken) .ConfigureAwait(false); - - /// /// The /// operation writes a range from an Azure File to another Azure file. This API is supported only for version 2019-02-02 and higher. diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs index bf57349478a3a..3e95237f6830b 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs @@ -603,7 +603,6 @@ public async Task SetPropertiesAsync_SmbProperties() FileLastWrittenOn = new DateTimeOffset(2019, 8, 26, 5, 15, 25, 60, TimeSpan.Zero), }; - await directory.CreateIfNotExistsAsync(); // Act @@ -1079,7 +1078,6 @@ public async Task GetSubDirectoryClient_SpecialCharacters(string directoryName, Uri expectedUri = new Uri($"https://{TestConfigDefault.AccountName}.file.core.windows.net/{test.Share.Name}/{Uri.EscapeDataString(directoryName)}/{Uri.EscapeDataString(subDirectoryName)}"); - ShareDirectoryClient directoryFromConstructor = new ShareDirectoryClient( TestConfigDefault.ConnectionString, test.Share.Name, diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs index 2fbf07867be14..9a6c660fb243a 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs @@ -991,7 +991,6 @@ public async Task SetPropertiesAsync_SmbProperties() FileLastWrittenOn = new DateTimeOffset(2019, 8, 26, 5, 15, 25, 60, TimeSpan.Zero), }; - await file.CreateAsync(maxSize: Constants.KB); // Act @@ -1216,8 +1215,6 @@ await source.UploadRangeAsync( }; string filePermission = "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)"; - - // Act await dest.StartCopyAsync( sourceUri: source.Uri, @@ -2207,7 +2204,6 @@ await file.UploadRangeAsync( TestHelper.AssertSequenceEqual(expectedData, actualData); } - [Test] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task UploadRangeAsync_4TB() @@ -2840,7 +2836,6 @@ public async Task UploadRangeFromUriAsync_Error() var destRange = new HttpRange(256, 256); var sourceRange = new HttpRange(512, 256); - // Act await TestHelper.AssertExpectedExceptionAsync( destFile.UploadRangeFromUriAsync( @@ -2915,7 +2910,6 @@ public async Task ForceCloseHandles_Error() await using DisposingDirectory test = await GetTestDirectoryAsync(); ShareDirectoryClient directory = test.Directory; - ShareFileClient file = InstrumentClient(directory.GetFileClient(GetNewDirectoryName())); // Act diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/ShareClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/ShareClientTests.cs index 96a25e4cf18fc..18f055c36bf0e 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/ShareClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/ShareClientTests.cs @@ -1507,7 +1507,6 @@ public async Task GetDirectoryClient_SpecialCharacters(string directoryName) ShareDirectoryClient directoryFromShareClient = InstrumentClient(test.Share.GetDirectoryClient(directoryName)); Uri expectedUri = new Uri($"https://{TestConfigDefault.AccountName}.file.core.windows.net/{test.Share.Name}/{Uri.EscapeDataString(directoryName)}"); - // Act Response createResponse = await directoryFromShareClient.CreateAsync(); @@ -1608,7 +1607,6 @@ public async Task AcquireLeaseAsync_Snapshot() Response snapshotResponse = await test.Share.CreateSnapshotAsync(); ShareClient snapshotShare = test.Share.WithSnapshot(snapshotResponse.Value.Snapshot); - string id = Recording.Random.NewGuid().ToString(); TimeSpan duration = TimeSpan.FromSeconds(15); ShareLeaseClient leaseClient = InstrumentClient(snapshotShare.GetShareLeaseClient(id)); diff --git a/sdk/storage/Azure.Storage.Internal.Avro/src/AvroReader.cs b/sdk/storage/Azure.Storage.Internal.Avro/src/AvroReader.cs index df4813fdaf5f8..71c5c4c27e5c3 100644 --- a/sdk/storage/Azure.Storage.Internal.Avro/src/AvroReader.cs +++ b/sdk/storage/Azure.Storage.Internal.Avro/src/AvroReader.cs @@ -197,7 +197,6 @@ public virtual async Task Next(bool async, CancellationToken cancellatio throw new ArgumentException("There are no more items in the stream"); } - object result = await _itemType.ReadAsync(_dataStream, async, cancellationToken).ConfigureAwait(false); _itemsRemainingInBlock--; diff --git a/sdk/storage/Azure.Storage.Queues/tests/QueueClientTests.cs b/sdk/storage/Azure.Storage.Queues/tests/QueueClientTests.cs index 63a98f23ac0e0..857f7c5f87330 100644 --- a/sdk/storage/Azure.Storage.Queues/tests/QueueClientTests.cs +++ b/sdk/storage/Azure.Storage.Queues/tests/QueueClientTests.cs @@ -232,7 +232,6 @@ public async Task CreateAsync_WithQueueServiceSas() // Act Response result = await queue.CreateAsync(); - // Assert Assert.Fail("CreateAsync unexpected success: queue service SAS should not be usable to create queue"); } diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/samples/BlobExtensionSamples.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/samples/BlobExtensionSamples.cs index 06bd470999dbf..e184caa9e8b22 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/samples/BlobExtensionSamples.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/samples/BlobExtensionSamples.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - using System; using System.Collections.Generic; using System.IO; diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobPath.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobPath.cs index ee0d2420380c0..2902c33c2b8a2 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobPath.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobPath.cs @@ -122,7 +122,6 @@ private static bool TryParseAndValidate(string value, out string errorMessage, o return true; } - if (!TryParse(value, isContainerBinding, out possiblePath)) { errorMessage = $"Invalid blob path specified : '{value}'. Blob identifiers must be in the format 'container/blob'."; diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Listeners/ScanContainersStrategy.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Listeners/ScanContainersStrategy.cs index 975278470184c..fbe96f26aaf95 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Listeners/ScanContainersStrategy.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Listeners/ScanContainersStrategy.cs @@ -162,7 +162,6 @@ public static async Task, DateTime>> PollNewBl { currentBlobs = container.GetBlobsAsync(cancellationToken: cancellationToken); - List newBlobs = new List(); // Type cast to IStorageBlob is safe due to useFlatBlobListing: true above. diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/RequestFailedExceptionExtensions.Blobs.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/RequestFailedExceptionExtensions.Blobs.cs index 20debaaaf53b4..20a12cf8213bb 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/RequestFailedExceptionExtensions.Blobs.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/RequestFailedExceptionExtensions.Blobs.cs @@ -102,8 +102,6 @@ public static bool IsNotFoundContainerNotFound(this RequestFailedException excep return exception.ErrorCode == "ContainerNotFound"; } - - /// /// Determines whether the exception is due to a 404 Not Found error with the error code BlobNotFound or /// ContainerNotFound. diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/StorageLoadBalancerQueue.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/StorageLoadBalancerQueue.cs index 7ee1732373f85..78e08e952fd21 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/StorageLoadBalancerQueue.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/StorageLoadBalancerQueue.cs @@ -66,7 +66,6 @@ public QueueWriter(StorageLoadBalancerQueue parent, QueueClient queue) this._queue = queue; } - public async Task AddAsync(T item, CancellationToken cancellationToken = default(CancellationToken)) { string contents = JsonConvert.SerializeObject( diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/BlobConfigurationTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/BlobConfigurationTests.cs index c1e1c82c028df..f2f47a84360a8 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/BlobConfigurationTests.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/BlobConfigurationTests.cs @@ -98,7 +98,6 @@ private void SetupAzurite(IWebJobsBuilder builder) }); } - private class BindToCloudBlockBlobProgram { public BlockBlobClient Result { get; set; } diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/BlobPathSourceTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/BlobPathSourceTests.cs index 8d0c12e94ae13..978448b124c85 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/BlobPathSourceTests.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/BlobPathSourceTests.cs @@ -100,7 +100,6 @@ public void TestMethod4() Assert.AreEqual("foo.csv", d["name"]); } - [Test] public void TestMethodExtension() { diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/BlobTriggerTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/BlobTriggerTests.cs index 9087cc6b577b3..9c97540821ad0 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/BlobTriggerTests.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/BlobTriggerTests.cs @@ -13,7 +13,6 @@ using Microsoft.Extensions.Hosting; using NUnit.Framework; - namespace Microsoft.Azure.WebJobs.Extensions.Storage.Blobs { public class BlobTriggerTests diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/Listeners/BlobTriggerExecutorTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/Listeners/BlobTriggerExecutorTests.cs index 22d9a4187184c..ae1a3b01279f0 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/Listeners/BlobTriggerExecutorTests.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/Listeners/BlobTriggerExecutorTests.cs @@ -373,7 +373,6 @@ public void ExecuteAsync_IfLeasedIncompleteReceipt_EnqueuesMessageMarksCompleted string expectedETag = context.Blob.BlobClient.GetProperties().Value.ETag.ToString(); IBlobPathSource input = CreateBlobPath(context.Blob); - Mock managerMock = CreateReceiptManagerReferenceMock(); managerMock .Setup(m => m.TryReadAsync(It.IsAny(), It.IsAny())) diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/Listeners/ScanBlobScanLogHybridPollingStrategyTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/Listeners/ScanBlobScanLogHybridPollingStrategyTests.cs index 13557f06e5bd7..b1d0e460c2d9e 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/Listeners/ScanBlobScanLogHybridPollingStrategyTests.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/Listeners/ScanBlobScanLogHybridPollingStrategyTests.cs @@ -348,7 +348,6 @@ public async Task ExecuteAsync_UpdatesScanInfoManager() Assert.AreEqual(1, testScanInfoManager.UpdateCounts[accountName][SecondContainerName]); } - [Test] public async Task ExecuteAsync_UpdatesScanInfo_WithEarliestFailure() { diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/samples/QueueExtensionSamples.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/samples/QueueExtensionSamples.cs index 532e58dda591f..3a74c7491e003 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/samples/QueueExtensionSamples.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/samples/QueueExtensionSamples.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - using System; using System.Collections.Generic; using System.Threading.Tasks; diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/DataBindingFunctionalTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/DataBindingFunctionalTests.cs index d5f4b59bf1b8f..5b19a2b9590e0 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/DataBindingFunctionalTests.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/DataBindingFunctionalTests.cs @@ -35,7 +35,6 @@ public async Task BindStringableParameter_CanInvoke() b.UseQueueService(queueServiceClient); }); - var host = builder.Build().GetJobHost(); MethodInfo method = typeof(TestFunctions).GetMethod("BindStringableParameter"); diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/HostStartTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/HostStartTests.cs index 7ccc837b29fe2..1399d2972c817 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/HostStartTests.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/HostStartTests.cs @@ -31,7 +31,6 @@ public async Task Queue_IfNameIsInvalid_ThrowsDuringIndexing() }) .Build(); - var jobHost = host.GetJobHost(); string expectedMessage = "The dash (-) character may not be the first or last letter - \"-illegalname-\""; diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/QueueProcessorTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/QueueProcessorTests.cs index 8216f3ddd184e..b15b790dfb247 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/QueueProcessorTests.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/QueueProcessorTests.cs @@ -208,7 +208,6 @@ public async Task BeginProcessingMessageAsync_MaxDequeueCountExceeded_MovesMessa Assert.True(poisonMessageHandlerCalled); } - public class TestFixture : IDisposable { private const string TestQueuePrefix = "queueprocessortests"; diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/QueueTriggerTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/QueueTriggerTests.cs index 9267d0f1c5bbe..a64d5a72d34b3 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/QueueTriggerTests.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/QueueTriggerTests.cs @@ -152,8 +152,6 @@ private async Task TestBindToByteArray(byte[] expectedContent) Assert.AreEqual(expectedContent, result); } - - [Test] public async Task QueueTrigger_IfBoundToBinaryData_Binds() { diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/BlobBindingEndToEndTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/BlobBindingEndToEndTests.cs index c266487a508de..e19e544bc5172 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/BlobBindingEndToEndTests.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/BlobBindingEndToEndTests.cs @@ -713,7 +713,6 @@ public async Task InitializeAsync(WebJobsTestEnvironment testEnvironment) }) .Build(); - JobHost = Host.GetJobHost(); BlobServiceClient = new BlobServiceClient(testEnvironment.PrimaryStorageAccountConnectionString); diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/BlobTriggerEndToEndTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/BlobTriggerEndToEndTests.cs index 90acf96320b56..f89502e1dd6ba 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/BlobTriggerEndToEndTests.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/BlobTriggerEndToEndTests.cs @@ -248,7 +248,6 @@ public async Task BlobGetsProcessedOnlyOnce_SingleHost() await host.StopAsync(); - // Can't restart Assert.Throws(() => host.Start()); } @@ -285,7 +284,6 @@ await _testContainer var prog = new BlobGetsProcessedOnlyOnce_SingleHost_Program(); - string hostId = Guid.NewGuid().ToString("N"); var host1 = NewBuilder(prog, builder=>builder.UseHostId(hostId)) .Build(); diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/MultipleStorageAccountsEndToEndTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/MultipleStorageAccountsEndToEndTests.cs index 8bf1140805bff..0ebe50c19bae8 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/MultipleStorageAccountsEndToEndTests.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/MultipleStorageAccountsEndToEndTests.cs @@ -29,7 +29,6 @@ public class MultipleStorageAccountsEndToEndTests : LiveTestBase public string EndRowKey { get; set; } - public static TableSasQueryParameters Empty => new TableSasQueryParameters(); internal TableSasQueryParameters() diff --git a/sdk/tables/Azure.Data.Tables/src/TableClient.cs b/sdk/tables/Azure.Data.Tables/src/TableClient.cs index 4b9454ecb23be..1577058d47fea 100644 --- a/sdk/tables/Azure.Data.Tables/src/TableClient.cs +++ b/sdk/tables/Azure.Data.Tables/src/TableClient.cs @@ -837,7 +837,6 @@ public virtual async Task DeleteAsync(CancellationToken cancellationTo } } - /// /// Queries entities in the table. /// diff --git a/sdk/tables/Azure.Data.Tables/src/TableConnectionString.cs b/sdk/tables/Azure.Data.Tables/src/TableConnectionString.cs index f33644d09c136..f6ee0603a39de 100644 --- a/sdk/tables/Azure.Data.Tables/src/TableConnectionString.cs +++ b/sdk/tables/Azure.Data.Tables/src/TableConnectionString.cs @@ -471,7 +471,6 @@ internal static (Uri, Uri) ConstructTableEndpoint(string scheme, string accountN return ConstructUris(scheme, accountName, TableConstants.ConnectionStrings.DefaultTableHostnamePrefix, endpointSuffix, sasToken); } - /// /// Gets the default table endpoint using the specified settings. /// diff --git a/sdk/tables/Azure.Data.Tables/tests/TableClientLiveTests.cs b/sdk/tables/Azure.Data.Tables/tests/TableClientLiveTests.cs index a25b93051048e..1dfb19cd55192 100644 --- a/sdk/tables/Azure.Data.Tables/tests/TableClientLiveTests.cs +++ b/sdk/tables/Azure.Data.Tables/tests/TableClientLiveTests.cs @@ -371,7 +371,6 @@ public async Task EntityMergeDoesPartialPropertyUpdates() {mergepropertyName, mergeValue} }; - // Create the new entity. await client.UpsertEntityAsync(entity, TableUpdateMode.Replace).ConfigureAwait(false); diff --git a/sdk/tables/Azure.Data.Tables/tests/TableClientQueryableLiveTests.cs b/sdk/tables/Azure.Data.Tables/tests/TableClientQueryableLiveTests.cs index 771ecdeb9354b..a2a0c60f3ff9c 100644 --- a/sdk/tables/Azure.Data.Tables/tests/TableClientQueryableLiveTests.cs +++ b/sdk/tables/Azure.Data.Tables/tests/TableClientQueryableLiveTests.cs @@ -298,7 +298,6 @@ public async Task TableQueryableEnumerateTwice() } } - [RecordedTest] public async Task TableQueryableOnSupportedTypes() { @@ -322,7 +321,6 @@ public async Task TableQueryableOnSupportedTypes() Assert.That(results.Count, Is.EqualTo(1)); - // 3. Filter on Long results = await client.QueryAsync(ent => ent.Int64 >= thirdEntity.Int64).ToEnumerableAsync().ConfigureAwait(false); @@ -336,7 +334,6 @@ public async Task TableQueryableOnSupportedTypes() Assert.That(results.Count, Is.EqualTo(2)); - // 4. Filter on Double results = await client.QueryAsync(ent => ent.Double >= thirdEntity.Double).ToEnumerableAsync().ConfigureAwait(false); @@ -346,7 +343,6 @@ public async Task TableQueryableOnSupportedTypes() Assert.That(results.Count, Is.EqualTo(2)); - // 5. Filter on Integer results = await client.QueryAsync(ent => ent.Int32 >= thirdEntity.Int32).ToEnumerableAsync().ConfigureAwait(false); @@ -356,7 +352,6 @@ public async Task TableQueryableOnSupportedTypes() Assert.That(results.Count, Is.EqualTo(2)); - // 6. Filter on Date results = await client.QueryAsync(ent => ent.DateTimeOffset >= thirdEntity.DateTimeOffset).ToEnumerableAsync().ConfigureAwait(false); @@ -366,7 +361,6 @@ public async Task TableQueryableOnSupportedTypes() Assert.That(results.Count, Is.EqualTo(2)); - // 7. Filter on Boolean results = await client.QueryAsync(ent => ent.Bool == thirdEntity.Bool).ToEnumerableAsync().ConfigureAwait(false); @@ -376,7 +370,6 @@ public async Task TableQueryableOnSupportedTypes() Assert.That(results.Count, Is.EqualTo(2)); - // 8. Filter on Binary results = await client.QueryAsync(ent => ent.Binary == thirdEntity.Binary).ToEnumerableAsync().ConfigureAwait(false); @@ -386,7 +379,6 @@ public async Task TableQueryableOnSupportedTypes() Assert.That(results.Count, Is.EqualTo(1)); - // 10. Complex Filter on Binary GTE results = await client.QueryAsync(ent => ent.PartitionKey == thirdEntity.PartitionKey && @@ -424,7 +416,6 @@ public async Task TableQueryableWithDictionaryTypeOnSupportedTypes() Assert.That(results.Count, Is.EqualTo(1)); - // 3. Filter on Long results = await client.QueryAsync(ent => ent.GetInt64("Int64") >= thirdEntity.Int64).ToEnumerableAsync().ConfigureAwait(false); @@ -438,7 +429,6 @@ public async Task TableQueryableWithDictionaryTypeOnSupportedTypes() Assert.That(results.Count, Is.EqualTo(2)); - // 4. Filter on Double results = await client.QueryAsync(ent => ent.GetDouble("Double") >= thirdEntity.Double).ToEnumerableAsync().ConfigureAwait(false); @@ -448,7 +438,6 @@ public async Task TableQueryableWithDictionaryTypeOnSupportedTypes() Assert.That(results.Count, Is.EqualTo(2)); - // 5. Filter on Integer results = await client.QueryAsync(ent => ent.GetInt32("Int32") >= thirdEntity.Int32).ToEnumerableAsync().ConfigureAwait(false); @@ -458,7 +447,6 @@ public async Task TableQueryableWithDictionaryTypeOnSupportedTypes() Assert.That(results.Count, Is.EqualTo(2)); - // 6. Filter on Date results = await client.QueryAsync(ent => (DateTimeOffset)ent["DateTimeOffset"] >= thirdEntity.DateTimeOffset).ToEnumerableAsync().ConfigureAwait(false); @@ -468,7 +456,6 @@ public async Task TableQueryableWithDictionaryTypeOnSupportedTypes() Assert.That(results.Count, Is.EqualTo(2)); - // 7. Filter on Boolean results = await client.QueryAsync(ent => ent.GetBoolean("Bool") == thirdEntity.Bool).ToEnumerableAsync().ConfigureAwait(false); @@ -478,7 +465,6 @@ public async Task TableQueryableWithDictionaryTypeOnSupportedTypes() Assert.That(results.Count, Is.EqualTo(2)); - // 8. Filter on Binary results = await client.QueryAsync(ent => ent.GetBinary("Binary") == thirdEntity.Binary).ToEnumerableAsync().ConfigureAwait(false); @@ -493,7 +479,6 @@ public async Task TableQueryableWithDictionaryTypeOnSupportedTypes() Assert.That(results.Count, Is.EqualTo(2)); - // 10. Complex Filter on Binary GTE results = await client.QueryAsync(ent => ent.PartitionKey == thirdEntity.PartitionKey && diff --git a/sdk/tables/Azure.Data.Tables/tests/TableServiceLiveTestsBase.cs b/sdk/tables/Azure.Data.Tables/tests/TableServiceLiveTestsBase.cs index 5e6af48367faa..a3858d7466219 100644 --- a/sdk/tables/Azure.Data.Tables/tests/TableServiceLiveTestsBase.cs +++ b/sdk/tables/Azure.Data.Tables/tests/TableServiceLiveTestsBase.cs @@ -94,7 +94,6 @@ public async Task TablesTestSetup() client = service.GetTableClient(tableName); } - [TearDown] public async Task TablesTeardown() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeOperation.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeOperation.cs index 4c6638f9b518d..6a43c48484e5c 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeOperation.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeOperation.cs @@ -121,7 +121,6 @@ internal AnalyzeOperation(TextAnalyticsRestClient serviceClient, ClientDiagnosti Id = operationLocation.Split('/').Last(); } - /// /// The last HTTP response received from the server. /// diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/HealthcareOperation.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/HealthcareOperation.cs index 7782ec7ed4314..a468850d1f1c5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/HealthcareOperation.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/HealthcareOperation.cs @@ -122,7 +122,6 @@ internal HealthcareOperation(TextAnalyticsRestClient serviceClient, ClientDiagno Id = operationLocation.Split('/').Last(); } - /// /// The last HTTP response received from the server. /// diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs index c287b7907d3b9..056dd7c3cea14 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs @@ -31,7 +31,6 @@ public partial class TextAnalyticsClient // Specifies the method used to interpret string offsets. Default to . private readonly StringIndexType _stringCodeUnit = StringIndexType.Utf16CodeUnit; - /// /// Protected constructor to allow mocking. /// diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeHealthcareEntitiesTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeHealthcareEntitiesTests.cs index 7b047f1f22012..71b88a6db448d 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeHealthcareEntitiesTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeHealthcareEntitiesTests.cs @@ -77,7 +77,6 @@ public async Task RecognizeHealthcareEntitiesTest() Assert.AreEqual(relation.Source.Length, 5); Assert.AreEqual(relation.Source.Offset, 18); - Assert.AreEqual(relation.Target.Text, "ibuprofen"); Assert.AreEqual(relation.Target.Category, "MedicationName"); Assert.AreEqual(relation.Target.ConfidenceScore, 1); diff --git a/sdk/timeseriesinsights/Azure.Iot.TimeSeriesInsights/tests/TestSettings.cs b/sdk/timeseriesinsights/Azure.Iot.TimeSeriesInsights/tests/TestSettings.cs index 4a94615eb92a0..68b26e1c58ee0 100644 --- a/sdk/timeseriesinsights/Azure.Iot.TimeSeriesInsights/tests/TestSettings.cs +++ b/sdk/timeseriesinsights/Azure.Iot.TimeSeriesInsights/tests/TestSettings.cs @@ -36,7 +36,6 @@ static TestSettings() return; } - string codeBase = Assembly.GetExecutingAssembly().Location; string workingDirectory = Path.GetDirectoryName(codeBase); From 5e32cede44cb2e6ed8a8d6dab7bb1e586df052ea Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Thu, 3 Dec 2020 14:56:31 -0800 Subject: [PATCH 2/4] more rules --- common/Perf/Azure.Test.Perf/PerfProgram.cs | 1 - common/Stress/Azure.Test.Stress/StressTest.cs | 1 - eng/CodeAnalysis.ruleset | 6 +++--- .../tests/ConfigurationRecordMatcher.cs | 1 - .../tests/ConfigurationSettingTests.cs | 1 - .../Sample1_CommunicationIdentityClient.cs | 1 - .../tests/samples/Sample3_MemberOperations.cs | 1 - .../tests/SmsClientTest.cs | 1 - ...nicationManagementRecordedTestSanitizer.cs | 1 - .../ScenarioTests/AvailabilitySetTests.cs | 3 --- .../tests/ScenarioTests/DedicatedHostTests.cs | 2 -- .../ProximityPlacementGroupTests.cs | 1 - .../tests/ScenarioTests/VMCertificateTests.cs | 1 - .../ScenarioTests/VMDiskEncryptionTests.cs | 1 - .../tests/ScenarioTests/VMOperationalTests.cs | 1 - .../tests/ScenarioTests/VMScenarioTests.cs | 1 - .../VMScaleSetOperationalTests.cs | 1 - .../VMScaleSetTests/VMScaleSetTestsBase.cs | 1 - .../src/DynamicJson.cs | 2 -- .../tests/DynamicJsonDynamicMutableTests.cs | 1 - .../tests/DynamicJsonMutableTests.cs | 1 - .../src/ClientTestFixtureAttribute.cs | 1 - .../src/RecordEntryMessage.cs | 1 - .../src/RecordSession.cs | 1 - .../src/RecordedTestUtilities.cs | 1 - sdk/core/Azure.Core/src/ClientOptions.cs | 1 - .../Internal/AzureBaseBuffersExtensions.cs | 1 - .../Pipeline/Internal/HttpEnvironmentProxy.cs | 2 -- .../src/Pipeline/Internal/LoggingPolicy.cs | 1 - .../Pipeline/Internal/ReadTimeoutStream.cs | 3 +-- .../Azure.Core/src/Shared/DiagnosticScope.cs | 1 - .../src/Shared/HttpMessageSanitizer.cs | 3 +-- .../Multipart/MultipartFormDataContent.cs | 1 - .../Azure.Core/src/Shared/RetriableStream.cs | 1 - .../Azure.Core/src/Shared/TaskExtensions.cs | 1 - .../tests/ClientDiagnosticsTests.cs | 2 -- .../Azure.Core/tests/ClientOptionsTests.cs | 2 -- .../tests/HttpEnvironmentProxyTest.cs | 3 --- .../tests/HttpPipelineFunctionalTests.cs | 1 - .../tests/MultipartFormDataContentTests.cs | 1 - .../Azure.Core/tests/RequestMethodTests.cs | 1 - .../tests/ResponseBodyPolicyTests.cs | 1 - sdk/core/Azure.Core/tests/ResponseTests.cs | 1 - .../Azure.Core/tests/RetriableStreamTests.cs | 1 - .../Azure.Core/tests/TestEnvironmentTests.cs | 1 - .../tests/TransportFunctionalTests.cs | 1 - .../tests/samples/PipelineSamples.cs | 1 - .../tests/samples/ResponseSamples.cs | 1 - .../tests/BinaryDataTests.cs | 3 --- .../tests/E2eTestBase.cs | 1 - .../tests/DnsManagementClientBase.cs | 2 -- .../Azure.ResourceManager.Dns/tests/Helper.cs | 2 -- .../Tests/ScenarioTests.DnsTests.DnsZone.cs | 2 -- .../Tests/ScenarioTests.DnsTests.RecordSet.cs | 7 ------- .../EventGridPublisherClientOptions.cs | 1 - .../tests/CloudEventTests.cs | 1 - .../tests/DroneShippingInfo.cs | 1 - .../tests/RocketShippingInfo.cs | 1 - .../tests/ShippingInfo.cs | 1 - .../tests/CloudEventTests.cs | 1 - .../src/EventGridExtensionConfigProvider.cs | 1 - .../src/EventGridWebJobsBuilderExtensions.cs | 1 - ...ventGridTriggerAttributeBindingProvider.cs | 1 - .../tests/FakeData.cs | 1 - .../tests/Snippets/ReadMeSnippetsLiveTests.cs | 1 - .../src/Testing/EventHubsTestEnvironment.cs | 1 - .../src/Amqp/AmqpClient.cs | 1 - .../src/Amqp/AmqpError.cs | 1 - .../src/Amqp/AmqpProducer.cs | 1 - .../EventHubsSharedAccessKeyCredential.cs | 1 - .../src/Consumer/EventHubConsumerClient.cs | 2 -- .../src/Producer/EventHubProducerClient.cs | 3 --- .../Connection/EventHubConnectionTests.cs | 2 -- .../Consumer/EventHubConsumerClientTests.cs | 6 ------ .../EventProcessorTests.MainProcessingLoop.cs | 1 - .../Producer/EventHubProducerClientTests.cs | 1 - .../tests/Snippets/ReadMeSnippetsLiveTests.cs | 1 - ...s.NamespaceTests.CRUDAuthorizationRules.cs | 1 - .../tests/EventHubTests.cs | 1 - .../tests/EventHubsScaleMonitorTests.cs | 2 -- .../src/AzureBlobXmlRepository.cs | 1 - .../src/AzureKeyVaultXmlEncryptor.cs | 1 - .../tests/AzureClientAttributeTests.cs | 1 - .../tests/shared/FakeActivator.cs | 1 - .../tests/shared/TestHelpers.cs | 1 - .../src/Internal/ClientFactory.cs | 1 - .../src/CustomFormModelInfo.cs | 1 - .../src/AuthenticationRecord.cs | 2 -- .../src/AuthenticationRequiredException.cs | 1 - .../src/AzureArcManagedIdentitySource.cs | 1 - .../src/ChainedTokenCredential.cs | 1 - .../src/ClientSecretCredentialOptions.cs | 1 - .../src/CredentialDiagnosticScope.cs | 1 - .../src/CredentialUnavailableException.cs | 2 -- .../src/DeviceCodeCredential.cs | 3 --- .../src/EnvironmentCredential.cs | 1 - .../Azure.Identity/src/HttpExtensions.cs | 1 - .../src/IdentityModelFactory.cs | 1 - .../src/InteractiveBrowserCredential.cs | 2 -- .../src/ManagedIdentityCredential.cs | 2 -- .../src/ManagedIdentitySource.cs | 1 - .../Azure.Identity/src/MsalCacheReader.cs | 1 - .../src/SharedTokenCacheCredential.cs | 1 - .../src/UsernamePasswordCredential.cs | 2 -- .../src/UsernamePasswordCredentialOptions.cs | 1 - .../tests/ChainedTokenCredentialTests.cs | 1 - .../tests/DeviceCodeCredentialTests.cs | 3 --- .../tests/IdentityRecordedTestSanitizer.cs | 2 -- .../InteractiveBrowserCredentialCtorTests.cs | 1 - .../ManagedIdentityCredentialLiveTestBase.cs | 1 - .../tests/Mock/MockClientException.cs | 1 - .../Mock/MockDefaultAzureCredentialFactory.cs | 1 - .../tests/Mock/MockManagedIdentityClient.cs | 3 --- .../tests/UsernamePasswordCredentialTests.cs | 1 - .../tests/VisualStudioCodeCredentialTests.cs | 1 - .../samples/UserAuthenticationSnippets.cs | 1 - .../tests/BasicTests/ActivityLogsTest.cs | 1 - .../ServiceDiagnosticSettingsTests.cs | 1 - .../BasicTests/TenantActivityLogsTest.cs | 2 -- .../src/CloudToDeviceMessagesClient.cs | 1 - .../src/ConfigurationsClient.cs | 2 -- .../Azure.Iot.Hub.Service/src/FilesClient.cs | 1 - .../tests/VaultOperationsTests.cs | 1 - .../src/KeyVaultAccessControlClient.cs | 1 - .../src/KeyVaultPermission.cs | 1 - .../src/RoleDefinitionListResult.cs | 2 -- .../src/CertificatePolicy.cs | 1 - .../src/CertificateProperties.cs | 1 - .../src/ContactList.cs | 1 - .../src/KeyVaultCertificateWithPolicy.cs | 1 - .../src/LifetimeAction.cs | 1 - .../tests/CertificateClientLiveTests.cs | 1 - .../tests/CertificateIssuerTests.cs | 1 - .../tests/samples/SampleSnippets.cs | 1 - .../src/Cryptography/KeyResolver.cs | 2 -- .../src/KeyClient.cs | 1 - .../src/KeyCurveName.cs | 1 - .../samples/Sample4_EncryptDecryptAsync.cs | 1 - .../tests/samples/Sample5_SignVerifyAsync.cs | 1 - .../tests/samples/Sample6_WrapUnwrapAsync.cs | 1 - .../src/SecretAttributes.cs | 1 - .../src/SecretClient.cs | 2 -- ...ChallengeBasedAuthenticationPolicyTests.cs | 1 - .../src/Base64Url.cs | 1 - .../src/KeyVaultIdentifier.cs | 1 - .../tests/TestFramework/MockRequest.cs | 1 - .../tests/Benchmarks/TagObjectsBenchmarks.cs | 1 - .../TestFramework/VerifyTelemetryItem.cs | 1 - .../NetworkTestsManagementClientBase.cs | 2 -- .../tests/Tests/ApplicationGatewayTests.cs | 1 - .../InMemoryTests/DeploymentTests.InMemory.cs | 2 -- .../InMemoryTests/FeatureTests.InMemory.cs | 1 - .../DeploymentScriptsTests.ScenarioTests.cs | 1 - .../DeploymentTests.ScenarioTests.cs | 1 - .../PolicyTests.ScenarioTests.cs | 13 ------------ .../ScenarioTests/TagTests.ScenarioTests.cs | 12 +++++------ .../tests/Batching/BatchingTests.cs | 1 - .../tests/DocumentOperations/SearchTests.cs | 1 - .../tests/Models/Book.cs | 1 - .../tests/Samples/Readme.cs | 1 - .../src/Administration/CreateQueueOptions.cs | 1 - .../src/Administration/QueueProperties.cs | 1 - .../src/Administration/Rules/SqlRuleFilter.cs | 1 - .../ServiceBusAdministrationClient.cs | 1 - .../src/Amqp/AmqpClient.cs | 2 -- .../src/Amqp/AmqpConnectionScope.cs | 1 - .../src/Amqp/AmqpExceptionHelper.cs | 1 - .../src/Amqp/AmqpReceiver.cs | 3 --- .../src/Amqp/AmqpRuleManager.cs | 1 - .../src/Amqp/AmqpSender.cs | 3 --- .../src/Client/ServiceBusClient.cs | 1 - .../Primitives/ServiceBusReceivedMessage.cs | 1 - .../src/Primitives/ServiceBusRetryPolicy.cs | 1 - .../src/Primitives/StringUtility.cs | 1 - .../src/Processor/ServiceBusProcessor.cs | 4 ---- .../Processor/ServiceBusSessionProcessor.cs | 2 -- .../src/RuleManager/ServiceBusRuleManager.cs | 1 - .../src/Sender/CreateMessageBatchOptions.cs | 1 - .../ServiceBusManagementClientLiveTests.cs | 2 -- .../tests/Client/ServiceBusClientLiveTests.cs | 3 --- .../tests/Diagnostics/EventSourceLiveTests.cs | 1 - .../tests/Infrastructure/TestException.cs | 1 - .../tests/Plugins/PluginLiveTests.cs | 3 --- .../tests/Processor/ProcessorLiveTests.cs | 2 -- .../Processor/SessionProcessorLiveTests.cs | 3 --- .../tests/Sender/SenderLiveTests.cs | 1 - .../src/BatchErrors.cs | 1 - .../src/Shared/HeaderUtilities.cs | 1 - .../tests/ChangeFeedTestBase.cs | 2 -- .../tests/ChangeFeedTests.cs | 1 - .../tests/ShardTests.cs | 1 - .../samples/Sample01a_HelloWorld.cs | 1 - .../Azure.Storage.Blobs/src/BlobBaseClient.cs | 1 - .../src/Models/AppendBlobOpenWriteOptions.cs | 1 - .../src/Models/BlobQueryJsonTextOptions.cs | 1 - .../GetBlobContainersAsyncCollection.cs | 1 - .../src/Models/ObjectReplicationPolicy.cs | 1 - .../src/Sas/BlobAccountSasPermissions.cs | 1 - .../src/Sas/BlobContainerSasPermissions.cs | 1 - .../src/Sas/BlobSasPermissions.cs | 1 - .../src/Sas/BlobVersionSasPermissions.cs | 1 - .../src/Sas/SnapshotSasPermissions.cs | 1 - .../tests/AppendBlobClientTests.cs | 1 - .../tests/BlobBaseClientTests.cs | 20 ------------------- .../tests/BlobClientTests.cs | 2 -- .../Azure.Storage.Blobs/tests/BlobTestBase.cs | 1 - .../tests/BlockBlobClientTests.cs | 1 - .../tests/ContainerClientTests.cs | 1 - .../tests/PageBlobClientTests.cs | 11 ---------- .../tests/PartitionedUploaderTests.cs | 1 - .../tests/ServiceClientTests.cs | 1 - .../Azure.Storage.Common/src/Shared/Errors.cs | 1 - .../src/Shared/LazyLoadingReadOnlyStream.cs | 2 -- .../src/Shared/StorageConnectionString.cs | 3 --- .../src/Shared/StorageWriteStream.cs | 1 - .../tests/GeoRedundantReadPolicyTests.cs | 1 - .../tests/Shared/StorageRecordMatcher.cs | 2 -- .../tests/Shared/TestExtensions.cs | 2 -- .../tests/StorageConnectionStringTests.cs | 2 -- .../tests/StorageWriteStreamTests.cs | 1 - .../src/DataLakeDirectoryClient.cs | 1 - .../src/DataLakeFileClient.cs | 2 -- .../src/DataLakePathClient.cs | 3 --- .../src/DataLakeQueryErrorHandler.cs | 1 - .../src/DataLakeServiceClient.cs | 1 - .../src/DataLakeUriBuilder.cs | 2 -- .../src/ErrorExtensions.cs | 1 - .../src/Models/PathCreateInfo.cs | 1 - .../src/Models/PublicAccessType.cs | 1 - .../src/Sas/DataLakeAccountSasPermissions.cs | 1 - .../src/Sas/DataLakeSasPermissions.cs | 1 - .../tests/FileClientTests.cs | 7 ------- .../tests/FileSystemClientTests.cs | 1 - .../tests/PathAccessControlExtensionsTests.cs | 1 - .../tests/PathPermissionsTests.cs | 1 - .../src/Models/FileSmbProperties.cs | 1 - .../src/Models/ShareStatistics.cs | 1 - .../src/Sas/ShareAccountSasPermissions.cs | 1 - .../src/Sas/ShareFileSasPermissions.cs | 1 - .../src/Sas/ShareSasPermissions.cs | 1 - .../src/ShareDirectoryClient.cs | 1 - .../src/ShareFileClient.cs | 2 -- .../src/ShareLeaseClient.cs | 5 ----- .../tests/DirectoryClientTests.cs | 1 - .../tests/FileClientTests.cs | 1 - .../tests/ServiceClientTests.cs | 1 - .../src/Sas/QueueAccountSasPermissions.cs | 1 - .../src/Sas/QueueSasPermissions.cs | 1 - .../tests/ClientSideEncryptionTests.cs | 1 - .../tests/ServiceClientTests.cs | 1 - .../src/BlobAttribute.cs | 1 - .../src/BlobTriggerAttribute.cs | 1 - .../Bindings/NotifyingBlobStreamTests.cs | 1 - .../tests/AzuriteFixture.cs | 2 -- .../tests/Fakes/FakeActivator.cs | 1 - .../src/QueueAttribute.cs | 1 - .../src/QueueTriggerAttribute.cs | 1 - .../src/Extensions/TableEntityExtensions.cs | 1 - .../Azure.Data.Tables/src/ITableEntity.cs | 1 - .../src/Queryable/ExpressionNormalizer.cs | 1 - .../src/Queryable/ExpressionWriter.cs | 1 - .../Queryable/ReferenceEqualityComparerOfT.cs | 2 -- .../Azure.Data.Tables/src/Sas/Errors.cs | 1 - .../src/Sas/TableAccountSasPermissions.cs | 1 - .../src/Sas/TableAccountSasQueryParameters.cs | 1 - .../src/Sas/TableSasPermissions.cs | 1 - .../Azure.Data.Tables/src/ServiceClient.cs | 1 - .../src/TableConnectionString.cs | 2 -- .../Azure.Data.Tables/src/TableConstants.cs | 1 - .../src/TableEntity.Dictionary.cs | 1 - .../src/TableServiceClient.cs | 1 - .../src/TableSharedKeyPipelinePolicy.cs | 1 - .../tests/TableClientLiveTests.cs | 2 -- .../tests/TableClientQueryableLiveTests.cs | 2 -- .../tests/TableServiceClientLiveTests.cs | 1 - .../tests/TableServiceClientTests.cs | 2 -- .../tests/TableServiceLiveTestsBase.cs | 6 ------ .../src/AnalyzeBatchInput.cs | 1 - .../src/DocumentHealthcareResult.cs | 1 - .../src/EntitiesTask.cs | 1 - .../src/EntitiesTaskParameters.cs | 1 - .../src/HealthcareEntity.cs | 1 - .../src/HealthcareOperation.cs | 1 - .../src/JobManifestTasks.cs | 1 - .../Azure.AI.TextAnalytics/src/JobStatus.cs | 1 - .../src/KeyPhrasesTask.cs | 1 - .../Azure.AI.TextAnalytics/src/PiiTask.cs | 2 -- .../src/TextAnalyticsClient.cs | 4 ---- .../src/TextDocumentInput.cs | 1 - .../Azure.AI.TextAnalytics/src/Transforms.cs | 1 - .../tests/AnalyzeOperationTests.cs | 2 -- .../tests/TextAnalyticsClientMockTests.cs | 2 -- 292 files changed, 11 insertions(+), 448 deletions(-) diff --git a/common/Perf/Azure.Test.Perf/PerfProgram.cs b/common/Perf/Azure.Test.Perf/PerfProgram.cs index 9f32f4d3348ec..00b9afda5824e 100644 --- a/common/Perf/Azure.Test.Perf/PerfProgram.cs +++ b/common/Perf/Azure.Test.Perf/PerfProgram.cs @@ -96,7 +96,6 @@ private static async Task Run(Type testType, PerfOptions options) try { - try { await tests[0].GlobalSetupAsync(); diff --git a/common/Stress/Azure.Test.Stress/StressTest.cs b/common/Stress/Azure.Test.Stress/StressTest.cs index 08b7d8d7164c7..d6e5c53586661 100644 --- a/common/Stress/Azure.Test.Stress/StressTest.cs +++ b/common/Stress/Azure.Test.Stress/StressTest.cs @@ -79,7 +79,6 @@ protected static string GetEnvironmentVariable(string name) throw new InvalidOperationException($"Undefined environment variable {name}"); } return value; - } } } diff --git a/eng/CodeAnalysis.ruleset b/eng/CodeAnalysis.ruleset index d8c59552e649b..2d4ac57abb8e7 100644 --- a/eng/CodeAnalysis.ruleset +++ b/eng/CodeAnalysis.ruleset @@ -142,11 +142,11 @@ - + - - + + diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationRecordMatcher.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationRecordMatcher.cs index 7792b498a2d78..687b805a864a9 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationRecordMatcher.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationRecordMatcher.cs @@ -52,7 +52,6 @@ private void Normalize(JObject o) } } } - } } } diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationSettingTests.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationSettingTests.cs index 52b95440ec0f7..ee452000a214d 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationSettingTests.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationSettingTests.cs @@ -44,7 +44,6 @@ public void FilterReservedCharacter() ConfigurationClient.BuildBatchQuery(builder, selector, null); Assert.AreEqual(@"http://localhost/?key=my_key%2Ckey%5C%2Ckey&label=my_label%2Clabel%5C%2Clabel", builder.ToUri().AbsoluteUri); - } [Test] diff --git a/sdk/communication/Azure.Communication.Administration/tests/samples/Sample1_CommunicationIdentityClient.cs b/sdk/communication/Azure.Communication.Administration/tests/samples/Sample1_CommunicationIdentityClient.cs index 8daed48be5e82..325828b2a2595 100644 --- a/sdk/communication/Azure.Communication.Administration/tests/samples/Sample1_CommunicationIdentityClient.cs +++ b/sdk/communication/Azure.Communication.Administration/tests/samples/Sample1_CommunicationIdentityClient.cs @@ -121,6 +121,5 @@ public async Task Troubleshooting() Assert.Fail($"Unexpected error: {ex}"); } } - } } diff --git a/sdk/communication/Azure.Communication.Chat/tests/samples/Sample3_MemberOperations.cs b/sdk/communication/Azure.Communication.Chat/tests/samples/Sample3_MemberOperations.cs index 74d19c28149db..b6cee4913b1dd 100644 --- a/sdk/communication/Azure.Communication.Chat/tests/samples/Sample3_MemberOperations.cs +++ b/sdk/communication/Azure.Communication.Chat/tests/samples/Sample3_MemberOperations.cs @@ -69,7 +69,6 @@ public async Task GetAddRemoveMembersAsync() #endregion Snippet:Azure_Communication_Chat_Tests_Samples_RemoveMember await chatClient.DeleteChatThreadAsync(threadId); - } } } diff --git a/sdk/communication/Azure.Communication.Sms/tests/SmsClientTest.cs b/sdk/communication/Azure.Communication.Sms/tests/SmsClientTest.cs index 039060c1ccd1c..0916fbeda4a7a 100644 --- a/sdk/communication/Azure.Communication.Sms/tests/SmsClientTest.cs +++ b/sdk/communication/Azure.Communication.Sms/tests/SmsClientTest.cs @@ -14,7 +14,6 @@ namespace Azure.Communication.Sms.Tests { public class SmsClientTest { - [TestCaseSource(nameof(TestData))] public async Task SendSmsAsyncOverload_PassesToGeneratedOne(PhoneNumber expectedFrom, PhoneNumber expectedTo, string expectedMessage, SendSmsOptions expectedOptions) { diff --git a/sdk/communication/Azure.ResourceManager.Communication/tests/Infrastructure/CommunicationManagementRecordedTestSanitizer.cs b/sdk/communication/Azure.ResourceManager.Communication/tests/Infrastructure/CommunicationManagementRecordedTestSanitizer.cs index c1df7abfe3d5e..77a35f0e2a304 100644 --- a/sdk/communication/Azure.ResourceManager.Communication/tests/Infrastructure/CommunicationManagementRecordedTestSanitizer.cs +++ b/sdk/communication/Azure.ResourceManager.Communication/tests/Infrastructure/CommunicationManagementRecordedTestSanitizer.cs @@ -48,6 +48,5 @@ public override void Sanitize(RecordSession session) base.Sanitize(session); } - } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/AvailabilitySetTests.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/AvailabilitySetTests.cs index cbe76fd7b941d..77674e5cf642f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/AvailabilitySetTests.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/AvailabilitySetTests.cs @@ -119,7 +119,6 @@ private async Task VerifyInvalidFDUDValuesFail() { Assert.NotNull(ex); //Assert.True(ex.Response.StatusCode == HttpStatusCode.BadRequest); - } Assert.True(createOrUpdateResponse == null); @@ -135,7 +134,6 @@ private async Task VerifyInvalidFDUDValuesFail() { Assert.NotNull(ex); //Assert.True(ex.Response.StatusCode == HttpStatusCode.BadRequest); - } Assert.True(createOrUpdateResponse == null); @@ -151,7 +149,6 @@ private async Task VerifyInvalidFDUDValuesFail() { Assert.NotNull(ex); //Assert.True(ex.Response.StatusCode == HttpStatusCode.BadRequest); - } Assert.True(createOrUpdateResponse == null); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/DedicatedHostTests.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/DedicatedHostTests.cs index e2112eac97f8b..2e64f96dd53ba 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/DedicatedHostTests.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/DedicatedHostTests.cs @@ -15,7 +15,6 @@ namespace Azure.ResourceManager.Compute.Tests [AsyncOnly] public class DedicatedHostTests : VMTestBase { - public DedicatedHostTests(bool isAsync) : base(isAsync) { @@ -110,7 +109,6 @@ private void ValidateDedicatedHostGroup(DedicatedHostGroup expectedDHG, Dedicate Assert.AreEqual(expectedDHG.Location, actualDHG.Location); Assert.AreEqual(expectedDHG.Name, actualDHG.Name); } - } private void ValidateDedicatedHost(DedicatedHost expectedDH, DedicatedHost actualDH) diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/ProximityPlacementGroupTests.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/ProximityPlacementGroupTests.cs index 057b9ac143fd1..cb25af511f8c7 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/ProximityPlacementGroupTests.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/ProximityPlacementGroupTests.cs @@ -401,7 +401,6 @@ private async void ValidateResults(ProximityPlacementGroup outputProximityPlacem private void ValidateProximityPlacementGroup(ProximityPlacementGroup expectedProximityPlacementGroup, ProximityPlacementGroup outputProximityPlacementGroup, string expectedProximityPlacementGroupName) { - Assert.True(outputProximityPlacementGroup != null, "ProximityPlacementGroup is null in response."); Assert.True(expectedProximityPlacementGroupName == outputProximityPlacementGroup.Name, "ProximityPlacementGroup.Name in response mismatch with expected value."); Assert.True( diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMCertificateTests.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMCertificateTests.cs index c586a3ad56894..d07e99c5af1bd 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMCertificateTests.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMCertificateTests.cs @@ -14,7 +14,6 @@ namespace Azure.ResourceManager.Compute.Tests [AsyncOnly] public class VMCertificateTests : VMTestBase { - public VMCertificateTests(bool isAsync) : base(isAsync) { diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMDiskEncryptionTests.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMDiskEncryptionTests.cs index c0e70383837e0..046debc05183b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMDiskEncryptionTests.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMDiskEncryptionTests.cs @@ -48,7 +48,6 @@ public async Task CleanupResourceGroup() //[Trait("Name", "TestDiskEncryption")] public async Task TestVMDiskEncryption() { - EnsureClientsInitialized(DefaultLocation); ImageReference imageRef = await GetPlatformVMImage(useWindowsImage: true); diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMOperationalTests.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMOperationalTests.cs index 67803125b0196..dd358ce525b2c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMOperationalTests.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMOperationalTests.cs @@ -310,7 +310,6 @@ public async Task TestVMOperations_PerformMaintenance() inputVM1Name = returnTwovm.Item3; await WaitForCompletionAsync(await VirtualMachinesOperations.StartPerformMaintenanceAsync(rg1Name, vm1.Name)); passed = true; - } catch (Exception cex) { diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMScenarioTests.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMScenarioTests.cs index 8065bbd36e3ef..bc8909b7b1eb5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMScenarioTests.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/ScenarioTests/VMScenarioTests.cs @@ -180,7 +180,6 @@ private async Task TestVMScenarioOperationsInternal(string methodName, bool hasM if (diskEncryptionSetId != null) { - Assert.True(getVMWithInstanceViewResponse.StorageProfile.OsDisk.ManagedDisk.DiskEncryptionSet != null, "OsDisk.ManagedDisk.DiskEncryptionSet is null"); Assert.True(string.Equals(diskEncryptionSetId, getVMWithInstanceViewResponse.StorageProfile.OsDisk.ManagedDisk.DiskEncryptionSet.Id, StringComparison.OrdinalIgnoreCase), "OsDisk.ManagedDisk.DiskEncryptionSet.Id is not matching with expected DiskEncryptionSet resource"); diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetOperationalTests.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetOperationalTests.cs index 53dc2b91754e5..7a67f444d6ccd 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetOperationalTests.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetOperationalTests.cs @@ -59,7 +59,6 @@ public async Task TestVMScaleSetOperations_ManagedDisks() private async Task TestVMScaleSetOperationsInternal(bool hasManagedDisks = false) { - ImageReference imageRef = await GetPlatformVMImage(useWindowsImage: true); // Create resource group diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetTestsBase.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetTestsBase.cs index 10161121aec0a..69289c3523b08 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetTestsBase.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/VMScaleSetTests/VMScaleSetTestsBase.cs @@ -669,7 +669,6 @@ VirtualMachineScaleSetDataDisk matchingDataDisk if (ppgId != null) { - Assert.AreEqual(ppgId.ToLower(), vmScaleSetOut.ProximityPlacementGroup.Id.ToLower()); } } diff --git a/sdk/core/Azure.Core.Experimental/src/DynamicJson.cs b/sdk/core/Azure.Core.Experimental/src/DynamicJson.cs index 3426c8dff1355..95d82e9243056 100644 --- a/sdk/core/Azure.Core.Experimental/src/DynamicJson.cs +++ b/sdk/core/Azure.Core.Experimental/src/DynamicJson.cs @@ -257,7 +257,6 @@ private IEnumerable GetDynamicEnumerable() private DynamicJson GetPropertyValue(string propertyName) { - if (EnsureObject().TryGetValue(propertyName, out DynamicJson element)) { return element; @@ -583,6 +582,5 @@ public double AsDouble() return _double; } } - } } diff --git a/sdk/core/Azure.Core.Experimental/tests/DynamicJsonDynamicMutableTests.cs b/sdk/core/Azure.Core.Experimental/tests/DynamicJsonDynamicMutableTests.cs index 1272b35eb2dae..1b3d3eed2c492 100644 --- a/sdk/core/Azure.Core.Experimental/tests/DynamicJsonDynamicMutableTests.cs +++ b/sdk/core/Azure.Core.Experimental/tests/DynamicJsonDynamicMutableTests.cs @@ -127,6 +127,5 @@ public static IEnumerable PrimitiveValues() yield return new object[] {true, "true"}; yield return new object[] {false, "false"}; } - } } \ No newline at end of file diff --git a/sdk/core/Azure.Core.Experimental/tests/DynamicJsonMutableTests.cs b/sdk/core/Azure.Core.Experimental/tests/DynamicJsonMutableTests.cs index e82a3a362538d..ed15da20c32bb 100644 --- a/sdk/core/Azure.Core.Experimental/tests/DynamicJsonMutableTests.cs +++ b/sdk/core/Azure.Core.Experimental/tests/DynamicJsonMutableTests.cs @@ -26,6 +26,5 @@ public void ExistingObjectPropertiesCanBeAssigned() Assert.AreEqual(json.ToString(), "{\"a\":\"2\"}"); } - } } \ No newline at end of file diff --git a/sdk/core/Azure.Core.TestFramework/src/ClientTestFixtureAttribute.cs b/sdk/core/Azure.Core.TestFramework/src/ClientTestFixtureAttribute.cs index 95b678e9419da..e4056dcca5632 100644 --- a/sdk/core/Azure.Core.TestFramework/src/ClientTestFixtureAttribute.cs +++ b/sdk/core/Azure.Core.TestFramework/src/ClientTestFixtureAttribute.cs @@ -54,7 +54,6 @@ public IEnumerable BuildFrom(ITypeInfo typeInfo) public IEnumerable BuildFrom(ITypeInfo typeInfo, IPreFilter filter) { - var suitePermutations = GeneratePermutations(); foreach (var (fixture, isAsync, serviceVersion, parameter) in suitePermutations) diff --git a/sdk/core/Azure.Core.TestFramework/src/RecordEntryMessage.cs b/sdk/core/Azure.Core.TestFramework/src/RecordEntryMessage.cs index 8db7605df80f8..573d285aee6f5 100644 --- a/sdk/core/Azure.Core.TestFramework/src/RecordEntryMessage.cs +++ b/sdk/core/Azure.Core.TestFramework/src/RecordEntryMessage.cs @@ -46,6 +46,5 @@ public bool TryGetBodyAsText(out string text) return false; } - } } diff --git a/sdk/core/Azure.Core.TestFramework/src/RecordSession.cs b/sdk/core/Azure.Core.TestFramework/src/RecordSession.cs index 5720aef79ff2f..c38556b0d63d3 100644 --- a/sdk/core/Azure.Core.TestFramework/src/RecordSession.cs +++ b/sdk/core/Azure.Core.TestFramework/src/RecordSession.cs @@ -89,7 +89,6 @@ public RecordEntry Lookup(RecordEntry requestEntry, RecordMatcher matcher, Recor Entries.Remove(entry); return entry; } - } public void Sanitize(RecordedTestSanitizer sanitizer) diff --git a/sdk/core/Azure.Core.TestFramework/src/RecordedTestUtilities.cs b/sdk/core/Azure.Core.TestFramework/src/RecordedTestUtilities.cs index ef82cea540df7..0d92edcedd5b5 100644 --- a/sdk/core/Azure.Core.TestFramework/src/RecordedTestUtilities.cs +++ b/sdk/core/Azure.Core.TestFramework/src/RecordedTestUtilities.cs @@ -22,6 +22,5 @@ public static RecordedTestMode GetModeFromEnvironment() return mode; } - } } diff --git a/sdk/core/Azure.Core/src/ClientOptions.cs b/sdk/core/Azure.Core/src/ClientOptions.cs index 0bd9bbf0a53df..b27ddb570898d 100644 --- a/sdk/core/Azure.Core/src/ClientOptions.cs +++ b/sdk/core/Azure.Core/src/ClientOptions.cs @@ -106,6 +106,5 @@ bool GetSwitchValue(string switchName, string envVariable) #endif return HttpClientTransport.Shared; } - } } diff --git a/sdk/core/Azure.Core/src/Internal/AzureBaseBuffersExtensions.cs b/sdk/core/Azure.Core/src/Internal/AzureBaseBuffersExtensions.cs index 8696d830e50d7..bd376120a6fed 100644 --- a/sdk/core/Azure.Core/src/Internal/AzureBaseBuffersExtensions.cs +++ b/sdk/core/Azure.Core/src/Internal/AzureBaseBuffersExtensions.cs @@ -38,7 +38,6 @@ public static async Task WriteAsync(this Stream stream, ReadOnlyMemory buf throw new Exception("could not rent large enough buffer."); await stream.WriteAsync(array, 0, buffer.Length, cancellation).ConfigureAwait(false); } - } finally { diff --git a/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs b/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs index f2d8e5a0b866f..d0f6440903bbb 100644 --- a/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs +++ b/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs @@ -11,7 +11,6 @@ namespace Azure.Core.Pipeline { - internal sealed partial class HttpEnvironmentProxy : IWebProxy { private const string EnvAllProxyUC = "ALL_PROXY"; @@ -221,7 +220,6 @@ private bool IsMatchInBypassList(Uri input) { return true; } - } else { diff --git a/sdk/core/Azure.Core/src/Pipeline/Internal/LoggingPolicy.cs b/sdk/core/Azure.Core/src/Pipeline/Internal/LoggingPolicy.cs index f1d9346c12a3b..eeac72f8a2ef5 100644 --- a/sdk/core/Azure.Core/src/Pipeline/Internal/LoggingPolicy.cs +++ b/sdk/core/Azure.Core/src/Pipeline/Internal/LoggingPolicy.cs @@ -271,7 +271,6 @@ public async ValueTask LogAsync(string requestId, bool isError, Stream? stream, var bytes = await FormatAsync(stream, async).ConfigureAwait(false).EnsureCompleted(async); Log(requestId, eventType, bytes, textEncoding); - } public async ValueTask LogAsync(string requestId, RequestContent? content, Encoding? textEncoding, bool async) diff --git a/sdk/core/Azure.Core/src/Pipeline/Internal/ReadTimeoutStream.cs b/sdk/core/Azure.Core/src/Pipeline/Internal/ReadTimeoutStream.cs index 4c383efe930b6..d1e4223e8827a 100644 --- a/sdk/core/Azure.Core/src/Pipeline/Internal/ReadTimeoutStream.cs +++ b/sdk/core/Azure.Core/src/Pipeline/Internal/ReadTimeoutStream.cs @@ -49,7 +49,6 @@ public override async Task ReadAsync(byte[] buffer, int offset, int count, var source = StartTimeout(cancellationToken, out bool dispose); try { - #pragma warning disable CA1835 // ReadAsync(Memory<>) overload is not available in all targets return await _stream.ReadAsync(buffer, offset, count, source.Token).ConfigureAwait(false); #pragma warning restore // ReadAsync(Memory<>) overload is not available in all targets @@ -159,4 +158,4 @@ protected override void Dispose(bool disposing) _cancellationTokenSource.Dispose(); } } -} \ No newline at end of file +} diff --git a/sdk/core/Azure.Core/src/Shared/DiagnosticScope.cs b/sdk/core/Azure.Core/src/Shared/DiagnosticScope.cs index 0b546cc90b88d..4a4277a205d5b 100644 --- a/sdk/core/Azure.Core/src/Shared/DiagnosticScope.cs +++ b/sdk/core/Azure.Core/src/Shared/DiagnosticScope.cs @@ -104,7 +104,6 @@ public void Failed(Exception e) } _source?.Write(_activity.OperationName + ".Exception", e); - } private class DiagnosticActivity : Activity diff --git a/sdk/core/Azure.Core/src/Shared/HttpMessageSanitizer.cs b/sdk/core/Azure.Core/src/Shared/HttpMessageSanitizer.cs index 5b426d865ec16..7a1d4d66ce430 100644 --- a/sdk/core/Azure.Core/src/Shared/HttpMessageSanitizer.cs +++ b/sdk/core/Azure.Core/src/Shared/HttpMessageSanitizer.cs @@ -130,10 +130,9 @@ public string SanitizeUrl(string url) } queryIndex += valueLength; - } while (queryIndex < query.Length); return stringBuilder.ToString(); } } -} \ No newline at end of file +} diff --git a/sdk/core/Azure.Core/src/Shared/Multipart/MultipartFormDataContent.cs b/sdk/core/Azure.Core/src/Shared/Multipart/MultipartFormDataContent.cs index b99ee6ef83a66..363ff33ca1a54 100644 --- a/sdk/core/Azure.Core/src/Shared/Multipart/MultipartFormDataContent.cs +++ b/sdk/core/Azure.Core/src/Shared/Multipart/MultipartFormDataContent.cs @@ -117,6 +117,5 @@ private void AddInternal(RequestContent content, Dictionary head base.Add(content, headers); } - } } diff --git a/sdk/core/Azure.Core/src/Shared/RetriableStream.cs b/sdk/core/Azure.Core/src/Shared/RetriableStream.cs index ae015290eb558..85715f82bfa4c 100644 --- a/sdk/core/Azure.Core/src/Shared/RetriableStream.cs +++ b/sdk/core/Azure.Core/src/Shared/RetriableStream.cs @@ -142,7 +142,6 @@ public override int Read(byte[] buffer, int offset, int count) var result = _currentStream.Read(buffer, offset, count); _position += result; return result; - } catch (Exception e) { diff --git a/sdk/core/Azure.Core/src/Shared/TaskExtensions.cs b/sdk/core/Azure.Core/src/Shared/TaskExtensions.cs index 74aba2bb6a540..9748653782227 100644 --- a/sdk/core/Azure.Core/src/Shared/TaskExtensions.cs +++ b/sdk/core/Azure.Core/src/Shared/TaskExtensions.cs @@ -79,7 +79,6 @@ public static ConfiguredValueTaskAwaitable EnsureCompleted(this Configured public static ConfiguredValueTaskAwaitable EnsureCompleted(this ConfiguredValueTaskAwaitable awaitable, bool async) { - if (!async) { #if DEBUG diff --git a/sdk/core/Azure.Core/tests/ClientDiagnosticsTests.cs b/sdk/core/Azure.Core/tests/ClientDiagnosticsTests.cs index aa455bb6e7466..a92e93c9e2d4d 100644 --- a/sdk/core/Azure.Core/tests/ClientDiagnosticsTests.cs +++ b/sdk/core/Azure.Core/tests/ClientDiagnosticsTests.cs @@ -19,7 +19,6 @@ public class ClientDiagnosticsTests [Test] public void CreatesActivityWithNameAndTags() { - using var testListener = new TestDiagnosticListener("Azure.Clients"); DiagnosticScopeFactory clientDiagnostics = new DiagnosticScopeFactory("Azure.Clients", "Microsoft.Azure.Core.Cool.Tests", true); @@ -53,7 +52,6 @@ public void CreatesActivityWithNameAndTags() [Test] public void ResourceNameIsOptional() { - using var testListener = new TestDiagnosticListener("Azure.Clients"); DiagnosticScopeFactory clientDiagnostics = new DiagnosticScopeFactory("Azure.Clients", null, true); diff --git a/sdk/core/Azure.Core/tests/ClientOptionsTests.cs b/sdk/core/Azure.Core/tests/ClientOptionsTests.cs index d1c570002ca91..812430ab7b543 100644 --- a/sdk/core/Azure.Core/tests/ClientOptionsTests.cs +++ b/sdk/core/Azure.Core/tests/ClientOptionsTests.cs @@ -39,7 +39,6 @@ public void DefaultTransportIsHttpClientTransportIfEnvVarSet() var options = new TestClientOptions(); Assert.IsInstanceOf(options.Transport); - } finally { @@ -59,7 +58,6 @@ public void DefaultTransportIsHttpClientTransportIfSwitchIsSet() var options = new TestClientOptions(); Assert.IsInstanceOf(options.Transport); - } finally { diff --git a/sdk/core/Azure.Core/tests/HttpEnvironmentProxyTest.cs b/sdk/core/Azure.Core/tests/HttpEnvironmentProxyTest.cs index e03e5570bab59..eb3ddfb17e6ea 100644 --- a/sdk/core/Azure.Core/tests/HttpEnvironmentProxyTest.cs +++ b/sdk/core/Azure.Core/tests/HttpEnvironmentProxyTest.cs @@ -124,13 +124,11 @@ public void HttpProxy_Uri_Parsing(string input, string host, string port, string Assert.AreEqual(user, nc.UserName); Assert.AreEqual(password, nc.Password); } - } [Test] public void HttpProxy_CredentialParsing_Basic() { - Environment.SetEnvironmentVariable("all_proxy", "http://foo:bar@1.1.1.1:3000"); Assert.True(HttpEnvironmentProxy.TryCreate(out IWebProxy p)); Assert.NotNull(p); @@ -158,7 +156,6 @@ public void HttpProxy_CredentialParsing_Basic() [Test] public void HttpProxy_Exceptions_Match() { - Environment.SetEnvironmentVariable("no_proxy", ".test.com,, foo.com"); Environment.SetEnvironmentVariable("all_proxy", "http://foo:bar@1.1.1.1:3000"); Assert.True(HttpEnvironmentProxy.TryCreate(out IWebProxy p)); diff --git a/sdk/core/Azure.Core/tests/HttpPipelineFunctionalTests.cs b/sdk/core/Azure.Core/tests/HttpPipelineFunctionalTests.cs index 5b676142976b4..fc762ae1ac8c4 100644 --- a/sdk/core/Azure.Core/tests/HttpPipelineFunctionalTests.cs +++ b/sdk/core/Azure.Core/tests/HttpPipelineFunctionalTests.cs @@ -227,7 +227,6 @@ async Task Connect() List requests = new List(); for (int i = 0; i < requestCount; i++) { - requests.Add(Task.Run(() => Connect())); } diff --git a/sdk/core/Azure.Core/tests/MultipartFormDataContentTests.cs b/sdk/core/Azure.Core/tests/MultipartFormDataContentTests.cs index c5d5fd44716d7..eab257750cb71 100644 --- a/sdk/core/Azure.Core/tests/MultipartFormDataContentTests.cs +++ b/sdk/core/Azure.Core/tests/MultipartFormDataContentTests.cs @@ -322,6 +322,5 @@ public override bool TryComputeLength(out long length) return false; } } - } } diff --git a/sdk/core/Azure.Core/tests/RequestMethodTests.cs b/sdk/core/Azure.Core/tests/RequestMethodTests.cs index 85e5afdd4bb04..e32b3a1e9905c 100644 --- a/sdk/core/Azure.Core/tests/RequestMethodTests.cs +++ b/sdk/core/Azure.Core/tests/RequestMethodTests.cs @@ -35,6 +35,5 @@ public void ParseReturnsCachedValue(RequestMethod method, string stringValue) { Assert.AreSame(method.Method, RequestMethod.Parse(stringValue).Method); } - } } diff --git a/sdk/core/Azure.Core/tests/ResponseBodyPolicyTests.cs b/sdk/core/Azure.Core/tests/ResponseBodyPolicyTests.cs index 8bf390aa0e50f..8a2d9ba5353fb 100644 --- a/sdk/core/Azure.Core/tests/ResponseBodyPolicyTests.cs +++ b/sdk/core/Azure.Core/tests/ResponseBodyPolicyTests.cs @@ -251,7 +251,6 @@ public override void Close() } public bool IsClosed { get; set; } - } private abstract class TestReadStream: Stream diff --git a/sdk/core/Azure.Core/tests/ResponseTests.cs b/sdk/core/Azure.Core/tests/ResponseTests.cs index 76209ba10d26d..df778d4023875 100644 --- a/sdk/core/Azure.Core/tests/ResponseTests.cs +++ b/sdk/core/Azure.Core/tests/ResponseTests.cs @@ -102,5 +102,4 @@ public override string ToString() } } } - } diff --git a/sdk/core/Azure.Core/tests/RetriableStreamTests.cs b/sdk/core/Azure.Core/tests/RetriableStreamTests.cs index 0df15bb86326d..2248cc1c0f828 100644 --- a/sdk/core/Azure.Core/tests/RetriableStreamTests.cs +++ b/sdk/core/Azure.Core/tests/RetriableStreamTests.cs @@ -443,7 +443,6 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); IsDisposed = true; } - } } } diff --git a/sdk/core/Azure.Core/tests/TestEnvironmentTests.cs b/sdk/core/Azure.Core/tests/TestEnvironmentTests.cs index b5d6c1f9c7ae3..c5954cad77c89 100644 --- a/sdk/core/Azure.Core/tests/TestEnvironmentTests.cs +++ b/sdk/core/Azure.Core/tests/TestEnvironmentTests.cs @@ -226,7 +226,6 @@ public MockTestEnvironment() : base("core") public string CustomSecret => GetRecordedVariable("CustomSecret", option => option.IsSecret("Custom")); public string MissingOptionalSecret => GetRecordedOptionalVariable("MissingOptionalSecret", option => option.IsSecret("INVALID")); public string ConnectionStringWithSecret => GetRecordedVariable("ConnectionStringWithSecret", option => option.HasSecretConnectionStringParameter("key")); - } } } diff --git a/sdk/core/Azure.Core/tests/TransportFunctionalTests.cs b/sdk/core/Azure.Core/tests/TransportFunctionalTests.cs index ffeb19dcb0105..b416726b25375 100644 --- a/sdk/core/Azure.Core/tests/TransportFunctionalTests.cs +++ b/sdk/core/Azure.Core/tests/TransportFunctionalTests.cs @@ -442,7 +442,6 @@ public async Task CanRemoveHeaders(string headerName, string headerValue, bool c [TestCaseSource(nameof(AllHeadersWithValuesAndType))] public async Task CanSetRequestHeaders(string headerName, string headerValue, bool contentHeader) { - StringValues httpHeaderValues = default; using TestServer testServer = new TestServer( diff --git a/sdk/core/Azure.Core/tests/samples/PipelineSamples.cs b/sdk/core/Azure.Core/tests/samples/PipelineSamples.cs index 549aef6d35eb6..54d1908f720c9 100644 --- a/sdk/core/Azure.Core/tests/samples/PipelineSamples.cs +++ b/sdk/core/Azure.Core/tests/samples/PipelineSamples.cs @@ -36,7 +36,6 @@ public override async ValueTask ProcessAsync(HttpMessage message, ReadOnlyMemory stopwatch.Stop(); Console.WriteLine($"Request to {message.Request.Uri} took {stopwatch.Elapsed}"); - } public override void Process(HttpMessage message, ReadOnlyMemory pipeline) diff --git a/sdk/core/Azure.Core/tests/samples/ResponseSamples.cs b/sdk/core/Azure.Core/tests/samples/ResponseSamples.cs index accd0bf711046..9d33a42f28708 100644 --- a/sdk/core/Azure.Core/tests/samples/ResponseSamples.cs +++ b/sdk/core/Azure.Core/tests/samples/ResponseSamples.cs @@ -179,7 +179,6 @@ public void Pageable() [Ignore("Only verifying that the sample builds")] public void RequestFailedException() { - // create a client var client = new SecretClient(new Uri("http://example.com"), new DefaultAzureCredential()); diff --git a/sdk/core/System.Memory.Data/tests/BinaryDataTests.cs b/sdk/core/System.Memory.Data/tests/BinaryDataTests.cs index aa788594ba85d..46adcfdded61a 100644 --- a/sdk/core/System.Memory.Data/tests/BinaryDataTests.cs +++ b/sdk/core/System.Memory.Data/tests/BinaryDataTests.cs @@ -288,7 +288,6 @@ public void MaxStreamLengthRespected() // should not throw var data = BinaryData.FromStream(new OverFlowStream(offset: int.MaxValue - 1000)); - } [Fact] @@ -364,7 +363,6 @@ public async Task CreateThrowsOnNullStream() ex = await Assert.ThrowsAsync(() => BinaryData.FromStreamAsync(null)); Assert.Contains("stream", ex.Message); - } [Fact] @@ -565,7 +563,6 @@ public void CloseStreamValidation() Assert.Throws(() => stream.Length); Assert.False(stream.CanRead); Assert.False(stream.CanSeek); - } private class DerivedModel : TestModel diff --git a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/tests/E2eTestBase.cs b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/tests/E2eTestBase.cs index 9f33e544282c2..4f61626c97b12 100644 --- a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/tests/E2eTestBase.cs +++ b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/tests/E2eTestBase.cs @@ -43,6 +43,5 @@ private DigitalTwinsManagementClient GetDigitalTwinsManagementClient() TestEnvironment.Credential, InstrumentClientOptions(new DigitalTwinsManagementClientOptions())); } - } } diff --git a/sdk/dns/Azure.ResourceManager.Dns/tests/DnsManagementClientBase.cs b/sdk/dns/Azure.ResourceManager.Dns/tests/DnsManagementClientBase.cs index 2a1f46eb8662f..6e28a018a4d1c 100644 --- a/sdk/dns/Azure.ResourceManager.Dns/tests/DnsManagementClientBase.cs +++ b/sdk/dns/Azure.ResourceManager.Dns/tests/DnsManagementClientBase.cs @@ -9,7 +9,6 @@ namespace Azure.ResourceManager.Dns.Tests { - [RunFrequency(RunTestFrequency.Manually)] public abstract class DnsManagementClientBase : ManagementRecordedTestBase { @@ -23,7 +22,6 @@ public abstract class DnsManagementClientBase : ManagementRecordedTestBase(async () => await ZonesOperations.CreateOrUpdateAsync(resourceGroup, this.defaultZoneName, response, "somegibberish", null)); await ZonesOperations.StartDeleteAsync(resourceGroup, this.defaultZoneName); - } [TestCase] diff --git a/sdk/dns/Azure.ResourceManager.Dns/tests/Tests/ScenarioTests.DnsTests.RecordSet.cs b/sdk/dns/Azure.ResourceManager.Dns/tests/Tests/ScenarioTests.DnsTests.RecordSet.cs index 7b3a7f8644bc9..cbb9750d537df 100644 --- a/sdk/dns/Azure.ResourceManager.Dns/tests/Tests/ScenarioTests.DnsTests.RecordSet.cs +++ b/sdk/dns/Azure.ResourceManager.Dns/tests/Tests/ScenarioTests.DnsTests.RecordSet.cs @@ -58,7 +58,6 @@ public async Task ClearChallengeCacheforRecord() var aZone = new Zone("Global"); await ZonesOperations.CreateOrUpdateAsync(this.resourceGroup, this.zoneNameForList, aZone); setupRun = true; - } else if (setupRun) { @@ -278,13 +277,11 @@ public async Task CreateGetMx() this.dummyNsRecords, this.dummyPtrRecords, this.dummySrvRecords, this.dummyTxtRecords, null, null, this.dummyCaaRecords); var createRecordSetResponse = await RecordSetsOperations.CreateOrUpdateAsync(resourceGroup, this.zoneNameForList, recordName, RecordType.MX, testMxRecordSet); Assert.True(Helper.AreEqual(createRecordSetResponse, testMxRecordSet, ignoreEtag: true)); - } [TestCase] public async Task CreateGetNs() { - var nsRecords = new ChangeTrackingList { new NsRecord {Nsdname = "ns1.scsfsm.com"}, @@ -315,7 +312,6 @@ public async Task CreateGetPtr() [TestCase] public async Task CreateGetSrv() { - var srvRecords = new ChangeTrackingList { new SrvRecord @@ -344,7 +340,6 @@ public async Task CreateGetSrv() [TestCase] public async Task CreateGetTxt() { - var txtRecords = new ChangeTrackingList { new TxtRecord(new List{"lorem"}), @@ -424,8 +419,6 @@ await RecordSetsOperations.CreateOrUpdateAsync( { Assert.True(exceptionCaught); } - } - } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/EventGridPublisherClientOptions.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/EventGridPublisherClientOptions.cs index 20ce98e4ef80c..e7285c66b4ac9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/EventGridPublisherClientOptions.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/EventGridPublisherClientOptions.cs @@ -12,7 +12,6 @@ namespace Azure.Messaging.EventGrid /// public class EventGridPublisherClientOptions : ClientOptions { - /// /// The latest service version supported by this client library. /// diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/tests/CloudEventTests.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/tests/CloudEventTests.cs index 16a731c9c3787..3589932cd22c5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/tests/CloudEventTests.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/tests/CloudEventTests.cs @@ -18,7 +18,6 @@ namespace Azure.Messaging.EventGrid.Tests { public class CloudEventTests { - private const string TraceParentHeaderName = "traceparent"; private const string TraceStateHeaderName = "tracestate"; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/tests/DroneShippingInfo.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/tests/DroneShippingInfo.cs index d980f54712c08..ae84a177fb9b7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/tests/DroneShippingInfo.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/tests/DroneShippingInfo.cs @@ -3,7 +3,6 @@ namespace Azure.Messaging.EventGrid.Tests { - public class DroneShippingInfo : ShippingInfo { public string DroneId { get; set; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/tests/RocketShippingInfo.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/tests/RocketShippingInfo.cs index 73971d5ef10d5..473f0b219b5bb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/tests/RocketShippingInfo.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/tests/RocketShippingInfo.cs @@ -3,7 +3,6 @@ namespace Azure.Messaging.EventGrid.Tests { - public class RocketShippingInfo : ShippingInfo { public int RocketNumber { get; set; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/tests/ShippingInfo.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/tests/ShippingInfo.cs index a46f19857c99e..d075eb4b59d59 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/tests/ShippingInfo.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/tests/ShippingInfo.cs @@ -3,7 +3,6 @@ namespace Azure.Messaging.EventGrid.Tests { - public class ShippingInfo { public string ShippingType { get; set; } diff --git a/sdk/eventgrid/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/tests/CloudEventTests.cs b/sdk/eventgrid/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/tests/CloudEventTests.cs index 5b0f8c74ea7ec..eb997db755e8f 100644 --- a/sdk/eventgrid/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/tests/CloudEventTests.cs +++ b/sdk/eventgrid/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/tests/CloudEventTests.cs @@ -21,7 +21,6 @@ namespace Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents.Tests { public class CloudEventTests { - private const string TraceParentHeaderName = "traceparent"; private const string TraceStateHeaderName = "tracestate"; diff --git a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/EventGridExtensionConfigProvider.cs b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/EventGridExtensionConfigProvider.cs index 8b8ec0f49f318..ea11974581f48 100644 --- a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/EventGridExtensionConfigProvider.cs +++ b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/EventGridExtensionConfigProvider.cs @@ -206,7 +206,6 @@ private async Task ProcessAsync(HttpRequestMessage req) } return new HttpResponseMessage(HttpStatusCode.BadRequest); - } private class JTokenToPocoConverter : IConverter diff --git a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/EventGridWebJobsBuilderExtensions.cs b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/EventGridWebJobsBuilderExtensions.cs index c29fe89e96616..7f560aeb027aa 100644 --- a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/EventGridWebJobsBuilderExtensions.cs +++ b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/EventGridWebJobsBuilderExtensions.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.WebJobs.Extensions.EventGrid /// public static class EventGridWebJobsBuilderExtensions { - /// /// Adds the EventGrid extension to the provided . /// diff --git a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/TriggerBinding/EventGridTriggerAttributeBindingProvider.cs b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/TriggerBinding/EventGridTriggerAttributeBindingProvider.cs index 69544a68fc90a..fe4b2138355ec 100644 --- a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/TriggerBinding/EventGridTriggerAttributeBindingProvider.cs +++ b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/TriggerBinding/EventGridTriggerAttributeBindingProvider.cs @@ -101,7 +101,6 @@ public Task BindAsync(object value, ValueBindingContext context) { throw new FormatException($"Unable to parse {stringValue} to {typeof(JObject)}"); } - } else { diff --git a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/tests/FakeData.cs b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/tests/FakeData.cs index cc26a2e68acd3..940c7bac36aff 100644 --- a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/tests/FakeData.cs +++ b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/tests/FakeData.cs @@ -177,5 +177,4 @@ public static class FakeData 'metadataVersion': '1' }"; } - } \ No newline at end of file diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/ReadMeSnippetsLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/ReadMeSnippetsLiveTests.cs index a648e01c96814..4ed3ee35974ee 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/ReadMeSnippetsLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/ReadMeSnippetsLiveTests.cs @@ -26,7 +26,6 @@ namespace Azure.Messaging.EventHubs.Tests.Snippets [Category(TestCategory.DisallowVisualStudioLiveUnitTesting)] [SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Example assignments needed for snippet output content.")] public class ReadMeSnippetsLiveTests - { /// /// Performs basic smoke test validation of the contained snippet. diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Testing/EventHubsTestEnvironment.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Testing/EventHubsTestEnvironment.cs index 0700d25dbe6d8..517d90c7a9a70 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Testing/EventHubsTestEnvironment.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Testing/EventHubsTestEnvironment.cs @@ -152,7 +152,6 @@ public EventHubsTestEnvironment() : base("eventhub") } return TimeSpan.FromMinutes(interval); - }, LazyThreadSafetyMode.PublicationOnly); } diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpClient.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpClient.cs index 4980496925345..171161d7523a5 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpClient.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpClient.cs @@ -152,7 +152,6 @@ protected AmqpClient(string host, { Scheme = clientOptions.TransportType.GetUriScheme(), Host = host - }.Uri; EventHubName = eventHubName; diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpError.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpError.cs index 8948b807a4c6e..15f57dbd1f22a 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpError.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpError.cs @@ -267,7 +267,6 @@ private static Exception CreateException(string condition, /// private static AmqpSymbol DetermineErrorCondition(AmqpMessage response) { - // If there was an error condition present, use that. if (response.ApplicationProperties.Map.TryGetValue(AmqpResponse.ErrorCondition, out AmqpSymbol condition)) diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpProducer.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpProducer.cs index 058898aee8c96..36c4efd34ae26 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpProducer.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpProducer.cs @@ -575,7 +575,6 @@ protected virtual async Task CreateLinkAndEnsureProducerStateAs InitializedPartitionProperties = new PartitionPublishingProperties(false, producerGroup, ownerLevel, sequence); partitionOptions.StartingSequenceNumber = null; } - } catch (Exception ex) { diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Authorization/EventHubsSharedAccessKeyCredential.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Authorization/EventHubsSharedAccessKeyCredential.cs index db929d9ec89c0..85e74dbba0be2 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Authorization/EventHubsSharedAccessKeyCredential.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Authorization/EventHubsSharedAccessKeyCredential.cs @@ -164,7 +164,6 @@ public void UpdateSharedAccessSignature(string sharedAccessSignature) internal SharedAccessSignatureCredential AsSharedAccessSignatureCredential(string eventHubResource, TimeSpan? signatureValidityDuration = default) { - SharedAccessSignatureCredential = string.IsNullOrEmpty(SharedAccessSignature) ? new SharedAccessSignatureCredential(new SharedAccessSignature(eventHubResource, SharedAccessKeyName, SharedAccessKey, signatureValidityDuration)) : new SharedAccessSignatureCredential(new SharedAccessSignature(SharedAccessSignature)); diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Consumer/EventHubConsumerClient.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Consumer/EventHubConsumerClient.cs index fc86bc3d1146e..edbea31599850 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Consumer/EventHubConsumerClient.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Consumer/EventHubConsumerClient.cs @@ -336,7 +336,6 @@ public virtual async Task GetEventHubPropertiesAsync(Cancell /// public virtual async Task GetPartitionIdsAsync(CancellationToken cancellationToken = default) { - Argument.AssertNotClosed(IsClosed, nameof(EventHubConsumerClient)); return await Connection.GetPartitionIdsAsync(RetryPolicy, cancellationToken).ConfigureAwait(false); } @@ -1049,7 +1048,6 @@ private Task StartBackgroundChannelPublishingAsync(TransportConsumer transportCo channel.Writer.TryComplete(activeException); notifyException(activeException); } - }, cancellationToken); /// diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Producer/EventHubProducerClient.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Producer/EventHubProducerClient.cs index 20f6357b34f21..3dca682c6ae85 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Producer/EventHubProducerClient.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Producer/EventHubProducerClient.cs @@ -418,7 +418,6 @@ public virtual async Task GetEventHubPropertiesAsync(Cancell /// public virtual async Task GetPartitionIdsAsync(CancellationToken cancellationToken = default) { - Argument.AssertNotClosed(IsClosed, nameof(EventHubProducerClient)); return await Connection.GetPartitionIdsAsync(RetryPolicy, cancellationToken).ConfigureAwait(false); } @@ -465,7 +464,6 @@ public virtual async Task GetPartitionPublishingP if (!partitionState.IsInitialized) { - cancellationToken.ThrowIfCancellationRequested(); await InitializePartitionStateAsync(partitionState, cancellationToken).ConfigureAwait(false); } @@ -1118,7 +1116,6 @@ private async Task SendIdempotentAsync(EventDataBatch eventBatch, } finally { - EventHubsEventSource.Log.IdempotentPublishComplete(EventHubName, options.PartitionId); } } diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Connection/EventHubConnectionTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Connection/EventHubConnectionTests.cs index b367e749b5615..72edb88c2a9f2 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Connection/EventHubConnectionTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Connection/EventHubConnectionTests.cs @@ -852,7 +852,6 @@ public InjectableTransportClientMock(TransportClient transportClient, { TransportClient = transportClient; SetTransportClient(transportClient); - } public InjectableTransportClientMock(TransportClient transportClient, @@ -888,7 +887,6 @@ private void SetTransportClient(TransportClient transportClient) => typeof(EventHubConnection) .GetProperty("InnerClient", BindingFlags.Instance | BindingFlags.NonPublic) .SetValue(this, transportClient); - } /// diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Consumer/EventHubConsumerClientTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Consumer/EventHubConsumerClientTests.cs index 84c1cbe3783b2..64af2b767c319 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Consumer/EventHubConsumerClientTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Consumer/EventHubConsumerClientTests.cs @@ -979,7 +979,6 @@ public async Task ReadEventsFromPartitionAsyncEmitsEventsWithMultipleIteratorsAn } firstCompletionSource.TrySetResult(0); - }, cancellation.Token); var secondSubscriberTask = Task.Run(async () => @@ -998,7 +997,6 @@ public async Task ReadEventsFromPartitionAsyncEmitsEventsWithMultipleIteratorsAn } secondCompletionSource.TrySetResult(0); - }, cancellation.Token); await Task.WhenAll(firstSubscriberTask, secondSubscriberTask, firstCompletionSource.Task, secondCompletionSource.Task).ConfigureAwait(false); @@ -1089,7 +1087,6 @@ public async Task ReadEventsFromPartitionAsyncEmitsEventsWithMultipleIteratorsAn } firstCompletionSource.TrySetResult(0); - }, cancellation.Token); var secondSubscriberTask = Task.Run(async () => @@ -1108,7 +1105,6 @@ public async Task ReadEventsFromPartitionAsyncEmitsEventsWithMultipleIteratorsAn } secondCompletionSource.TrySetResult(0); - }, cancellation.Token); await Task.WhenAll(firstSubscriberTask, secondSubscriberTask, firstCompletionSource.Task, secondCompletionSource.Task).ConfigureAwait(false); @@ -1760,7 +1756,6 @@ public async Task ReadEventsAsyncPublishesEventsWithMultipleIterators() } firstCompletionSource.TrySetResult(0); - }, cancellation.Token); var secondSubscriberTask = Task.Run(async () => @@ -1784,7 +1779,6 @@ public async Task ReadEventsAsyncPublishesEventsWithMultipleIterators() } secondCompletionSource.TrySetResult(0); - }, cancellation.Token); await Task.WhenAll(firstSubscriberTask, secondSubscriberTask, firstCompletionSource.Task, secondCompletionSource.Task).ConfigureAwait(false); diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/EventProcessorTests.MainProcessingLoop.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/EventProcessorTests.MainProcessingLoop.cs index 40179ac0e9aec..64406bc975ffd 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/EventProcessorTests.MainProcessingLoop.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/EventProcessorTests.MainProcessingLoop.cs @@ -1805,6 +1805,5 @@ public async Task LoadBalancingAppliesTheBalancedStrategy() mockLoadBalancer .Verify(lb => lb.RunLoadBalancingAsync(partitionIds, It.IsAny()), Times.Once(), "The load balancer did not run a single cycle."); } - } } diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubProducerClientTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubProducerClientTests.cs index 3fe79ea5cf412..1fa7157dea603 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubProducerClientTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubProducerClientTests.cs @@ -715,7 +715,6 @@ public async Task SendInvokesTheTransportProducerWithABatch() [Test] public void SendIdempotentRequiresThePartition() { - var events = EventGenerator.CreateEvents(5); var transportProducer = new ObservableTransportProducerMock(); var connection = new MockConnection(() => transportProducer); diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/ReadMeSnippetsLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/ReadMeSnippetsLiveTests.cs index 86241b9db647a..cb5df9940deeb 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/ReadMeSnippetsLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/ReadMeSnippetsLiveTests.cs @@ -24,7 +24,6 @@ namespace Azure.Messaging.EventHubs.Tests.Snippets [Category(TestCategory.DisallowVisualStudioLiveUnitTesting)] [SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Example assignments needed for snippet output content.")] public class ReadMeSnippetsLiveTests - { /// /// Performs basic smoke test validation of the contained snippet. diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/tests/Tests/ScenarioTests.NamespaceTests.CRUDAuthorizationRules.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/tests/Tests/ScenarioTests.NamespaceTests.CRUDAuthorizationRules.cs index 8bfa08e9ee829..6526a92259340 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/tests/Tests/ScenarioTests.NamespaceTests.CRUDAuthorizationRules.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/tests/Tests/ScenarioTests.NamespaceTests.CRUDAuthorizationRules.cs @@ -131,7 +131,6 @@ public async Task NamespaceCreateGetUpdateDeleteAuthorizationRules() DelayInTest(5); // Delete namespace await WaitForCompletionAsync(await NamespacesOperations.StartDeleteAsync(resourceGroup, namespaceName)); - } } } diff --git a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubTests.cs b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubTests.cs index 33aa82cbe9c69..5d3f602ba1a42 100644 --- a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubTests.cs +++ b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubTests.cs @@ -110,7 +110,6 @@ private static TestEventData GetSystemProperties(byte[] body, string partitionKe [Test] public void GetBindingData_MultipleDispatch_ReturnsExpectedValue() { - var events = new EventData[3] { GetSystemProperties(Encoding.UTF8.GetBytes("Event 1"), $"pk0"), diff --git a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubsScaleMonitorTests.cs b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubsScaleMonitorTests.cs index ab41a36ab2f0c..3ff3d88cd2c2b 100644 --- a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubsScaleMonitorTests.cs +++ b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubsScaleMonitorTests.cs @@ -138,7 +138,6 @@ public async Task CreateTriggerMetrics_ReturnsExpectedResult() [Test] public async Task CreateTriggerMetrics_MultiplePartitions_ReturnsExpectedResult() { - // No messages processed, no messages in queue _checkpoints = new EventProcessorCheckpoint[] { @@ -444,6 +443,5 @@ public async Task CreateTriggerMetrics_HandlesExceptions() _loggerProvider.ClearAllLogMessages(); } - } } diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/src/AzureBlobXmlRepository.cs b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/src/AzureBlobXmlRepository.cs index 6f464153ae4e0..fcf2deb46391d 100644 --- a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/src/AzureBlobXmlRepository.cs +++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/src/AzureBlobXmlRepository.cs @@ -144,7 +144,6 @@ private async Task GetLatestDataAsync() BlobContents = memoryStream.ToArray(), ETag = response.Headers.ETag }; - } Volatile.Write(ref _cachedBlobData, latestCachedData); } diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/AzureKeyVaultXmlEncryptor.cs b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/AzureKeyVaultXmlEncryptor.cs index d6c77c8d70b4f..dd50987797713 100644 --- a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/AzureKeyVaultXmlEncryptor.cs +++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/AzureKeyVaultXmlEncryptor.cs @@ -74,7 +74,6 @@ private async Task EncryptAsync(XElement plaintextElement) return new EncryptedXmlInfo(element, typeof(AzureKeyVaultXmlDecryptor)); } - } } } diff --git a/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/tests/AzureClientAttributeTests.cs b/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/tests/AzureClientAttributeTests.cs index 24812870a2506..ad396f85ad195 100644 --- a/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/tests/AzureClientAttributeTests.cs +++ b/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/tests/AzureClientAttributeTests.cs @@ -125,6 +125,5 @@ public void Run([AzureClient("%ConnectionSettingName%")] TestClient testClient) Assert.AreEqual(testClient.ConnectionString, "Key=Value;Key2=Value2"); } } - } } \ No newline at end of file diff --git a/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/tests/shared/FakeActivator.cs b/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/tests/shared/FakeActivator.cs index 80b7caeebf936..9c50d5804d9b6 100644 --- a/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/tests/shared/FakeActivator.cs +++ b/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/tests/shared/FakeActivator.cs @@ -6,7 +6,6 @@ namespace Microsoft.Azure.WebJobs.Host.TestCommon { - public class FakeActivator : IJobActivator { public Dictionary _instances = new Dictionary(); diff --git a/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/tests/shared/TestHelpers.cs b/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/tests/shared/TestHelpers.cs index 00fa672488e7c..6d8d54f6a9d64 100644 --- a/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/tests/shared/TestHelpers.cs +++ b/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/tests/shared/TestHelpers.cs @@ -317,5 +317,4 @@ public class TestProgram { } } - } diff --git a/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientFactory.cs b/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientFactory.cs index 86c22bcc1b2ff..fd925f84262dc 100644 --- a/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientFactory.cs +++ b/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientFactory.cs @@ -333,6 +333,5 @@ internal static bool TryCreateObject(Type type, IConfigurationSection configurat throw new InvalidOperationException($"Unable to convert section '{configuration.Path}' to parameter type '{type}', unable to find matching constructor."); } - } } \ No newline at end of file diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/CustomFormModelInfo.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/CustomFormModelInfo.cs index 01497aa083c77..4bc21210c03a3 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/CustomFormModelInfo.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/CustomFormModelInfo.cs @@ -61,6 +61,5 @@ internal CustomFormModelInfo(string modelId, CustomFormModelStatus status, DateT /// [CodeGenMember("LastUpdatedDateTime")] public DateTimeOffset TrainingCompletedOn { get; } - } } diff --git a/sdk/identity/Azure.Identity/src/AuthenticationRecord.cs b/sdk/identity/Azure.Identity/src/AuthenticationRecord.cs index 7d4a442079364..ccb17efd41529 100644 --- a/sdk/identity/Azure.Identity/src/AuthenticationRecord.cs +++ b/sdk/identity/Azure.Identity/src/AuthenticationRecord.cs @@ -31,7 +31,6 @@ public class AuthenticationRecord internal AuthenticationRecord() { - } internal AuthenticationRecord(AuthenticationResult authResult, string clientId) @@ -131,7 +130,6 @@ private async Task SerializeAsync(Stream stream, bool async, CancellationToken c { using (var json = new Utf8JsonWriter(stream)) { - json.WriteStartObject(); json.WriteString(s_usernamePropertyNameBytes, Username); diff --git a/sdk/identity/Azure.Identity/src/AuthenticationRequiredException.cs b/sdk/identity/Azure.Identity/src/AuthenticationRequiredException.cs index 7367809bbad0a..7ae59a0aa7453 100644 --- a/sdk/identity/Azure.Identity/src/AuthenticationRequiredException.cs +++ b/sdk/identity/Azure.Identity/src/AuthenticationRequiredException.cs @@ -19,7 +19,6 @@ public class AuthenticationRequiredException : CredentialUnavailableException public AuthenticationRequiredException(string message, TokenRequestContext context) : this(message, context, default) { - } /// diff --git a/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs b/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs index 27b5f94eb0e5a..bba8b6a0e2bd6 100644 --- a/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs +++ b/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs @@ -12,7 +12,6 @@ namespace Azure.Identity { internal class AzureArcManagedIdentitySource : ManagedIdentitySource { - private const string IdentityEndpointInvalidUriError = "The environment variable IDENTITY_ENDPOINT contains an invalid Uri."; private const string NoChallengeErrorMessage = "Did not receive expected WWW-Authenticate header in the response from Azure Arc Managed Identity Endpoint."; private const string InvalidChallangeErrorMessage = "The WWW-Authenticate header in the response from Azure Arc Managed Identity Endpoint did not match the expected format."; diff --git a/sdk/identity/Azure.Identity/src/ChainedTokenCredential.cs b/sdk/identity/Azure.Identity/src/ChainedTokenCredential.cs index 81eaa2ec9983e..382defdb57ed4 100644 --- a/sdk/identity/Azure.Identity/src/ChainedTokenCredential.cs +++ b/sdk/identity/Azure.Identity/src/ChainedTokenCredential.cs @@ -49,7 +49,6 @@ public ChainedTokenCredential(params TokenCredential[] sources) { throw new ArgumentException("sources must not contain null", nameof(sources)); } - } _sources = sources; } diff --git a/sdk/identity/Azure.Identity/src/ClientSecretCredentialOptions.cs b/sdk/identity/Azure.Identity/src/ClientSecretCredentialOptions.cs index 1780e03fd820c..c1213c1607212 100644 --- a/sdk/identity/Azure.Identity/src/ClientSecretCredentialOptions.cs +++ b/sdk/identity/Azure.Identity/src/ClientSecretCredentialOptions.cs @@ -12,6 +12,5 @@ public class ClientSecretCredentialOptions : TokenCredentialOptions, ITokenCache /// Specifies the to be used by the credential. /// public TokenCache TokenCache { get; set; } - } } diff --git a/sdk/identity/Azure.Identity/src/CredentialDiagnosticScope.cs b/sdk/identity/Azure.Identity/src/CredentialDiagnosticScope.cs index 62c61f9b98427..c692057296e4c 100644 --- a/sdk/identity/Azure.Identity/src/CredentialDiagnosticScope.cs +++ b/sdk/identity/Azure.Identity/src/CredentialDiagnosticScope.cs @@ -74,7 +74,6 @@ private bool TryWrapException(ref Exception exception) exception = new AuthenticationFailedException($"{_name.Substring(0, _name.IndexOf('.'))} authentication failed: {exception.Message}", exception); return true; - } public void Dispose() => _scopeHandler.Dispose(_name, _scope); diff --git a/sdk/identity/Azure.Identity/src/CredentialUnavailableException.cs b/sdk/identity/Azure.Identity/src/CredentialUnavailableException.cs index f3d0d8d764eb0..94f4f1efbeda8 100644 --- a/sdk/identity/Azure.Identity/src/CredentialUnavailableException.cs +++ b/sdk/identity/Azure.Identity/src/CredentialUnavailableException.cs @@ -8,13 +8,11 @@ namespace Azure.Identity { - /// /// An exception indicating a did not attempt to authenticate and retrieve , as its prerequisite information or state was not available. /// public class CredentialUnavailableException : AuthenticationFailedException { - /// /// Creates a new with the specified message. /// diff --git a/sdk/identity/Azure.Identity/src/DeviceCodeCredential.cs b/sdk/identity/Azure.Identity/src/DeviceCodeCredential.cs index 2c229d71d2138..8b52275e29725 100644 --- a/sdk/identity/Azure.Identity/src/DeviceCodeCredential.cs +++ b/sdk/identity/Azure.Identity/src/DeviceCodeCredential.cs @@ -33,7 +33,6 @@ public class DeviceCodeCredential : TokenCredential public DeviceCodeCredential() : this(DefaultDeviceCodeHandler, null, Constants.DeveloperSignOnClientId, null, null) { - } /// @@ -55,7 +54,6 @@ public DeviceCodeCredential(DeviceCodeCredentialOptions options) public DeviceCodeCredential(Func deviceCodeCallback, string clientId, TokenCredentialOptions options = default) : this(deviceCodeCallback, null, clientId, options, null) { - } /// @@ -234,6 +232,5 @@ private Task DeviceCodeCallbackImpl(DeviceCodeResult deviceCode, CancellationTok { return DeviceCodeCallback(new DeviceCodeInfo(deviceCode), cancellationToken); } - } } diff --git a/sdk/identity/Azure.Identity/src/EnvironmentCredential.cs b/sdk/identity/Azure.Identity/src/EnvironmentCredential.cs index 35acef5a75e50..1e06f3e5d7ad9 100644 --- a/sdk/identity/Azure.Identity/src/EnvironmentCredential.cs +++ b/sdk/identity/Azure.Identity/src/EnvironmentCredential.cs @@ -78,7 +78,6 @@ internal EnvironmentCredential(CredentialPipeline pipeline) Credential = new ClientCertificateCredential(tenantId, clientId, clientCertificatePath, null, _pipeline, null); } } - } internal EnvironmentCredential(CredentialPipeline pipeline, TokenCredential credential) diff --git a/sdk/identity/Azure.Identity/src/HttpExtensions.cs b/sdk/identity/Azure.Identity/src/HttpExtensions.cs index d98844bbc55e7..1e04a71e2f1b1 100644 --- a/sdk/identity/Azure.Identity/src/HttpExtensions.cs +++ b/sdk/identity/Azure.Identity/src/HttpExtensions.cs @@ -80,6 +80,5 @@ public static async Task ToPipelineRequestContentAsync(this Http return null; } - } } diff --git a/sdk/identity/Azure.Identity/src/IdentityModelFactory.cs b/sdk/identity/Azure.Identity/src/IdentityModelFactory.cs index 961ff8b74073a..122639be83eb6 100644 --- a/sdk/identity/Azure.Identity/src/IdentityModelFactory.cs +++ b/sdk/identity/Azure.Identity/src/IdentityModelFactory.cs @@ -6,7 +6,6 @@ namespace Azure.Identity { - /// /// Model factory that enables mocking for the Azure Identity library. /// diff --git a/sdk/identity/Azure.Identity/src/InteractiveBrowserCredential.cs b/sdk/identity/Azure.Identity/src/InteractiveBrowserCredential.cs index b12cc434dd1ac..7d263d2549e64 100644 --- a/sdk/identity/Azure.Identity/src/InteractiveBrowserCredential.cs +++ b/sdk/identity/Azure.Identity/src/InteractiveBrowserCredential.cs @@ -32,7 +32,6 @@ public class InteractiveBrowserCredential : TokenCredential public InteractiveBrowserCredential() : this(null, Constants.DeveloperSignOnClientId, null, null) { - } /// @@ -54,7 +53,6 @@ public InteractiveBrowserCredential(InteractiveBrowserCredentialOptions options) public InteractiveBrowserCredential(string clientId) : this(null, clientId, null, null) { - } /// diff --git a/sdk/identity/Azure.Identity/src/ManagedIdentityCredential.cs b/sdk/identity/Azure.Identity/src/ManagedIdentityCredential.cs index 30f7064fc9343..3c426dab5c7d6 100644 --- a/sdk/identity/Azure.Identity/src/ManagedIdentityCredential.cs +++ b/sdk/identity/Azure.Identity/src/ManagedIdentityCredential.cs @@ -30,7 +30,6 @@ public class ManagedIdentityCredential : TokenCredential /// protected ManagedIdentityCredential() { - } /// @@ -53,7 +52,6 @@ internal ManagedIdentityCredential(string clientId, CredentialPipeline pipeline) internal ManagedIdentityCredential(ManagedIdentityClient client) { - _pipeline = client.Pipeline; _client = client; diff --git a/sdk/identity/Azure.Identity/src/ManagedIdentitySource.cs b/sdk/identity/Azure.Identity/src/ManagedIdentitySource.cs index 3b35078e7448f..be0ae12301957 100644 --- a/sdk/identity/Azure.Identity/src/ManagedIdentitySource.cs +++ b/sdk/identity/Azure.Identity/src/ManagedIdentitySource.cs @@ -72,7 +72,6 @@ private static AccessToken GetTokenFromResponse(in JsonElement root) return accessToken != null && expiresOn.HasValue ? new AccessToken(accessToken, expiresOn.Value) : throw new AuthenticationFailedException(AuthenticationResponseInvalidFormatError); - } private static DateTimeOffset? TryParseExpiresOn(JsonElement jsonExpiresOn) diff --git a/sdk/identity/Azure.Identity/src/MsalCacheReader.cs b/sdk/identity/Azure.Identity/src/MsalCacheReader.cs index 1046d5ba2c470..929bcc72509a2 100644 --- a/sdk/identity/Azure.Identity/src/MsalCacheReader.cs +++ b/sdk/identity/Azure.Identity/src/MsalCacheReader.cs @@ -70,5 +70,4 @@ private async Task ReadCacheFromProtectedStorageAsync() } } } - } diff --git a/sdk/identity/Azure.Identity/src/SharedTokenCacheCredential.cs b/sdk/identity/Azure.Identity/src/SharedTokenCacheCredential.cs index db389118e27ef..cd5d78fd786ff 100644 --- a/sdk/identity/Azure.Identity/src/SharedTokenCacheCredential.cs +++ b/sdk/identity/Azure.Identity/src/SharedTokenCacheCredential.cs @@ -40,7 +40,6 @@ public class SharedTokenCacheCredential : TokenCredential public SharedTokenCacheCredential() : this(null, null, null, null, null) { - } /// diff --git a/sdk/identity/Azure.Identity/src/UsernamePasswordCredential.cs b/sdk/identity/Azure.Identity/src/UsernamePasswordCredential.cs index 849ff4c4da59e..826c8e832d629 100644 --- a/sdk/identity/Azure.Identity/src/UsernamePasswordCredential.cs +++ b/sdk/identity/Azure.Identity/src/UsernamePasswordCredential.cs @@ -32,7 +32,6 @@ public class UsernamePasswordCredential : TokenCredential /// protected UsernamePasswordCredential() { - } /// @@ -46,7 +45,6 @@ protected UsernamePasswordCredential() public UsernamePasswordCredential(string username, string password, string tenantId, string clientId) : this(username, password, tenantId, clientId, (TokenCredentialOptions)null) { - } /// diff --git a/sdk/identity/Azure.Identity/src/UsernamePasswordCredentialOptions.cs b/sdk/identity/Azure.Identity/src/UsernamePasswordCredentialOptions.cs index d2d188752a06b..2ce9816686ec7 100644 --- a/sdk/identity/Azure.Identity/src/UsernamePasswordCredentialOptions.cs +++ b/sdk/identity/Azure.Identity/src/UsernamePasswordCredentialOptions.cs @@ -12,6 +12,5 @@ public class UsernamePasswordCredentialOptions : TokenCredentialOptions, ITokenC /// Specifies the to be used by the credential. /// public TokenCache TokenCache { get; set; } - } } diff --git a/sdk/identity/Azure.Identity/tests/ChainedTokenCredentialTests.cs b/sdk/identity/Azure.Identity/tests/ChainedTokenCredentialTests.cs index 1d7f54a558112..044c0a50a3daa 100644 --- a/sdk/identity/Azure.Identity/tests/ChainedTokenCredentialTests.cs +++ b/sdk/identity/Azure.Identity/tests/ChainedTokenCredentialTests.cs @@ -14,7 +14,6 @@ public class ChainedTokenCredentialTests { public class MockException : Exception { - } public class SimpleMockTokenCredential : TokenCredential diff --git a/sdk/identity/Azure.Identity/tests/DeviceCodeCredentialTests.cs b/sdk/identity/Azure.Identity/tests/DeviceCodeCredentialTests.cs index c6ca6e0229464..3a85d9b1707d5 100644 --- a/sdk/identity/Azure.Identity/tests/DeviceCodeCredentialTests.cs +++ b/sdk/identity/Azure.Identity/tests/DeviceCodeCredentialTests.cs @@ -50,7 +50,6 @@ private async Task VerifyDeviceCodeCallbackCancellationToken(DeviceCodeInfo code private class MockException : Exception { - } private async Task ThrowingDeviceCodeCallback(DeviceCodeInfo code, CancellationToken cancellationToken) @@ -230,7 +229,6 @@ private MockResponse ProcessMockRequest(MockRequest mockRequest, string code, st if (requestUrl.StartsWith("https://login.microsoftonline.com/organizations/oauth2/v2.0/token")) { return CreateTokenResponse(code, token); - } throw new InvalidOperationException(); @@ -424,5 +422,4 @@ private static MockResponse AuthorizationPendingResponse } } } - } diff --git a/sdk/identity/Azure.Identity/tests/IdentityRecordedTestSanitizer.cs b/sdk/identity/Azure.Identity/tests/IdentityRecordedTestSanitizer.cs index 9b188aafa4c38..3883b4b0c322a 100644 --- a/sdk/identity/Azure.Identity/tests/IdentityRecordedTestSanitizer.cs +++ b/sdk/identity/Azure.Identity/tests/IdentityRecordedTestSanitizer.cs @@ -29,7 +29,6 @@ private void SanitizeTokenRequest(RecordEntry entry) entry.Request.Body = Encoding.UTF8.GetBytes("Sanitized"); UpdateSanitizedContentLength(entry.Request.Headers, entry.Request.Body.Length); - } private void SanitizeTokenResponse(RecordEntry entry) @@ -48,7 +47,6 @@ private void SanitizeTokenResponse(RecordEntry entry) foreach (JsonProperty prop in originalJson.EnumerateObject()) { - sanitizedJson.WritePropertyName(prop.Name); switch (prop.Name) diff --git a/sdk/identity/Azure.Identity/tests/InteractiveBrowserCredentialCtorTests.cs b/sdk/identity/Azure.Identity/tests/InteractiveBrowserCredentialCtorTests.cs index eefc7fc8a8aea..a51139d050062 100644 --- a/sdk/identity/Azure.Identity/tests/InteractiveBrowserCredentialCtorTests.cs +++ b/sdk/identity/Azure.Identity/tests/InteractiveBrowserCredentialCtorTests.cs @@ -127,6 +127,5 @@ public void AssertOptionsHonored(InteractiveBrowserCredentialOptions options, In Assert.AreEqual(Constants.DefaultRedirectUrl, credential.Client.RedirectUrl); } } - } } diff --git a/sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialLiveTestBase.cs b/sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialLiveTestBase.cs index 31a1644d807ae..a181ca02065f3 100644 --- a/sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialLiveTestBase.cs +++ b/sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialLiveTestBase.cs @@ -50,7 +50,6 @@ public ManagedIdenityEnvironment(IdentityTestEnvironment env) new TestEnvVar("MSI_SECRET", env.MsiSecret), new TestEnvVar("IDENTITY_HEADER", env.IdentityHeader), new TestEnvVar("IDENTITY_SERVER_THUMBPRINT", env.IdentityServerThumbprint) - }; } diff --git a/sdk/identity/Azure.Identity/tests/Mock/MockClientException.cs b/sdk/identity/Azure.Identity/tests/Mock/MockClientException.cs index 5f5db6a97e858..55843741708dd 100644 --- a/sdk/identity/Azure.Identity/tests/Mock/MockClientException.cs +++ b/sdk/identity/Azure.Identity/tests/Mock/MockClientException.cs @@ -9,7 +9,6 @@ public class MockClientException : Exception { public MockClientException(string message) : base(message) { - } } } diff --git a/sdk/identity/Azure.Identity/tests/Mock/MockDefaultAzureCredentialFactory.cs b/sdk/identity/Azure.Identity/tests/Mock/MockDefaultAzureCredentialFactory.cs index b0f8448e6461f..c4c6d3e4979fb 100644 --- a/sdk/identity/Azure.Identity/tests/Mock/MockDefaultAzureCredentialFactory.cs +++ b/sdk/identity/Azure.Identity/tests/Mock/MockDefaultAzureCredentialFactory.cs @@ -81,5 +81,4 @@ public override TokenCredential CreateVisualStudioCodeCredential(string tenantId return cred; } } - } diff --git a/sdk/identity/Azure.Identity/tests/Mock/MockManagedIdentityClient.cs b/sdk/identity/Azure.Identity/tests/Mock/MockManagedIdentityClient.cs index 920ab1006eb81..b902b4f742151 100644 --- a/sdk/identity/Azure.Identity/tests/Mock/MockManagedIdentityClient.cs +++ b/sdk/identity/Azure.Identity/tests/Mock/MockManagedIdentityClient.cs @@ -13,19 +13,16 @@ internal class MockManagedIdentityClient : ManagedIdentityClient public MockManagedIdentityClient() : this(null) { - } public MockManagedIdentityClient(CredentialPipeline pipeline) : this(pipeline, null) { - } public MockManagedIdentityClient(CredentialPipeline pipeline, string clientId) : base(pipeline, clientId) { - } public Func ManagedIdentitySourceFactory { get; set; } diff --git a/sdk/identity/Azure.Identity/tests/UsernamePasswordCredentialTests.cs b/sdk/identity/Azure.Identity/tests/UsernamePasswordCredentialTests.cs index 1249a2a87aace..d3ca1ba67acda 100644 --- a/sdk/identity/Azure.Identity/tests/UsernamePasswordCredentialTests.cs +++ b/sdk/identity/Azure.Identity/tests/UsernamePasswordCredentialTests.cs @@ -40,6 +40,5 @@ public async Task VerifyMsalClientExceptionAsync() await Task.CompletedTask; } - } } diff --git a/sdk/identity/Azure.Identity/tests/VisualStudioCodeCredentialTests.cs b/sdk/identity/Azure.Identity/tests/VisualStudioCodeCredentialTests.cs index ed45e7c39affa..9b20021591991 100644 --- a/sdk/identity/Azure.Identity/tests/VisualStudioCodeCredentialTests.cs +++ b/sdk/identity/Azure.Identity/tests/VisualStudioCodeCredentialTests.cs @@ -12,7 +12,6 @@ public class VisualStudioCodeCredentialTests : ClientTestBase { public VisualStudioCodeCredentialTests(bool isAsync) : base(isAsync) { - } [Test] diff --git a/sdk/identity/Azure.Identity/tests/samples/UserAuthenticationSnippets.cs b/sdk/identity/Azure.Identity/tests/samples/UserAuthenticationSnippets.cs index 05a1566552a8b..e050fb06e7991 100644 --- a/sdk/identity/Azure.Identity/tests/samples/UserAuthenticationSnippets.cs +++ b/sdk/identity/Azure.Identity/tests/samples/UserAuthenticationSnippets.cs @@ -64,7 +64,6 @@ public static async Task GetUserCredentialAsync() { if (!File.Exists(AUTH_RECORD_PATH)) { - #region Snippet:Identity_ClientSideUserAuthentication_Persist_TokenCache var credential = new InteractiveBrowserCredential(new InteractiveBrowserCredentialOptions { TokenCache = new PersistentTokenCache() }); #endregion diff --git a/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/ActivityLogsTest.cs b/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/ActivityLogsTest.cs index f0182bd39fe60..c2e5c3a7fdebe 100644 --- a/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/ActivityLogsTest.cs +++ b/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/ActivityLogsTest.cs @@ -152,7 +152,6 @@ private void AreEqual(EventData exp, EventData act) AreEqual(exp.Properties, act.Properties); AreEqual(exp.HttpRequest, act.HttpRequest); - } private void AreEqual(SenderAuthorization exp, SenderAuthorization act) diff --git a/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/ServiceDiagnosticSettingsTests.cs b/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/ServiceDiagnosticSettingsTests.cs index b308fc4c17a52..3c5fa1a6624ee 100644 --- a/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/ServiceDiagnosticSettingsTests.cs +++ b/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/ServiceDiagnosticSettingsTests.cs @@ -304,6 +304,5 @@ private static void CompareLists(IList exp, IList act) Assert.AreEqual(exp.Count, act.Count); } - } } diff --git a/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/TenantActivityLogsTest.cs b/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/TenantActivityLogsTest.cs index 0e22c83efe224..88b4bee3883d5 100644 --- a/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/TenantActivityLogsTest.cs +++ b/sdk/insights/Azure.ResourceManager.Insights/tests/BasicTests/TenantActivityLogsTest.cs @@ -143,7 +143,6 @@ private void AreEqual(EventData exp, EventData act) AreEqual(exp.Properties, act.Properties); AreEqual(exp.HttpRequest, act.HttpRequest); - } private void AreEqual(SenderAuthorization exp, SenderAuthorization act) @@ -171,6 +170,5 @@ private void AreEqual(HttpRequestInfo exp, HttpRequestInfo act) Assert.AreEqual(exp.Method, act.Method); Assert.AreEqual(exp.Uri, act.Uri); } - } } diff --git a/sdk/iot/Azure.Iot.Hub.Service/src/CloudToDeviceMessagesClient.cs b/sdk/iot/Azure.Iot.Hub.Service/src/CloudToDeviceMessagesClient.cs index f3a32a1a2a634..6caec6824fa5c 100644 --- a/sdk/iot/Azure.Iot.Hub.Service/src/CloudToDeviceMessagesClient.cs +++ b/sdk/iot/Azure.Iot.Hub.Service/src/CloudToDeviceMessagesClient.cs @@ -15,7 +15,6 @@ public class CloudToDeviceMessagesClient public CloudToDeviceMessagesClient() #pragma warning restore AZC0007 // DO provide a minimal constructor that takes only the parameters required to connect to the service. { - } } } diff --git a/sdk/iot/Azure.Iot.Hub.Service/src/ConfigurationsClient.cs b/sdk/iot/Azure.Iot.Hub.Service/src/ConfigurationsClient.cs index edfe7ec16a885..bedcac90b09a2 100644 --- a/sdk/iot/Azure.Iot.Hub.Service/src/ConfigurationsClient.cs +++ b/sdk/iot/Azure.Iot.Hub.Service/src/ConfigurationsClient.cs @@ -22,7 +22,6 @@ public class ConfigurationsClient /// protected ConfigurationsClient() { - } /// @@ -162,5 +161,4 @@ public virtual Response TestQueriesAsync(Confi return _configurationRestClient.TestQueries(configuration, cancellationToken); } } - } diff --git a/sdk/iot/Azure.Iot.Hub.Service/src/FilesClient.cs b/sdk/iot/Azure.Iot.Hub.Service/src/FilesClient.cs index d3fc621311631..d08741456d7c2 100644 --- a/sdk/iot/Azure.Iot.Hub.Service/src/FilesClient.cs +++ b/sdk/iot/Azure.Iot.Hub.Service/src/FilesClient.cs @@ -19,7 +19,6 @@ public class FilesClient public FilesClient() #pragma warning restore AZC0007 // DO provide a minimal constructor that takes only the parameters required to connect to the service. { - } } } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/VaultOperationsTests.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/VaultOperationsTests.cs index 936ea487ec86a..2428f00163a81 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/VaultOperationsTests.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/VaultOperationsTests.cs @@ -469,6 +469,5 @@ private void ValidateVault( Assert.AreEqual(networkRuleSet.IpRules[0].Value, vault.Properties.NetworkAcls.IpRules[0].Value); Assert.AreEqual(networkRuleSet.IpRules[1].Value, vault.Properties.NetworkAcls.IpRules[1].Value); } - } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAccessControlClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAccessControlClient.cs index 0a5a76af232ab..36aa21fb3cce3 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAccessControlClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAccessControlClient.cs @@ -42,7 +42,6 @@ protected KeyVaultAccessControlClient() public KeyVaultAccessControlClient(Uri vaultUri, TokenCredential credential) : this(vaultUri, credential, null) { - } /// diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPermission.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPermission.cs index 52efe0459c1ec..22131fa9f5b0f 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPermission.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPermission.cs @@ -10,7 +10,6 @@ namespace Azure.Security.KeyVault.Administration [CodeGenModel("Permission", Usage = new[] { "input", "output" })] public partial class KeyVaultPermission { - /// Denied actions. [CodeGenMember("NotActions")] public IList DenyActions { get; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleDefinitionListResult.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleDefinitionListResult.cs index 1e765e7108a09..fc9586ad45c25 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleDefinitionListResult.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleDefinitionListResult.cs @@ -3,9 +3,7 @@ namespace Azure.Security.KeyVault.Administration.Models { - internal partial class RoleDefinitionListResult { - } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificatePolicy.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificatePolicy.cs index c589f5684204b..a11e213e2e01c 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificatePolicy.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificatePolicy.cs @@ -268,7 +268,6 @@ void IJsonDeserializable.ReadProperties(JsonElement json) LifetimeActions.Add(LifetimeAction.FromJsonObject(actionElem)); } break; - } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateProperties.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateProperties.cs index a364377c2a4fd..9e5b5f8b72924 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateProperties.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateProperties.cs @@ -171,6 +171,5 @@ private void ParseId(Uri idToParse) Name = idToParse.Segments[2].Trim('/'); Version = (idToParse.Segments.Length == 4) ? idToParse.Segments[3].TrimEnd('/') : null; } - } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/ContactList.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/ContactList.cs index 7be45fa02d4ea..6e17b571071b4 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/ContactList.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/ContactList.cs @@ -17,7 +17,6 @@ internal class ContactList : IJsonDeserializable, IJsonSerializable public ContactList() { - } public ContactList(IEnumerable contacts) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/KeyVaultCertificateWithPolicy.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/KeyVaultCertificateWithPolicy.cs index 45d6a4a398f12..0a6d184b366da 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/KeyVaultCertificateWithPolicy.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/KeyVaultCertificateWithPolicy.cs @@ -36,5 +36,4 @@ internal override void ReadProperty(JsonProperty prop) } } } - } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/LifetimeAction.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/LifetimeAction.cs index b78b02cbb7db2..6bad5015e57ea 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/LifetimeAction.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/LifetimeAction.cs @@ -111,7 +111,6 @@ void IJsonSerializable.WriteProperties(Utf8JsonWriter json) json.WriteString(s_actionTypePropertyNameBytes, Action.ToString()); json.WriteEndObject(); - } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificateClientLiveTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificateClientLiveTests.cs index 644614deacaef..a30c883519740 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificateClientLiveTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificateClientLiveTests.cs @@ -293,7 +293,6 @@ public async Task VerifyGetCertificateCompleted() Assert.NotNull(certificate); Assert.AreEqual(certificate.Name, certName); - } [Test] diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificateIssuerTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificateIssuerTests.cs index 60241e6ca7443..70268ef64bd8a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificateIssuerTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificateIssuerTests.cs @@ -62,7 +62,6 @@ public void InitializedAdministrators() FirstName ="fName", LastName = "lName", Phone = "1234" - }, }, }; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/samples/SampleSnippets.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/samples/SampleSnippets.cs index b4f7381e213fb..140322fbf7ab7 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/samples/SampleSnippets.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/samples/SampleSnippets.cs @@ -224,7 +224,6 @@ private async Task MigrationGuide() //@@CertificatePolicy policy = CertificatePolicy.Default; /*@@*/ policy = CertificatePolicy.Default; #endregion Snippet:Azure_Security_KeyVault_Certificates_Snippets_MigrationGuide_CreateSelfSignedPolicy - { #region Snippet:Azure_Security_KeyVault_Certificates_Snippets_MigrationGuide_CreateCertificate // Start certificate creation. diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Cryptography/KeyResolver.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Cryptography/KeyResolver.cs index c575e41a3ccbb..3e3c082ab88f8 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Cryptography/KeyResolver.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Cryptography/KeyResolver.cs @@ -117,7 +117,6 @@ public virtual async Task ResolveAsync(Uri keyId, Cancellati KeyVaultPipeline pipeline = new KeyVaultPipeline(keyId, _apiVersion, _pipeline, _clientDiagnostics); return (key != null) ? new CryptographyClient(key, pipeline) : new CryptographyClient(keyId, pipeline); - } catch (Exception e) { @@ -189,6 +188,5 @@ private Request CreateGetRequest(Uri uri) return request; } - } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClient.cs index c0d45e2e6c477..9425dbae92a31 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClient.cs @@ -1069,7 +1069,6 @@ public virtual Response ImportKey(ImportKeyOptions importKeyOptions try { - return _pipeline.SendRequest(RequestMethod.Put, importKeyOptions, () => new KeyVaultKey(importKeyOptions.Name), cancellationToken, KeysPath, importKeyOptions.Name); } catch (Exception e) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyCurveName.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyCurveName.cs index adc2805fe2864..208ee5ce677a3 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyCurveName.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyCurveName.cs @@ -188,6 +188,5 @@ internal bool IsSupported P521Value => new Oid(P521OidValue), _ => null, }; - } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/samples/Sample4_EncryptDecryptAsync.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/samples/Sample4_EncryptDecryptAsync.cs index 333001595e5dd..e1e35d8c6f1d0 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/samples/Sample4_EncryptDecryptAsync.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/samples/Sample4_EncryptDecryptAsync.cs @@ -12,7 +12,6 @@ namespace Azure.Security.KeyVault.Keys.Samples { - /// /// Sample demonstrates how to encrypt and decrypt a single block of plain text with an RSA key using the asynchronous methods of the CryptographyClient. /// diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/samples/Sample5_SignVerifyAsync.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/samples/Sample5_SignVerifyAsync.cs index 15271bf77e0f2..3cd1a43a83634 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/samples/Sample5_SignVerifyAsync.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/samples/Sample5_SignVerifyAsync.cs @@ -13,7 +13,6 @@ namespace Azure.Security.KeyVault.Keys.Samples { - /// /// Sample demonstrates how to sign data with both a RSA key and an EC key using the synchronous methods of the CryptographyClient. /// diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/samples/Sample6_WrapUnwrapAsync.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/samples/Sample6_WrapUnwrapAsync.cs index 5d81fb0838262..4be040e43ece5 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/samples/Sample6_WrapUnwrapAsync.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/samples/Sample6_WrapUnwrapAsync.cs @@ -62,7 +62,6 @@ public async Task WrapUnwrapAsync() // If the keyvault is soft-delete enabled, then for permanent deletion, deleted key needs to be purged. await keyClient.PurgeDeletedKeyAsync(rsaKeyName); - } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretAttributes.cs b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretAttributes.cs index ce4c55c9b0974..0f2c48c8def21 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretAttributes.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretAttributes.cs @@ -94,5 +94,4 @@ internal void WriteProperties(Utf8JsonWriter json) // RecoveryLevel is read-only don't serialize } } - } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretClient.cs index 731a0c5dc438f..51b97c894ef81 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretClient.cs @@ -26,7 +26,6 @@ public class SecretClient /// protected SecretClient() { - } /// @@ -41,7 +40,6 @@ protected SecretClient() public SecretClient(Uri vaultUri, TokenCredential credential) : this(vaultUri, credential, null) { - } /// diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ChallengeBasedAuthenticationPolicyTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ChallengeBasedAuthenticationPolicyTests.cs index 23f74958f9e49..b14c17cafdd14 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ChallengeBasedAuthenticationPolicyTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ChallengeBasedAuthenticationPolicyTests.cs @@ -259,7 +259,6 @@ private static AccessToken Deserialize(JsonElement json) return new AccessToken(accessToken, expiresOn); } - } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Shared/src/Base64Url.cs b/sdk/keyvault/Azure.Security.KeyVault.Shared/src/Base64Url.cs index 5822bba1ff41f..2f2bb3fa416b8 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Shared/src/Base64Url.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Shared/src/Base64Url.cs @@ -19,6 +19,5 @@ public static string Encode(byte[] bytes) { return new StringBuilder(Convert.ToBase64String(bytes)).Replace('+', '-').Replace('/', '_').Replace("=", "").ToString(); } - } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Shared/src/KeyVaultIdentifier.cs b/sdk/keyvault/Azure.Security.KeyVault.Shared/src/KeyVaultIdentifier.cs index 64aae311d62c9..c1036544012af 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Shared/src/KeyVaultIdentifier.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Shared/src/KeyVaultIdentifier.cs @@ -50,7 +50,6 @@ public static bool TryParse(Uri id, out KeyVaultIdentifier identifier) identifier = new KeyVaultIdentifier { - Id = id, VaultUri = new Uri($"{id.Scheme}://{id.Authority}"), Collection = segments[1].Trim('/'), diff --git a/sdk/keyvault/samples/keyvaultproxy/tests/TestFramework/MockRequest.cs b/sdk/keyvault/samples/keyvaultproxy/tests/TestFramework/MockRequest.cs index 2f6fae2220ea2..81926a56a0a3a 100644 --- a/sdk/keyvault/samples/keyvaultproxy/tests/TestFramework/MockRequest.cs +++ b/sdk/keyvault/samples/keyvaultproxy/tests/TestFramework/MockRequest.cs @@ -26,7 +26,6 @@ public override RequestContent Content if (value != null && value.TryComputeLength(out long length)) { _headers["Content-Length"] = new List { length.ToString() }; - } else { diff --git a/sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/tests/Benchmarks/TagObjectsBenchmarks.cs b/sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/tests/Benchmarks/TagObjectsBenchmarks.cs index 32b240dcd3914..316b876489e57 100644 --- a/sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/tests/Benchmarks/TagObjectsBenchmarks.cs +++ b/sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/tests/Benchmarks/TagObjectsBenchmarks.cs @@ -83,7 +83,6 @@ public void Setup() [GlobalCleanup] public void Cleanup() { - } [Benchmark] diff --git a/sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/tests/Microsoft.OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/TestFramework/VerifyTelemetryItem.cs b/sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/tests/Microsoft.OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/TestFramework/VerifyTelemetryItem.cs index 57fb6734fbbf7..2bb283bebc9fa 100644 --- a/sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/tests/Microsoft.OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/TestFramework/VerifyTelemetryItem.cs +++ b/sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/tests/Microsoft.OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/TestFramework/VerifyTelemetryItem.cs @@ -12,7 +12,6 @@ namespace Microsoft.OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.TestFr { internal static class VerifyTelemetryItem { - public static void Verify(TelemetryItem telemetryItem, ActivityKind activityKind, ExpectedTelemetryItemValues expectedVars) { switch (activityKind) diff --git a/sdk/network/Azure.ResourceManager.Network/tests/Helpers/NetworkTestsManagementClientBase.cs b/sdk/network/Azure.ResourceManager.Network/tests/Helpers/NetworkTestsManagementClientBase.cs index 64a99398f6246..ce28662c81f04 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Helpers/NetworkTestsManagementClientBase.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Helpers/NetworkTestsManagementClientBase.cs @@ -235,7 +235,6 @@ public async Task UpdateDefaultExpressRouteCircuitWithIpv6M public async Task UpdateDefaultExpressRouteCircuitWithMicrosoftPeering(string resourceGroupName, string circuitName, RouteFilter filter, NetworkManagementClient nrpClient) { - ExpressRouteCircuitPeering peering = new ExpressRouteCircuitPeering() { Name = ExpressRoutePeeringType.MicrosoftPeering.ToString(), @@ -402,6 +401,5 @@ public static string GetChildLbResourceId(string subscriptionId, string resource childResourceType, childResourceName); } - } } diff --git a/sdk/network/Azure.ResourceManager.Network/tests/Tests/ApplicationGatewayTests.cs b/sdk/network/Azure.ResourceManager.Network/tests/Tests/ApplicationGatewayTests.cs index 050b332e578d0..cd6fc8537f00c 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Tests/ApplicationGatewayTests.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Tests/ApplicationGatewayTests.cs @@ -335,7 +335,6 @@ private ApplicationGateway CreateApplicationGateway(string location, Subnet subn } } } - } }, RequestRoutingRules = { diff --git a/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/DeploymentTests.InMemory.cs b/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/DeploymentTests.InMemory.cs index a81343917afbc..4648d87ae11d8 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/DeploymentTests.InMemory.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/DeploymentTests.InMemory.cs @@ -665,7 +665,6 @@ public async Task DeploymentTestsCancelThrowsExceptions() } catch (Exception ex) { - Assert.NotNull(ex); } try @@ -674,7 +673,6 @@ public async Task DeploymentTestsCancelThrowsExceptions() } catch (Exception ex) { - Assert.NotNull(ex); } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/FeatureTests.InMemory.cs b/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/FeatureTests.InMemory.cs index ffdbffb0159d4..1659ac8d50d0e 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/FeatureTests.InMemory.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/tests/InMemoryTests/FeatureTests.InMemory.cs @@ -184,7 +184,6 @@ public async Task ListPreviewedFeatures() expectedUrl = expectedUrl.Replace(" ", "%20"); Assert.AreEqual(expectedUrl, request.Uri.ToString()); - } [Test] diff --git a/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/DeploymentScriptsTests.ScenarioTests.cs b/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/DeploymentScriptsTests.ScenarioTests.cs index 39e4c8cc3f24b..42b92292c9805 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/DeploymentScriptsTests.ScenarioTests.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/DeploymentScriptsTests.ScenarioTests.cs @@ -230,7 +230,6 @@ public async Task CanReturnErrorOnScriptExecutionFailure() if (Mode == RecordedTestMode.Record) Thread.Sleep(10*1000); pollCount++; - } while (getDeploymentScript.ProvisioningState != ScriptProvisioningState.Failed); // Validate result diff --git a/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/DeploymentTests.ScenarioTests.cs b/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/DeploymentTests.ScenarioTests.cs index ea4295e71609d..915917e5e600e 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/DeploymentTests.ScenarioTests.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/DeploymentTests.ScenarioTests.cs @@ -178,7 +178,6 @@ public async Task ValidateBadDeployment() { Assert.IsTrue(ex.Message.Contains("InvalidTemplate")); } - } [Test] diff --git a/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/PolicyTests.ScenarioTests.cs b/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/PolicyTests.ScenarioTests.cs index 8d4c3600f96a2..edc9443c678fe 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/PolicyTests.ScenarioTests.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/PolicyTests.ScenarioTests.cs @@ -315,7 +315,6 @@ public async Task CanCrudPolicyAssignment() } catch (Exception ex) { - Assert.NotNull(ex); } listResult = await PolicyAssignmentsOperations.ListAsync().ToEnumerableAsync(); @@ -338,7 +337,6 @@ public async Task CanCrudPolicyAssignment() } catch (Exception ex) { - Assert.NotNull(ex); } listResult = await PolicyAssignmentsOperations.ListAsync().ToEnumerableAsync(); @@ -649,7 +647,6 @@ public async Task ValidatePolicyAssignmentErrorHandling() } catch (Exception ex) { - Assert.NotNull(ex); Assert.IsTrue(ex.Message.ToString().Contains("InvalidRequestContent")); } @@ -668,7 +665,6 @@ public async Task ValidatePolicyAssignmentErrorHandling() } catch (Exception ex) { - Assert.NotNull(ex); Assert.IsTrue(ex.Message.ToString().Contains("PolicyDefinitionNotFound")); } @@ -688,7 +684,6 @@ public async Task ValidatePolicyAssignmentErrorHandling() catch (Exception ex) { - Assert.NotNull(ex); Assert.IsTrue(ex.Message.ToString().Contains("InvalidPolicySku")); } @@ -715,7 +710,6 @@ public async Task ValidatePolicyDefinitionErrorHandling() catch (Exception ex) { - Assert.NotNull(ex); Assert.IsTrue(ex.Message.ToString().Contains("InvalidRequestContent")); } @@ -731,7 +725,6 @@ public async Task ValidatePolicyDefinitionErrorHandling() catch (Exception ex) { - Assert.NotNull(ex); Assert.IsTrue(ex.Message.ToString().Contains("InvalidPolicyDefinitionMode")); } @@ -747,7 +740,6 @@ public async Task ValidatePolicyDefinitionErrorHandling() catch (Exception ex) { - Assert.NotNull(ex); Assert.IsTrue(ex.Message.ToString().Contains("UnusedPolicyParameters")); } @@ -762,7 +754,6 @@ public async Task ValidatePolicyDefinitionErrorHandling() catch (Exception ex) { - Assert.NotNull(ex); StringAssert.Contains("InvalidPolicyParameters", ex.Message); } @@ -793,7 +784,6 @@ public async Task ValidatePolicySetDefinitionErrorHandling() catch (Exception ex) { - Assert.NotNull(ex); Assert.IsTrue(ex.Message.ToString().Contains("policyDefinitions")); } @@ -815,7 +805,6 @@ public async Task ValidatePolicySetDefinitionErrorHandling() catch (Exception ex) { - Assert.NotNull(ex); Assert.IsTrue(ex.Message.ToString().Contains("PolicyDefinitionNotFound")); } @@ -839,7 +828,6 @@ public async Task ValidatePolicySetDefinitionErrorHandling() catch (Exception ex) { - Assert.NotNull(ex); StringAssert.Contains("UnusedPolicyParameters", ex.Message); Assert.IsTrue(ex.Message.ToString().Contains("")); @@ -868,7 +856,6 @@ public async Task ValidatePolicySetDefinitionErrorHandling() catch (Exception ex) { - Assert.NotNull(ex); Assert.IsTrue(ex.Message.ToString().Contains("UndefinedPolicyParameter")); } diff --git a/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/TagTests.ScenarioTests.cs b/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/TagTests.ScenarioTests.cs index 3efa2619dd297..a21e7012abe56 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/TagTests.ScenarioTests.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/tests/ScenarioTests/TagTests.ScenarioTests.cs @@ -155,8 +155,8 @@ private async void UpdateTagsTest(string resourceScope = "") { "tagKey3", "tagValue3" } } }; - - { // test for Merge operation + // test for Merge operation + { var tagPatchRequest = new TagsPatchResource() { Operation = TagsPatchResourceOperation.Merge, Properties = putTags }; var patchResponse =(await TagsOperations.UpdateAtScopeAsync(resourceScope, tagPatchRequest)).Value; @@ -172,8 +172,8 @@ private async void UpdateTagsTest(string resourceScope = "") Assert.AreEqual(patchResponse.Properties.TagsValue.Count(), expectedResponse.Properties.TagsValue.Count()); Assert.IsTrue(this.CompareTagsResource(expectedResponse, patchResponse)); } - - { // test for Replace operation + // test for Replace operation + { var tagPatchRequest = new TagsPatchResource() { Operation = TagsPatchResourceOperation.Replace, Properties = putTags }; var patchResponse = (await TagsOperations.UpdateAtScopeAsync(resourceScope, tagPatchRequest)).Value; @@ -181,8 +181,8 @@ private async void UpdateTagsTest(string resourceScope = "") Assert.AreEqual(patchResponse.Properties.TagsValue.Count(), expectedResponse.Properties.TagsValue.Count()); Assert.IsTrue(this.CompareTagsResource(expectedResponse, patchResponse)); } - - { // test for Delete operation + // test for Delete operation + { var tagPatchRequest = new TagsPatchResource() { Operation = TagsPatchResourceOperation.Delete, Properties = putTags }; var patchResponse = (await TagsOperations.UpdateAtScopeAsync(resourceScope, tagPatchRequest)).Value; Assert.IsEmpty(patchResponse.Properties.TagsValue); diff --git a/sdk/search/Azure.Search.Documents/tests/Batching/BatchingTests.cs b/sdk/search/Azure.Search.Documents/tests/Batching/BatchingTests.cs index b3a22d1e5355b..62943cfca2de5 100644 --- a/sdk/search/Azure.Search.Documents/tests/Batching/BatchingTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/Batching/BatchingTests.cs @@ -166,7 +166,6 @@ private Response ProcessResponse(Response last = facets.ElementAt(3).AsRangeFacetResult(); Assert.AreEqual(null, first.From); Assert.AreEqual(null, last.To); - } [Test] diff --git a/sdk/search/Azure.Search.Documents/tests/Models/Book.cs b/sdk/search/Azure.Search.Documents/tests/Models/Book.cs index 89d3d53c71fec..e1e44addcd305 100644 --- a/sdk/search/Azure.Search.Documents/tests/Models/Book.cs +++ b/sdk/search/Azure.Search.Documents/tests/Models/Book.cs @@ -60,5 +60,4 @@ obj is Author other && public override int GetHashCode() => LastName?.GetHashCode() ?? 0; public override string ToString() => $"{FirstName} {LastName}"; } - } diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Readme.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Readme.cs index a8dcf98fd58ad..fddd05344ccb6 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Readme.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Readme.cs @@ -336,6 +336,5 @@ Response LookupHotel() #endregion Snippet:Azure_Search_Tests_Samples_Readme_Troubleshooting } } - } } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/CreateQueueOptions.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/CreateQueueOptions.cs index 82024276dbb06..0916fba5000d6 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/CreateQueueOptions.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/CreateQueueOptions.cs @@ -238,7 +238,6 @@ public string ForwardTo EntityNameFormatter.CheckValidQueueName(value, nameof(ForwardTo)); if (_name.Equals(value, StringComparison.CurrentCultureIgnoreCase)) - { throw new InvalidOperationException("Entity cannot have auto-forwarding policy to itself"); } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/QueueProperties.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/QueueProperties.cs index 67812d5f7947d..82c7b2b5e052d 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/QueueProperties.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/QueueProperties.cs @@ -229,7 +229,6 @@ public string ForwardTo EntityNameFormatter.CheckValidQueueName(value, nameof(ForwardTo)); if (Name.Equals(value, StringComparison.CurrentCultureIgnoreCase)) - { throw new InvalidOperationException("Entity cannot have auto-forwarding policy to itself"); } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/Rules/SqlRuleFilter.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/Rules/SqlRuleFilter.cs index d9bdb2da3fd65..68f62f1158c2d 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/Rules/SqlRuleFilter.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/Rules/SqlRuleFilter.cs @@ -21,7 +21,6 @@ namespace Azure.Messaging.ServiceBus.Administration /// public class SqlRuleFilter : RuleFilter { - /// /// Initializes a new instance of the class using the specified SQL expression. /// diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/ServiceBusAdministrationClient.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/ServiceBusAdministrationClient.cs index aa1f6f79758ca..41c08692a0e36 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/ServiceBusAdministrationClient.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/ServiceBusAdministrationClient.cs @@ -1609,5 +1609,4 @@ private static string BuildAudienceResource(string fullyQualifiedNamespace) return builder.Uri.AbsoluteUri.ToLowerInvariant(); } } - } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpClient.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpClient.cs index c4aafcaaa28c8..8b1be22f855f9 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpClient.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpClient.cs @@ -91,7 +91,6 @@ internal AmqpClient( { Scheme = options.TransportType.GetUriScheme(), Host = host - }.Uri; Credential = credential; @@ -100,7 +99,6 @@ internal AmqpClient( credential, options.TransportType, options.WebProxy); - } /// diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpConnectionScope.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpConnectionScope.cs index 8586b2ff44804..9a27440bce8b7 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpConnectionScope.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpConnectionScope.cs @@ -293,7 +293,6 @@ public virtual async Task OpenReceiverLinkAsync( await OpenAmqpObjectAsync(link, timeout.CalculateRemaining(stopWatch.GetElapsedTime())).ConfigureAwait(false); cancellationToken.ThrowIfCancellationRequested(); return link; - } /// diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpExceptionHelper.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpExceptionHelper.cs index 6c66205bee20c..8078df03c9ab8 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpExceptionHelper.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpExceptionHelper.cs @@ -67,7 +67,6 @@ public static AmqpResponseStatusCode GetResponseStatusCode(this AmqpMessage resp object statusCodeValue = responseMessage?.ApplicationProperties.Map[ManagementConstants.Response.StatusCode]; if (statusCodeValue is int && Enum.IsDefined(typeof(AmqpResponseStatusCode), statusCodeValue)) { - amqpResponseStatusCode = (AmqpResponseStatusCode)statusCodeValue; } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpReceiver.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpReceiver.cs index d2291adaece9a..ca60ec28bd5a8 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpReceiver.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpReceiver.cs @@ -416,7 +416,6 @@ private async Task DisposeMessagesAsync( var i = 0; foreach (ArraySegment deliveryTag in deliveryTags) { - disposeMessageTasks[i++] = receiveLink.DisposeMessageAsync(deliveryTag, transactionId, outcome, true, timeout); } @@ -826,7 +825,6 @@ public override async Task> PeekMessage int messageCount = 1, CancellationToken cancellationToken = default) { - long seqNumber = sequenceNumber ?? LastPeekedSequenceNumber + 1; IReadOnlyList messages = null; @@ -1257,7 +1255,6 @@ public override async Task CloseAsync(CancellationToken cancellationToken) _receiveLink?.Dispose(); _managementLink?.Dispose(); - } private void OnReceiverLinkClosed(object receiver, EventArgs e) diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpRuleManager.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpRuleManager.cs index ca9001fdcf62c..6373dfb3f8a5c 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpRuleManager.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpRuleManager.cs @@ -305,7 +305,6 @@ public override async Task CloseAsync(CancellationToken cancellationToken) } _managementLink?.Dispose(); - } } } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpSender.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpSender.cs index 23428f0f30b70..aee5e5c6ffa7e 100755 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpSender.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpSender.cs @@ -241,7 +241,6 @@ internal virtual async Task SendBatchInternalAsync( { using (AmqpMessage batchMessage = messageFactory()) { - string messageHash = batchMessage.GetHashCode().ToString(CultureInfo.InvariantCulture); ArraySegment transactionId = AmqpConstants.NullBinary; @@ -406,7 +405,6 @@ internal async Task ScheduleMessageInternalAsync( var sendLink = default(SendingAmqpLink); try { - var request = AmqpRequestMessage.CreateRequest( ManagementConstants.Operations.ScheduleMessageOperation, timeout, @@ -465,7 +463,6 @@ internal async Task ScheduleMessageInternalAsync( } return sequenceNumbers; - } else { diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Client/ServiceBusClient.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Client/ServiceBusClient.cs index 1614bd571e942..255cc3d500b05 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Client/ServiceBusClient.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Client/ServiceBusClient.cs @@ -21,7 +21,6 @@ namespace Azure.Messaging.ServiceBus /// public class ServiceBusClient : IAsyncDisposable { - private readonly ServiceBusClientOptions _options; /// diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusReceivedMessage.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusReceivedMessage.cs index 59e684f268f1c..1ddba3d3dfdf6 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusReceivedMessage.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusReceivedMessage.cs @@ -16,7 +16,6 @@ namespace Azure.Messaging.ServiceBus /// public class ServiceBusReceivedMessage { - /// /// Creates a new message from the specified payload. /// diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusRetryPolicy.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusRetryPolicy.cs index 9e38130fccf73..c86fc1c80b87e 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusRetryPolicy.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusRetryPolicy.cs @@ -26,7 +26,6 @@ namespace Azure.Messaging.ServiceBus /// public abstract class ServiceBusRetryPolicy { - private static readonly TimeSpan ServerBusyBaseSleepTime = TimeSpan.FromSeconds(10); private readonly object serverBusyLock = new object(); diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/StringUtility.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/StringUtility.cs index aada75d91971d..54921e009010f 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/StringUtility.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/StringUtility.cs @@ -9,7 +9,6 @@ namespace Azure.Messaging.ServiceBus.Primitives { internal static class StringUtility { - public static string GetFormattedLockTokens(IEnumerable lockTokens) { var lockTokenBuilder = new StringBuilder(); diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/ServiceBusProcessor.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/ServiceBusProcessor.cs index 5c6fa73ffb510..e0147b5f8af23 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/ServiceBusProcessor.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/ServiceBusProcessor.cs @@ -280,7 +280,6 @@ public event Func ProcessMessageAsync #pragma warning restore CA1065 // Do not raise exceptions in unexpected locations } EnsureNotRunningAndInvoke(() => _processMessageAsync = value); - } remove @@ -315,7 +314,6 @@ internal event Func ProcessSessionMessageA throw new NotSupportedException(Resources.HandlerHasAlreadyBeenAssigned); } EnsureNotRunningAndInvoke(() => _processSessionMessageAsync = value); - } remove @@ -385,7 +383,6 @@ internal event Func SessionInitializingAsync throw new NotSupportedException(Resources.HandlerHasAlreadyBeenAssigned); } EnsureNotRunningAndInvoke(() => _sessionInitializingAsync = value); - } remove @@ -417,7 +414,6 @@ internal event Func SessionClosingAsync throw new NotSupportedException(Resources.HandlerHasAlreadyBeenAssigned); } EnsureNotRunningAndInvoke(() => _sessionClosingAsync = value); - } remove diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/ServiceBusSessionProcessor.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/ServiceBusSessionProcessor.cs index 2ca685d002aad..9840dc342a15c 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/ServiceBusSessionProcessor.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/ServiceBusSessionProcessor.cs @@ -117,7 +117,6 @@ public event Func ProcessMessageAsync add { _innerProcessor.ProcessSessionMessageAsync += value; - } remove @@ -155,7 +154,6 @@ public event Func SessionInitializingAsync add { _innerProcessor.SessionInitializingAsync += value; - } remove diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/RuleManager/ServiceBusRuleManager.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/RuleManager/ServiceBusRuleManager.cs index 23f6de7126048..5be3434d38ef2 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/RuleManager/ServiceBusRuleManager.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/RuleManager/ServiceBusRuleManager.cs @@ -184,7 +184,6 @@ await InnerRuleManager.RemoveRuleAsync( /// Returns a list of rules description public virtual async Task> GetRulesAsync(CancellationToken cancellationToken = default) { - Argument.AssertNotDisposed(IsDisposed, nameof(ServiceBusRuleManager)); cancellationToken.ThrowIfCancellationRequested(); ServiceBusEventSource.Log.GetRuleStart(Identifier); diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/CreateMessageBatchOptions.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/CreateMessageBatchOptions.cs index 6b3298b5f3efd..d8d970aa484bf 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/CreateMessageBatchOptions.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/CreateMessageBatchOptions.cs @@ -6,7 +6,6 @@ namespace Azure.Messaging.ServiceBus { - /// /// The set of options that can be specified to influence the way in which an service bus message batch /// behaves and is sent to the Queue/Topic. diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Administration/ServiceBusManagementClientLiveTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Administration/ServiceBusManagementClientLiveTests.cs index 61fa67bd34d8f..e056a8dd7aa5a 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Administration/ServiceBusManagementClientLiveTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Administration/ServiceBusManagementClientLiveTests.cs @@ -135,7 +135,6 @@ public async Task BasicQueueCrudOperations() else { Assert.AreEqual(getQueue, updatedQueue); - } Response isExistsResponse = await client.QueueExistsAsync(queueName); rawResponse = createdQueueResponse.GetRawResponse(); @@ -203,7 +202,6 @@ public async Task BasicTopicCrudOperations() // when in playback mode. Assert.AreEqual(options, new CreateTopicOptions(createdTopic) { AuthorizationRules = options.AuthorizationRules.Clone() }); Assert.AreEqual(createdTopic, new TopicProperties(options) { AuthorizationRules = createdTopic.AuthorizationRules.Clone() }); - } else { diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Client/ServiceBusClientLiveTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Client/ServiceBusClientLiveTests.cs index 69a8f69593a96..0feffd8aa2d1b 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Client/ServiceBusClientLiveTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Client/ServiceBusClientLiveTests.cs @@ -38,7 +38,6 @@ public async Task ClientCanConnectUsingSharedAccessSignatureConnectionString() { await (receiver?.DisposeAsync() ?? new ValueTask()); } - }, Throws.Nothing); } } @@ -74,7 +73,6 @@ public async Task ClientCanConnectUsingSharedKeyCredentialWithSignature() { await (receiver?.DisposeAsync() ?? new ValueTask()); } - }, Throws.Nothing); } } @@ -108,7 +106,6 @@ public async Task ClientCanConnectUsingSharedKeyCredentialWithSharedKey() { await (receiver?.DisposeAsync() ?? new ValueTask()); } - }, Throws.Nothing); } } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Diagnostics/EventSourceLiveTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Diagnostics/EventSourceLiveTests.cs index 512a1752a80e9..92b31fee00b3d 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Diagnostics/EventSourceLiveTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Diagnostics/EventSourceLiveTests.cs @@ -335,7 +335,6 @@ Task ExceptionHandler(ProcessErrorEventArgs args) _listener.SingleEventById(ServiceBusEventSource.ProcessorMessageHandlerStartEvent); _listener.SingleEventById(ServiceBusEventSource.ProcessorMessageHandlerExceptionEvent); _listener.SingleEventById(ServiceBusEventSource.ProcessorErrorHandlerThrewExceptionEvent); - } } } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Infrastructure/TestException.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Infrastructure/TestException.cs index c53855f1c0b32..6c72e56b28186 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Infrastructure/TestException.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Infrastructure/TestException.cs @@ -7,6 +7,5 @@ namespace Azure.Messaging.ServiceBus.Tests.Infrastructure { public class TestException : Exception { - } } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Plugins/PluginLiveTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Plugins/PluginLiveTests.cs index 994cbfa15546c..287fef1bd2fb4 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Plugins/PluginLiveTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Plugins/PluginLiveTests.cs @@ -116,7 +116,6 @@ public async Task PluginsCanAlterSessionMessage() enablePartitioning: false, enableSession: true)) { - var plugin = new SendReceivePlugin(); var options = new ServiceBusClientOptions(); options.AddPlugin(plugin); @@ -139,7 +138,6 @@ public async Task PluginsCanAlterTopicSessionMessage() enablePartitioning: false, enableSession: true)) { - var plugin = new SendReceivePlugin(); var options = new ServiceBusClientOptions(); options.AddPlugin(plugin); @@ -192,7 +190,6 @@ public async Task PluginsCanAlterMessageUsingSessionProcessor() enablePartitioning: false, enableSession: true)) { - var plugin = new SendReceivePlugin(); var options = new ServiceBusClientOptions(); options.AddPlugin(plugin); diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Processor/ProcessorLiveTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Processor/ProcessorLiveTests.cs index 9b372892908b7..914da2130ce67 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Processor/ProcessorLiveTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Processor/ProcessorLiveTests.cs @@ -68,7 +68,6 @@ async Task ProcessMessage(ProcessMessageEventArgs args) } finally { - var setIndex = Interlocked.Increment(ref completionSourceIndex); if (setIndex < numThreads) { @@ -151,7 +150,6 @@ async Task ProcessMessage(ProcessMessageEventArgs args) } finally { - var setIndex = Interlocked.Increment(ref completionSourceIndex); if (setIndex < numThreads) { diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Processor/SessionProcessorLiveTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Processor/SessionProcessorLiveTests.cs index 522f29f7b23eb..413565ce8035b 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Processor/SessionProcessorLiveTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Processor/SessionProcessorLiveTests.cs @@ -181,7 +181,6 @@ async Task ProcessMessage(ProcessSessionMessageEventArgs args) Assert.AreEqual(numThreads, sessionOpenEventCt); Assert.AreEqual(sessionOpenEventCt, sessionCloseEventCt); - } } @@ -1330,7 +1329,6 @@ async Task SessionErrorHandler(ProcessErrorEventArgs eventArgs) } finally { - if (eventArgs.ErrorSource != ServiceBusErrorSource.CloseSession) { if (errorSource != ServiceBusErrorSource.Abandon || @@ -1464,7 +1462,6 @@ async Task ProcessMessage(ProcessSessionMessageEventArgs args) Assert.IsTrue(sessionId.Contains(message.SessionId)); Assert.IsTrue(sessionId.Contains(args.SessionId)); Assert.IsNotNull(args.SessionLockedUntil); - } finally { diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Sender/SenderLiveTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Sender/SenderLiveTests.cs index 39a04ed563a99..a6731a0ac4388 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Sender/SenderLiveTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Sender/SenderLiveTests.cs @@ -438,7 +438,6 @@ public async Task CanSendReceivedMessage() } } Assert.AreEqual(0, remainingMessages); - } } diff --git a/sdk/storage/Azure.Storage.Blobs.Batch/src/BatchErrors.cs b/sdk/storage/Azure.Storage.Blobs.Batch/src/BatchErrors.cs index 73161653b61d5..f504cecf5f8ae 100644 --- a/sdk/storage/Azure.Storage.Blobs.Batch/src/BatchErrors.cs +++ b/sdk/storage/Azure.Storage.Blobs.Batch/src/BatchErrors.cs @@ -49,6 +49,5 @@ public static InvalidOperationException InvalidHttpHeaderLine(string headerLine) public static RequestFailedException InvalidResponse(ClientDiagnostics clientDiagnostics, Response response, Exception innerException) => clientDiagnostics.CreateRequestFailedExceptionWithContent(response, message: "Invalid response", innerException: innerException); - } } diff --git a/sdk/storage/Azure.Storage.Blobs.Batch/src/Shared/HeaderUtilities.cs b/sdk/storage/Azure.Storage.Blobs.Batch/src/Shared/HeaderUtilities.cs index 40d39ec120b01..13ef6ea54a8b1 100644 --- a/sdk/storage/Azure.Storage.Blobs.Batch/src/Shared/HeaderUtilities.cs +++ b/sdk/storage/Azure.Storage.Blobs.Batch/src/Shared/HeaderUtilities.cs @@ -74,7 +74,6 @@ internal static void SetQuality(IList parameters, double? // Note that the RFC requires decimal '.' regardless of the culture. I.e. using ',' as decimal // separator is considered invalid (even if the current culture would allow it). if (TryParseQualityDouble(qualityParameter.Value, 0, out var qualityValue, out var length)) - { return qualityValue; } diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChangeFeedTestBase.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChangeFeedTestBase.cs index de5dcd6995f8a..d1136d5daa4da 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChangeFeedTestBase.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChangeFeedTestBase.cs @@ -14,7 +14,6 @@ namespace Azure.Storage.Blobs.ChangeFeed.Tests { public class ChangeFeedTestBase : StorageTestBase { - public ChangeFeedTestBase(bool async) : this(async, null) { } public ChangeFeedTestBase(bool async, RecordedTestMode? mode = null) @@ -63,7 +62,6 @@ public async Task GetTestContainerAsync( PublicAccessType? publicAccessType = default, bool premium = default) { - containerName ??= GetNewContainerName(); service ??= GetServiceClient_SharedKey(); diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChangeFeedTests.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChangeFeedTests.cs index be17cc0431fde..04c57368a4d1e 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChangeFeedTests.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChangeFeedTests.cs @@ -979,7 +979,6 @@ public async Task NoSegmentsRemainingInStartYear() default)); containerClient.Verify(r => r.Uri, Times.Exactly(1)); - } public static Task> GetYearsPathShortFuncAsync(string continuation, int? pageSizeHint) diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ShardTests.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ShardTests.cs index 96328a204f85e..11a591ed12495 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ShardTests.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ShardTests.cs @@ -503,7 +503,6 @@ public async Task Next() for (int i = 0; i < chunkCount; i++) { - chunks[$"chunk{2 + i}"].SetupSequence(r => r.Next( It.IsAny(), default)) diff --git a/sdk/storage/Azure.Storage.Blobs/samples/Sample01a_HelloWorld.cs b/sdk/storage/Azure.Storage.Blobs/samples/Sample01a_HelloWorld.cs index f294962407d64..8cf0bf653c423 100644 --- a/sdk/storage/Azure.Storage.Blobs/samples/Sample01a_HelloWorld.cs +++ b/sdk/storage/Azure.Storage.Blobs/samples/Sample01a_HelloWorld.cs @@ -193,7 +193,6 @@ public void Errors() catch (RequestFailedException ex) when (ex.ErrorCode == BlobErrorCode.ContainerBeingDeleted || ex.ErrorCode == BlobErrorCode.ContainerNotFound) - { // Ignore any errors if the container being deleted or if it has already been deleted } diff --git a/sdk/storage/Azure.Storage.Blobs/src/BlobBaseClient.cs b/sdk/storage/Azure.Storage.Blobs/src/BlobBaseClient.cs index 2cfb4af6e9243..04cd864ca5969 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/BlobBaseClient.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/BlobBaseClient.cs @@ -2734,7 +2734,6 @@ internal async Task> DeleteIfExistsInternal( catch (RequestFailedException storageRequestFailedException) when (storageRequestFailedException.ErrorCode == BlobErrorCode.BlobNotFound || storageRequestFailedException.ErrorCode == BlobErrorCode.ContainerNotFound) - { return Response.FromValue(false, default); } diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/AppendBlobOpenWriteOptions.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/AppendBlobOpenWriteOptions.cs index 4053d5a1483e9..85c99ef6e6748 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Models/AppendBlobOpenWriteOptions.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Models/AppendBlobOpenWriteOptions.cs @@ -27,6 +27,5 @@ public class AppendBlobOpenWriteOptions /// progress updates about data transfers. /// public IProgress ProgressHandler { get; set; } - } } diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryJsonTextOptions.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryJsonTextOptions.cs index 32c7170c0b1ea..bd32f9e1d60fa 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryJsonTextOptions.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryJsonTextOptions.cs @@ -12,7 +12,6 @@ namespace Azure.Storage.Blobs.Models /// public class BlobQueryJsonTextOptions : BlobQueryTextOptions { - /// /// Record Separator. /// diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/GetBlobContainersAsyncCollection.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/GetBlobContainersAsyncCollection.cs index bc039c97bbbc0..73c49336243fa 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Models/GetBlobContainersAsyncCollection.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Models/GetBlobContainersAsyncCollection.cs @@ -38,7 +38,6 @@ public override async ValueTask> GetNextPageAsync( bool async, CancellationToken cancellationToken) { - Response response = await _client.GetBlobContainersInternal( continuationToken, _traits, diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/ObjectReplicationPolicy.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/ObjectReplicationPolicy.cs index 9ec6d09cc20c8..62e29fecb1550 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Models/ObjectReplicationPolicy.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Models/ObjectReplicationPolicy.cs @@ -26,6 +26,5 @@ internal ObjectReplicationPolicy() { } /// the Policy ID. /// public IList Rules { get; internal set; } - } } diff --git a/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobAccountSasPermissions.cs b/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobAccountSasPermissions.cs index 301c56fee9342..e36b0b84f6432 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobAccountSasPermissions.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobAccountSasPermissions.cs @@ -60,7 +60,6 @@ namespace Azure.Storage.Blobs /// internal static partial class BlobExtensions { - /// /// Create a permissions string to provide /// . diff --git a/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobContainerSasPermissions.cs b/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobContainerSasPermissions.cs index eb4ee3fe9cc8b..25bc88952bd17 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobContainerSasPermissions.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobContainerSasPermissions.cs @@ -80,7 +80,6 @@ namespace Azure.Storage.Blobs /// internal static partial class BlobExtensions { - /// /// Create a permissions string to provide /// . diff --git a/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobSasPermissions.cs b/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobSasPermissions.cs index d19a92e61cb0a..1f6d6d61a5440 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobSasPermissions.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobSasPermissions.cs @@ -80,7 +80,6 @@ namespace Azure.Storage.Blobs /// internal static partial class BlobExtensions { - /// /// Create a permissions string to provide /// . diff --git a/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobVersionSasPermissions.cs b/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobVersionSasPermissions.cs index 0c449e7a31345..053559a4b2b7c 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobVersionSasPermissions.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobVersionSasPermissions.cs @@ -36,7 +36,6 @@ namespace Azure.Storage.Blobs /// internal static partial class BlobExtensions { - /// /// Create a permissions string to provide /// . diff --git a/sdk/storage/Azure.Storage.Blobs/src/Sas/SnapshotSasPermissions.cs b/sdk/storage/Azure.Storage.Blobs/src/Sas/SnapshotSasPermissions.cs index 7a28288b8dd41..411361b769ce2 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Sas/SnapshotSasPermissions.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Sas/SnapshotSasPermissions.cs @@ -45,7 +45,6 @@ namespace Azure.Storage.Blobs /// internal static partial class BlobExtensions { - /// /// Create a permissions string to provide /// . diff --git a/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs index 5e690416464e2..6ae8ed2c3d8db 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs @@ -299,7 +299,6 @@ public async Task CreateAsync_EncryptionScope() public async Task CreateAsync_Headers() #pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously { - } [Test] diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs index 526cba598230d..25e445a932319 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs @@ -1278,7 +1278,6 @@ await blobClient.UploadAsync(stream, // Act for (int i = 0; i < length / readSize; i++) { - await outputStream.ReadAsync(actualData, 0, readSize); for (int j = 0; j < readSize; j++) { @@ -1689,7 +1688,6 @@ await TestHelper.AssertExpectedExceptionAsync( source: srcBlob.Uri, options), e => { }); - } } @@ -1801,7 +1799,6 @@ public async Task StartCopyFromUriAsync_Destination_AccessConditions() // Assert Assert.IsNotNull(response.GetRawResponse().Headers.RequestId); - } } @@ -1841,7 +1838,6 @@ await TestHelper.AssertExpectedExceptionAsync( source: srcBlob.Uri, options), e => { }); - } } @@ -1992,7 +1988,6 @@ public async Task StartCopyFromUriAsync_Error() await TestHelper.AssertExpectedExceptionAsync( destBlob.StartCopyFromUriAsync(srcBlob.Uri), e => Assert.AreEqual("BlobNotFound", e.ErrorCode)); - } [Test] @@ -2047,7 +2042,6 @@ public async Task StartCopyFromUriAsync_RehydratePriority() // Assert Assert.AreEqual("rehydrate-pending-to-cool", propertiesResponse.Value.ArchiveStatus); - } [Test] @@ -2069,7 +2063,6 @@ await TestHelper.AssertExpectedExceptionAsync( srcBlob.Uri, options), e => Assert.AreEqual(BlobErrorCode.InvalidHeaderValue.ToString(), e.ErrorCode)); - } [Test] @@ -2117,7 +2110,6 @@ public async Task AbortCopyFromUriAsync() BlobServiceClient secondaryService = GetServiceClient_SecondaryAccount_SharedKey(); await using DisposingContainer destTest = await GetTestContainerAsync(service: secondaryService); - { BlockBlobClient destBlob = InstrumentClient(destTest.Container.GetBlockBlobClient(GetNewBlobName())); @@ -2135,7 +2127,6 @@ public async Task AbortCopyFromUriAsync() { WarnCopyCompletedTooQuickly(); } - } } @@ -2187,7 +2178,6 @@ public async Task AbortCopyFromUriAsync_Lease() { WarnCopyCompletedTooQuickly(); } - } [Test] @@ -2245,7 +2235,6 @@ await TestHelper.AssertExpectedExceptionAsync( { WarnCopyCompletedTooQuickly(); } - } [Test] @@ -2435,7 +2424,6 @@ public async Task SyncCopyFromUriAsync_Destination_AccessConditions() // Assert Assert.IsNotNull(response.GetRawResponse().Headers.RequestId); - } } @@ -3161,7 +3149,6 @@ public async Task UndeleteAsync_Error() await TestHelper.AssertExpectedExceptionAsync( blob.UndeleteAsync(), e => Assert.AreEqual("BlobNotFound", e.ErrorCode)); - } [Test] @@ -3353,7 +3340,6 @@ public async Task GetPropertiesAsync_ContainerSAS() TestHelper.AssertCacheableProperty(accountName, () => blob.AccountName); TestHelper.AssertCacheableProperty(containerName, () => blob.BlobContainerName); TestHelper.AssertCacheableProperty(blobName, () => blob.Name); - } [Test] @@ -3550,7 +3536,6 @@ public async Task GetPropertiesAsync_BlobIdentitySAS() // Assert Assert.IsNotNull(response.GetRawResponse().Headers.RequestId); - } [Test] @@ -3699,7 +3684,6 @@ public async Task GetPropertiesAsync_AccessConditions() // Assert Assert.IsNotNull(response.GetRawResponse().Headers.RequestId); - } } @@ -4181,7 +4165,6 @@ public async Task CreateSnapshotAsync() // Assert Assert.IsNotNull(response.GetRawResponse().Headers.RequestId); - } [Test] @@ -4239,7 +4222,6 @@ public async Task CreateSnapshotAsync_AccessConditions() // Assert Assert.IsNotNull(response.GetRawResponse().Headers.RequestId); - } } @@ -4260,7 +4242,6 @@ public async Task CreateSnapshotAsync_AccessConditionsFail() await TestHelper.AssertExpectedExceptionAsync( blob.CreateSnapshotAsync(conditions: accessConditions), e => { }); - } } @@ -4335,7 +4316,6 @@ public async Task CreateSnapshotAsync_Version() // Assert Assert.IsNotNull(response.Value.VersionId); - } [Test] diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs index ff3f1a7f8ef25..86c48143f2a7c 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs @@ -314,7 +314,6 @@ public async Task UploadAsync_File() File.SetAttributes(path, FileAttributes.ReadOnly); await blob.UploadAsync(path); - } finally { @@ -364,7 +363,6 @@ public async Task UploadAsync_File_Tags() // Act await blob.UploadAsync(path, options); - } finally { diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobTestBase.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobTestBase.cs index 0b711babebab8..0921f7ec9ae70 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobTestBase.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobTestBase.cs @@ -272,7 +272,6 @@ public async Task GetTestContainerAsync( PublicAccessType? publicAccessType = default, bool premium = default) { - containerName ??= GetNewContainerName(); service ??= GetServiceClient_SharedKey(); diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlockBlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlockBlobClientTests.cs index f960aef429f98..6a786a8ce99da 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlockBlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlockBlobClientTests.cs @@ -623,7 +623,6 @@ await RetryAsync( ToBase64(GetNewBlockName()), sourceContentHash: MD5.Create().ComputeHash(data)), _retryStageBlockFromUri); - } [Test] diff --git a/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs index f20700db4b678..72b5ec91e1b10 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs @@ -3028,7 +3028,6 @@ private BlobRequestConditions BuildContainerAccessConditions( bool ifUnmodifiedSince, bool lease) { - var accessConditions = new BlobRequestConditions { IfModifiedSince = parameters.IfModifiedSince }; if (ifUnmodifiedSince) { diff --git a/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs index 1502e1a060348..75e0b6ed6418e 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs @@ -1023,7 +1023,6 @@ public async Task GetPageRangesAsync() using (var stream = new MemoryStream(data)) { await blob.UploadPagesAsync(stream, 0); - } using (var stream = new MemoryStream(data)) { @@ -1056,7 +1055,6 @@ public async Task GetPageRangesAsync_Clear() using (var stream = new MemoryStream(data)) { await blob.UploadPagesAsync(stream, 0); - } using (var stream = new MemoryStream(data)) { @@ -1178,7 +1176,6 @@ public async Task GetPageRangesAsync_IfTags() using (var stream = new MemoryStream(data)) { await blob.UploadPagesAsync(stream, 0); - } using (var stream = new MemoryStream(data)) { @@ -1721,7 +1718,6 @@ public async Task ResizeAsync() // Assert Response response = await blob.GetPropertiesAsync(); Assert.AreEqual(newSize, response.Value.ContentLength); - } [Test] @@ -1780,7 +1776,6 @@ await TestHelper.AssertExpectedExceptionAsync( Assert.AreEqual("The value for one of the HTTP headers is not in the correct format.", e.Message.Split('\n')[0]); }); - } [Test] @@ -1809,7 +1804,6 @@ public async Task ResizeAsync_AccessConditions() // Assert Assert.IsNotNull(response.GetRawResponse().Headers.RequestId); - } } @@ -1838,7 +1832,6 @@ await TestHelper.AssertExpectedExceptionAsync( size: newSize, conditions: accessConditions), e => Assert.IsTrue(true)); - } } @@ -1909,7 +1902,6 @@ await blob.UpdateSequenceNumberAsync( // Assert Response response = await blob.GetPropertiesAsync(); Assert.AreEqual(sequenceAccessNumber, response.Value.BlobSequenceNumber); - } [Test] @@ -1968,7 +1960,6 @@ await TestHelper.AssertExpectedExceptionAsync( sequenceNumber: sequenceAccessNumber, conditions: accessConditions), e => Assert.IsTrue(true)); - } } @@ -2171,7 +2162,6 @@ public async Task StartCopyIncrementalAsync_AccessConditions() // Assert Assert.IsNotNull(response.GetRawResponse().Headers.RequestId); - } } @@ -2231,7 +2221,6 @@ await TestHelper.AssertExpectedExceptionAsync( snapshot: snapshot, conditions: accessConditions), e => Assert.IsTrue(true)); - } } diff --git a/sdk/storage/Azure.Storage.Blobs/tests/PartitionedUploaderTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/PartitionedUploaderTests.cs index 54bfac07e17ab..146a22a213b6a 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/PartitionedUploaderTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/PartitionedUploaderTests.cs @@ -58,7 +58,6 @@ public async Task UploadsStreamInBlocksIfLengthNotAvailable() Assert.AreEqual(2, testPool.TotalRents); // while conceptually there is one rental, the second rental occurs upon checking for stream end on a Read() call Assert.AreEqual(0, testPool.CurrentCount); AssertStaged(sink, content); - } [Test] diff --git a/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs index 9cd0c8df4e764..65a1ff614f57d 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs @@ -233,7 +233,6 @@ public async Task ListContainersSegmentAsync_MaxResults() // Assert Assert.AreEqual(1, page.Values.Count()); - } [Test] diff --git a/sdk/storage/Azure.Storage.Common/src/Shared/Errors.cs b/sdk/storage/Azure.Storage.Common/src/Shared/Errors.cs index dc0e1544369f0..02339975dfd12 100644 --- a/sdk/storage/Azure.Storage.Common/src/Shared/Errors.cs +++ b/sdk/storage/Azure.Storage.Common/src/Shared/Errors.cs @@ -7,7 +7,6 @@ namespace Azure.Storage { - /// /// Create exceptions for common error cases. /// diff --git a/sdk/storage/Azure.Storage.Common/src/Shared/LazyLoadingReadOnlyStream.cs b/sdk/storage/Azure.Storage.Common/src/Shared/LazyLoadingReadOnlyStream.cs index c61e00342ce0d..a221836e2be5d 100644 --- a/sdk/storage/Azure.Storage.Common/src/Shared/LazyLoadingReadOnlyStream.cs +++ b/sdk/storage/Azure.Storage.Common/src/Shared/LazyLoadingReadOnlyStream.cs @@ -139,7 +139,6 @@ public async Task ReadInternal(byte[] buffer, int offset, int count, bool a { return 0; } - } if (_bufferPosition == 0 || _bufferPosition == _bufferLength || _bufferInvalidated) @@ -347,7 +346,6 @@ public override long Seek(long offset, SeekOrigin origin) long beginningOfBuffer = _position - _bufferPosition; if (newPosition < _position && newPosition > beginningOfBuffer) { - _bufferPosition = (int)(newPosition - beginningOfBuffer); _position = newPosition; return newPosition; diff --git a/sdk/storage/Azure.Storage.Common/src/Shared/StorageConnectionString.cs b/sdk/storage/Azure.Storage.Common/src/Shared/StorageConnectionString.cs index 185f6716005ef..7c5c074b8170b 100644 --- a/sdk/storage/Azure.Storage.Common/src/Shared/StorageConnectionString.cs +++ b/sdk/storage/Azure.Storage.Common/src/Shared/StorageConnectionString.cs @@ -237,7 +237,6 @@ public static StorageConnectionString DevelopmentStorageAccount /// A object constructed from the values provided in the connection string. public static StorageConnectionString Parse(string connectionString) { - if (string.IsNullOrEmpty(connectionString)) { throw Errors.ArgumentNull(nameof(connectionString)); @@ -391,7 +390,6 @@ string settingOrDefault(string key) AllRequired(s_useDevelopmentStorageSetting), Optional(s_developmentStorageProxyUriSetting))) { - accountInformation = settings.TryGetValue(Constants.ConnectionStrings.DevelopmentProxyUriSetting, out var proxyUri) ? GetDevelopmentStorageAccount(new Uri(proxyUri)) @@ -814,7 +812,6 @@ private static bool MatchesSpecification( /// The StorageCredentials object specified in the settings. private static object GetCredentials(IDictionary settings) { - settings.TryGetValue(Constants.ConnectionStrings.AccountNameSetting, out var accountName); settings.TryGetValue(Constants.ConnectionStrings.AccountKeySetting, out var accountKey); settings.TryGetValue(Constants.ConnectionStrings.SharedAccessSignatureSetting, out var sharedAccessSignature); diff --git a/sdk/storage/Azure.Storage.Common/src/Shared/StorageWriteStream.cs b/sdk/storage/Azure.Storage.Common/src/Shared/StorageWriteStream.cs index 4fa4c7a95314f..0f8228a5bf6b5 100644 --- a/sdk/storage/Azure.Storage.Common/src/Shared/StorageWriteStream.cs +++ b/sdk/storage/Azure.Storage.Common/src/Shared/StorageWriteStream.cs @@ -141,7 +141,6 @@ await WriteToBufferInternal( { await AppendInternal(async, cancellationToken).ConfigureAwait(false); } - } } } diff --git a/sdk/storage/Azure.Storage.Common/tests/GeoRedundantReadPolicyTests.cs b/sdk/storage/Azure.Storage.Common/tests/GeoRedundantReadPolicyTests.cs index c5f17ed3c05da..6a8d97a92c846 100644 --- a/sdk/storage/Azure.Storage.Common/tests/GeoRedundantReadPolicyTests.cs +++ b/sdk/storage/Azure.Storage.Common/tests/GeoRedundantReadPolicyTests.cs @@ -143,6 +143,5 @@ private MockRequest CreateMockRequest(Uri uri) mockRequest.Method = RequestMethod.Get; return mockRequest; } - } } diff --git a/sdk/storage/Azure.Storage.Common/tests/Shared/StorageRecordMatcher.cs b/sdk/storage/Azure.Storage.Common/tests/Shared/StorageRecordMatcher.cs index 1f430f25ae907..1627da98675a1 100644 --- a/sdk/storage/Azure.Storage.Common/tests/Shared/StorageRecordMatcher.cs +++ b/sdk/storage/Azure.Storage.Common/tests/Shared/StorageRecordMatcher.cs @@ -156,7 +156,6 @@ private static bool AreSimilar(object a, object b) // can't analyze them default: return false; - } } @@ -330,7 +329,6 @@ static object Parse(JsonElement element) case JsonValueKind.Null: default: return null; - } } } diff --git a/sdk/storage/Azure.Storage.Common/tests/Shared/TestExtensions.cs b/sdk/storage/Azure.Storage.Common/tests/Shared/TestExtensions.cs index ae5ade71a5cd1..2fe727db4c185 100644 --- a/sdk/storage/Azure.Storage.Common/tests/Shared/TestExtensions.cs +++ b/sdk/storage/Azure.Storage.Common/tests/Shared/TestExtensions.cs @@ -118,7 +118,6 @@ internal static StorageConnectionString CreateStorageConnectionString( { throw Errors.AccountMismatch(sharedKeyCredentials.AccountName, accountName); } - } if (accountName == default) @@ -250,7 +249,6 @@ internal static byte[] GetAccountKey(this StorageSharedKeyCredential credential) PropertyInfo prop = type.GetProperty("AccountKeyValue", BindingFlags.NonPublic | BindingFlags.Instance); var val = prop.GetValue(credential); return val as byte[]; - } } } diff --git a/sdk/storage/Azure.Storage.Common/tests/StorageConnectionStringTests.cs b/sdk/storage/Azure.Storage.Common/tests/StorageConnectionStringTests.cs index e107511237864..3dec092241573 100644 --- a/sdk/storage/Azure.Storage.Common/tests/StorageConnectionStringTests.cs +++ b/sdk/storage/Azure.Storage.Common/tests/StorageConnectionStringTests.cs @@ -628,7 +628,6 @@ public void TryParseNullEmpty() [Description("Custom endpoints")] public void DefaultEndpointOverride() { - Assert.IsTrue(StorageConnectionString.TryParse("DefaultEndpointsProtocol=http;BlobEndpoint=http://customdomain.com/;AccountName=asdf;AccountKey=123=", out StorageConnectionString account)); Assert.AreEqual(new Uri("http://customdomain.com/"), account.BlobEndpoint); Assert.IsNull(account.BlobStorageUri.SecondaryUri); @@ -706,5 +705,4 @@ public void ExportKey() TestHelper.AssertSequenceEqual(expectedKeyBytes, keyBytes); } } - } diff --git a/sdk/storage/Azure.Storage.Common/tests/StorageWriteStreamTests.cs b/sdk/storage/Azure.Storage.Common/tests/StorageWriteStreamTests.cs index 038e20cdbc207..98e6580275f45 100644 --- a/sdk/storage/Azure.Storage.Common/tests/StorageWriteStreamTests.cs +++ b/sdk/storage/Azure.Storage.Common/tests/StorageWriteStreamTests.cs @@ -260,7 +260,6 @@ protected override Task AppendInternal(bool async, CancellationToken cancellatio protected override Task FlushInternal(bool async, CancellationToken cancellationToken) { - ApiCalls.Add(s_flush); return Task.CompletedTask; } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeDirectoryClient.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeDirectoryClient.cs index dd2acfa2dcf43..b4f42b4de9224 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeDirectoryClient.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeDirectoryClient.cs @@ -1216,7 +1216,6 @@ public override Response SetPermissions( { scope.Dispose(); } - } /// diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileClient.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileClient.cs index 4f46baa0a7e47..99c8e0049d9dd 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileClient.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileClient.cs @@ -1203,7 +1203,6 @@ public override Response SetPermissions( { scope.Dispose(); } - } /// @@ -3547,7 +3546,6 @@ private async Task> ScheduleDeletionInternal( $"{nameof(options.ExpiresOn)}: {options.ExpiresOn}"); try { - PathExpiryOptions blobExpiryOptions; string expiresOn = null; diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakePathClient.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakePathClient.cs index b973c42e1ef54..24b65a1846de7 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakePathClient.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakePathClient.cs @@ -789,7 +789,6 @@ internal virtual async Task> CreateInternal( $"{nameof(umask)}: {umask}\n"); try { - Response createResponse = await DataLakeRestClient.Path.CreateAsync( clientDiagnostics: _clientDiagnostics, pipeline: Pipeline, @@ -2616,7 +2615,6 @@ await DataLakeRestClient.Path.SetAccessControlRecursiveAsync( } } batchesCount++; - } while (!string.IsNullOrEmpty(continuationToken) && (!options.MaxBatches.HasValue || batchesCount < options.MaxBatches.Value)); @@ -2725,7 +2723,6 @@ public virtual Response SetPermissions( { scope.Dispose(); } - } /// diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeQueryErrorHandler.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeQueryErrorHandler.cs index 22fcb8bfc2877..24139d94f5b93 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeQueryErrorHandler.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeQueryErrorHandler.cs @@ -19,6 +19,5 @@ public DataLakeQueryErrorHandler(Action errorHandler) public void Handle(BlobQueryError blobQueryError) => _errorHandler(blobQueryError.ToDataLakeQueryError()); - } } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeServiceClient.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeServiceClient.cs index 17ff5416704ff..69275377ae8e5 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeServiceClient.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeServiceClient.cs @@ -242,7 +242,6 @@ internal DataLakeServiceClient( StorageSharedKeyCredential storageSharedKeyCredential) : this(serviceUri, authentication, options, null, storageSharedKeyCredential) { - } /// diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeUriBuilder.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeUriBuilder.cs index 3fee9f86cf213..5c4a0234885ac 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeUriBuilder.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeUriBuilder.cs @@ -232,7 +232,6 @@ public DataLakeUriBuilder(Uri uri) { DirectoryOrFilePath = directoryOrFilePath.UnescapePath(); } - } } @@ -317,7 +316,6 @@ internal Uri ToDfsUri() 4); Host = stringBuilder.ToString(); } - } return ToUri(); diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/ErrorExtensions.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/ErrorExtensions.cs index 2bda4727a06a1..72f89b7131dfc 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/ErrorExtensions.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/ErrorExtensions.cs @@ -63,6 +63,5 @@ internal static Exception CreateException(this string body, ClientDiagnostics cl innerException: new Exception()); } } - } } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/Models/PathCreateInfo.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/Models/PathCreateInfo.cs index c22475ef50661..8fc353682148f 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/Models/PathCreateInfo.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/Models/PathCreateInfo.cs @@ -30,6 +30,5 @@ public class PathCreateInfo /// You can use DataLakeModelFactory.PathCreateInfo instead. /// internal PathCreateInfo() { } - } } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/Models/PublicAccessType.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/Models/PublicAccessType.cs index 60ee3a2da3de9..d90014a2f04cc 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/Models/PublicAccessType.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/Models/PublicAccessType.cs @@ -3,7 +3,6 @@ namespace Azure.Storage.Files.DataLake.Models { - /// /// Specifies whether data in the file system may be accessed publicly and the level of access /// diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/Sas/DataLakeAccountSasPermissions.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/Sas/DataLakeAccountSasPermissions.cs index 3071435fdf454..619e70ccf850c 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/Sas/DataLakeAccountSasPermissions.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/Sas/DataLakeAccountSasPermissions.cs @@ -60,7 +60,6 @@ namespace Azure.Storage.Files.DataLake /// internal static partial class DataLakeExtensions { - /// /// Create a permissions string to provide /// . diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/Sas/DataLakeSasPermissions.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/Sas/DataLakeSasPermissions.cs index 989841416d72e..0e300b98d75c4 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/Sas/DataLakeSasPermissions.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/Sas/DataLakeSasPermissions.cs @@ -81,7 +81,6 @@ namespace Azure.Storage.Files.DataLake /// internal static partial class DataLakeExtensions { - /// /// Create a permissions string to provide /// . diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs index 9f3d4fab7b776..8113c844fa0cb 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs @@ -142,7 +142,6 @@ public async Task CreateAsync() // Assert AssertValidStoragePathInfo(response.Value); - } [Test] @@ -1277,7 +1276,6 @@ public async Task GetPropertiesAsync_FileSystemIdentitySAS() // Assert Assert.IsNotNull(response.GetRawResponse().Headers.RequestId); AssertSasUserDelegationKey(identitySasFile.Uri, userDelegationKey); - } [Test] @@ -1671,7 +1669,6 @@ public async Task AppendDataAsync_ProgressReporting() Assert.IsFalse(progress.List.Count == 0); Assert.AreEqual(Size, progress.List[progress.List.Count - 1]); - } [Test] @@ -2100,7 +2097,6 @@ public async Task ReadAsync_RangeGetContentHash() // Assert Assert.IsNotNull(response.Value.ContentHash); - } [Test] @@ -3643,7 +3639,6 @@ await TestHelper.AssertExpectedExceptionAsync( query, options: options), e => Assert.AreEqual($"{nameof(DataLakeQueryArrowOptions)} can only be used for output serialization.", e.Message)); - } private Stream CreateDataStream(long size) @@ -4092,7 +4087,6 @@ await file.UploadAsync(stream, // Act for (int i = 0; i < length / readSize; i++) { - await outputStream.ReadAsync(actualData, 0, readSize); for (int j = 0; j < readSize; j++) { @@ -4416,7 +4410,6 @@ public async Task OpenWriteAsync_NewFile_WithUsing() overwrite: false, options)) { - await stream.WriteAsync(data, 0, 512); await stream.WriteAsync(data, 512, 1024); await stream.WriteAsync(data, 1536, 2048); diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs index a4902021eac79..64af4bdecd96e 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs @@ -2206,7 +2206,6 @@ private DataLakeRequestConditions BuildFileSystemConditions( bool ifUnmodifiedSince, bool lease) { - DataLakeRequestConditions conditions = new DataLakeRequestConditions() { IfModifiedSince = parameters.IfModifiedSince diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/PathAccessControlExtensionsTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/PathAccessControlExtensionsTests.cs index eeafddf99552d..9e1bde8f70b27 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/PathAccessControlExtensionsTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/PathAccessControlExtensionsTests.cs @@ -11,7 +11,6 @@ namespace Azure.Storage.Files.DataLake.Tests { public class PathAccessControlExtensionsTests : PathAccessControlTestBase { - [Test] public void ParseOctal() { diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/PathPermissionsTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/PathPermissionsTests.cs index a8566a37cdabc..15527f935644d 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/PathPermissionsTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/PathPermissionsTests.cs @@ -44,7 +44,6 @@ public void ParseOctalPermissions_invalid() [Test] public void ParseSymbolicPermissions() { - AssertPathPermissionsEquality(new PathPermissions( owner: AllPermissions, group: AllPermissions, diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Models/FileSmbProperties.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Models/FileSmbProperties.cs index a537d9c4ce487..bbc0d1e6a104a 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Models/FileSmbProperties.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Models/FileSmbProperties.cs @@ -68,7 +68,6 @@ internal FileSmbProperties(RawStorageFileInfo rawStorageFileInfo) FileChangedOn = rawStorageFileInfo.FileChangeTime; FileId = rawStorageFileInfo.FileId; ParentId = rawStorageFileInfo.FileParentId; - } internal FileSmbProperties(RawStorageFileProperties rawStorageFileProperties) diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareStatistics.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareStatistics.cs index 95d2be28ca81f..eb7b9324a41d0 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareStatistics.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareStatistics.cs @@ -15,7 +15,6 @@ namespace Azure.Storage.Files.Shares.Models /// public partial class ShareStatistics { - /// /// Warning: ShareUsageBytes may exceed int.MaxValue. Use ShareUsageInBytes instead. /// diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Sas/ShareAccountSasPermissions.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Sas/ShareAccountSasPermissions.cs index 5415bf1ed640a..47bdbceb49118 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Sas/ShareAccountSasPermissions.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Sas/ShareAccountSasPermissions.cs @@ -60,7 +60,6 @@ namespace Azure.Storage.Files.Shares /// internal static partial class ShareExtensions { - /// /// Create a permissions string to provide /// . diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Sas/ShareFileSasPermissions.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Sas/ShareFileSasPermissions.cs index 99d83c39a14f7..3b95430b88986 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Sas/ShareFileSasPermissions.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Sas/ShareFileSasPermissions.cs @@ -50,7 +50,6 @@ namespace Azure.Storage.Files.Shares /// internal static partial class ShareExtensions { - /// /// Create a permissions string to provide /// . diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Sas/ShareSasPermissions.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Sas/ShareSasPermissions.cs index 38cabd07c008a..7d48d96a0a900 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Sas/ShareSasPermissions.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Sas/ShareSasPermissions.cs @@ -55,7 +55,6 @@ namespace Azure.Storage.Files.Shares /// internal static partial class ShareExtensions { - /// /// Create a permissions string to provide /// . diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareDirectoryClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareDirectoryClient.cs index dc0c0e4a5f749..76524f0936d67 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareDirectoryClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareDirectoryClient.cs @@ -2000,7 +2000,6 @@ await ForceCloseHandlesInternal( marker = response.Value.Marker; handlesClosed += response.Value.NumberOfHandlesClosed; handlesFailed += response.Value.NumberOfHandlesFailedToClose; - } while (!string.IsNullOrEmpty(marker)); return new CloseHandlesResult() diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs index bfc1943bbf571..5d9ae01a58bc5 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs @@ -4186,7 +4186,6 @@ await content.ReadAsync(segment.Array, 0, singleRangeThreshold, cancellationToke async, cancellationToken) .ConfigureAwait(false); - } } finally @@ -4930,7 +4929,6 @@ private async Task ForceCloseAllHandlesInternal( marker = response.Value.Marker; handlesClosed += response.Value.NumberOfHandlesClosed; handlesFailed += response.Value.NumberOfHandlesFailedToClose; - } while (!string.IsNullOrEmpty(marker)); return new CloseHandlesResult() diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareLeaseClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareLeaseClient.cs index 7772d88e27762..7070c950bf356 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareLeaseClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareLeaseClient.cs @@ -358,7 +358,6 @@ private async Task> AcquireInternal( cancellationToken: cancellationToken) .ConfigureAwait(false); } - } catch (Exception ex) { @@ -497,7 +496,6 @@ internal virtual async Task> ReleaseInternal( cancellationToken: cancellationToken) .ConfigureAwait(false); } - } catch (Exception ex) { @@ -644,7 +642,6 @@ private async Task> ChangeInternal( cancellationToken: cancellationToken) .ConfigureAwait(false); } - } catch (Exception ex) { @@ -791,7 +788,6 @@ private async Task> BreakInternal( .ConfigureAwait(false)) .ToLease(); } - } catch (Exception ex) { @@ -924,7 +920,6 @@ private async Task> RenewInternal( cancellationToken: cancellationToken) .ConfigureAwait(false); } - } catch (Exception ex) { diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs index 3e95237f6830b..60d54233ec0da 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs @@ -104,7 +104,6 @@ public void DirectoryPathsParsing() TestHelper.AssertCacheableProperty(string.Empty, () => directoryClient4.Name); TestHelper.AssertCacheableProperty(string.Empty, () => directoryClient4.Path); Assert.AreEqual(string.Empty, builder4.LastDirectoryOrFileName); - } [Test] diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs index 9a6c660fb243a..d517022cd4d10 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs @@ -3314,7 +3314,6 @@ public async Task OpenReadAsync_LargeData() // Act for (int i = 0; i < size / readSize; i++) { - await outputStream.ReadAsync(actualData, 0, readSize); for (int j = 0; j < readSize; j++) { diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/ServiceClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/ServiceClientTests.cs index 2cf8e017f697e..c091aa73c6712 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/ServiceClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/ServiceClientTests.cs @@ -151,7 +151,6 @@ public async Task SetPropertiesAsync_Error() await TestHelper.AssertExpectedExceptionAsync( fakeService.SetPropertiesAsync(properties), e => Assert.AreEqual(ShareErrorCode.AuthenticationFailed.ToString(), e.ErrorCode)); - } [Test] diff --git a/sdk/storage/Azure.Storage.Queues/src/Sas/QueueAccountSasPermissions.cs b/sdk/storage/Azure.Storage.Queues/src/Sas/QueueAccountSasPermissions.cs index 4c11610a9b881..27cc988d87fc4 100644 --- a/sdk/storage/Azure.Storage.Queues/src/Sas/QueueAccountSasPermissions.cs +++ b/sdk/storage/Azure.Storage.Queues/src/Sas/QueueAccountSasPermissions.cs @@ -65,7 +65,6 @@ namespace Azure.Storage.Queues /// internal static partial class QueueExtensions { - /// /// Create a permissions string to provide /// . diff --git a/sdk/storage/Azure.Storage.Queues/src/Sas/QueueSasPermissions.cs b/sdk/storage/Azure.Storage.Queues/src/Sas/QueueSasPermissions.cs index 5b2a92d81342c..b9e59db001e70 100644 --- a/sdk/storage/Azure.Storage.Queues/src/Sas/QueueSasPermissions.cs +++ b/sdk/storage/Azure.Storage.Queues/src/Sas/QueueSasPermissions.cs @@ -50,7 +50,6 @@ namespace Azure.Storage.Queues /// internal static partial class QueueExtensions { - /// /// Create a permissions string to provide /// . diff --git a/sdk/storage/Azure.Storage.Queues/tests/ClientSideEncryptionTests.cs b/sdk/storage/Azure.Storage.Queues/tests/ClientSideEncryptionTests.cs index d1ab1a7985293..27cd3bdb0c1f0 100644 --- a/sdk/storage/Azure.Storage.Queues/tests/ClientSideEncryptionTests.cs +++ b/sdk/storage/Azure.Storage.Queues/tests/ClientSideEncryptionTests.cs @@ -27,7 +27,6 @@ namespace Azure.Storage.Queues.Test { public class ClientSideEncryptionTests : QueueTestBase { - private const string s_algorithmName = "some algorithm name"; private static readonly CancellationToken s_cancellationToken = new CancellationTokenSource().Token; diff --git a/sdk/storage/Azure.Storage.Queues/tests/ServiceClientTests.cs b/sdk/storage/Azure.Storage.Queues/tests/ServiceClientTests.cs index cd39b39629789..5bd9e05b8dbc5 100644 --- a/sdk/storage/Azure.Storage.Queues/tests/ServiceClientTests.cs +++ b/sdk/storage/Azure.Storage.Queues/tests/ServiceClientTests.cs @@ -17,7 +17,6 @@ namespace Azure.Storage.Queues.Test { public class ServiceClientTests : QueueTestBase { - public ServiceClientTests(bool async) : base(async, null /* RecordedTestMode.Record /* to re-record */) { diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobAttribute.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobAttribute.cs index b753044e8bf6c..7fee7faaf9b58 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobAttribute.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobAttribute.cs @@ -13,7 +13,6 @@ namespace Microsoft.Azure.WebJobs { - #pragma warning disable CA1200 // Avoid using cref tags with a prefix /// /// Attribute used to bind a parameter to an Azure Blob. The attribute supports binding diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobTriggerAttribute.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobTriggerAttribute.cs index e96cc8619c3c0..d59a82dc9ff67 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobTriggerAttribute.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobTriggerAttribute.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.WebJobs { - #pragma warning disable CA1200 // Avoid using cref tags with a prefix /// /// Attribute used to bind a parameter to an Azure Blob, causing the method to run when a blob is diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/Bindings/NotifyingBlobStreamTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/Bindings/NotifyingBlobStreamTests.cs index 992c051605cb7..1cd13febfe002 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/Bindings/NotifyingBlobStreamTests.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/Bindings/NotifyingBlobStreamTests.cs @@ -1319,7 +1319,6 @@ public void Dispose_IfCommittedActionIsNotNull_CallsCommittedAction() // Act using (Stream product = CreateProductUnderTest(innerStream, committedAction)) { - } // Assert diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/tests/AzuriteFixture.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/tests/AzuriteFixture.cs index 7ec6f88fafee1..0e82a273c2fc8 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/tests/AzuriteFixture.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/tests/AzuriteFixture.cs @@ -201,7 +201,6 @@ public void Dispose() private class AzuriteTokenCredential: TokenCredential { - public override ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) { return new ValueTask(GetToken(requestContext, cancellationToken)); @@ -220,7 +219,6 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell // Encoded using https://jwt.io/ return new AccessToken("eyJhdWQiOiJodHRwczovL3N0b3JhZ2UuYXp1cmUuY29tIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy1wcGUubmV0L2FiMWY3MDhkLTUwZjYtNDA0Yy1hMDA2LWQ3MWIyYWM3YTYwNi8iLCJpYXQiOjE1MTE4NTk2MDMsIm5iZiI6MTUxMTg1OTYwMywiZXhwIjo5OTk5OTk5OTk5LCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJodHRwczovL3N0b3JhZ2UuYXp1cmUuY29tIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy1wcGUubmV0L2FiMWY3MDhkLTUwZjYtNDA0Yy1hMDA2LWQ3MWIyYWM3YTYwNi8iLCJpYXQiOjE1MTE4NTk2MDMsIm5iZiI6MTUxMTg1OTYwMywiZXhwIjo5OTk5OTk5OTk5LCJhbGciOiJIUzI1NiJ9.z48ZJz_3k0ZOATIMjZ02AQxlDnUT3NXLEJXLgdHIKl8", DateTimeOffset.MaxValue); } - } } diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/tests/Fakes/FakeActivator.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/tests/Fakes/FakeActivator.cs index 360ae3c650b75..8fe6600890d8a 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/tests/Fakes/FakeActivator.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/tests/Fakes/FakeActivator.cs @@ -7,7 +7,6 @@ namespace Microsoft.Azure.WebJobs.Extensions.Storage.Common.Tests { - public class FakeActivator : IJobActivator { private Dictionary _instances = new Dictionary(); diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueAttribute.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueAttribute.cs index 44c2fe44515a3..09664db507196 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueAttribute.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueAttribute.cs @@ -9,7 +9,6 @@ namespace Microsoft.Azure.WebJobs { - #pragma warning disable CA1200 // Avoid using cref tags with a prefix /// /// Attribute used to bind a parameter to an Azure Queue. diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueTriggerAttribute.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueTriggerAttribute.cs index 6bea9fe37e06f..25a988811cef7 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueTriggerAttribute.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueTriggerAttribute.cs @@ -8,7 +8,6 @@ namespace Microsoft.Azure.WebJobs { - #pragma warning disable CA1200 // Avoid using cref tags with a prefix /// /// Attribute used to bind a parameter to an Azure Queue message, causing the function to run when a diff --git a/sdk/tables/Azure.Data.Tables/src/Extensions/TableEntityExtensions.cs b/sdk/tables/Azure.Data.Tables/src/Extensions/TableEntityExtensions.cs index 829040bdb1907..0429bc7182c27 100644 --- a/sdk/tables/Azure.Data.Tables/src/Extensions/TableEntityExtensions.cs +++ b/sdk/tables/Azure.Data.Tables/src/Extensions/TableEntityExtensions.cs @@ -54,7 +54,6 @@ internal static Dictionary ToOdataAnnotatedDictionary(this T // serialize enum as string annotatedDictionary[prop.Name] = enumValue.ToString(); break; - } } diff --git a/sdk/tables/Azure.Data.Tables/src/ITableEntity.cs b/sdk/tables/Azure.Data.Tables/src/ITableEntity.cs index 692f2bb969815..e574d82aefe75 100644 --- a/sdk/tables/Azure.Data.Tables/src/ITableEntity.cs +++ b/sdk/tables/Azure.Data.Tables/src/ITableEntity.cs @@ -5,7 +5,6 @@ namespace Azure.Data.Tables { - public interface ITableEntity { /// diff --git a/sdk/tables/Azure.Data.Tables/src/Queryable/ExpressionNormalizer.cs b/sdk/tables/Azure.Data.Tables/src/Queryable/ExpressionNormalizer.cs index bdb452d8f7686..29db3e92939e9 100644 --- a/sdk/tables/Azure.Data.Tables/src/Queryable/ExpressionNormalizer.cs +++ b/sdk/tables/Azure.Data.Tables/src/Queryable/ExpressionNormalizer.cs @@ -258,6 +258,5 @@ internal override PatternKind Kind get { return PatternKind.Compare; } } } - } } diff --git a/sdk/tables/Azure.Data.Tables/src/Queryable/ExpressionWriter.cs b/sdk/tables/Azure.Data.Tables/src/Queryable/ExpressionWriter.cs index f078febfda433..511fdee188a37 100644 --- a/sdk/tables/Azure.Data.Tables/src/Queryable/ExpressionWriter.cs +++ b/sdk/tables/Azure.Data.Tables/src/Queryable/ExpressionWriter.cs @@ -178,7 +178,6 @@ private void VisitOperand(Expression e) Visit(e); _builder.Append(UriHelper.RIGHTPAREN); } - } else { diff --git a/sdk/tables/Azure.Data.Tables/src/Queryable/ReferenceEqualityComparerOfT.cs b/sdk/tables/Azure.Data.Tables/src/Queryable/ReferenceEqualityComparerOfT.cs index 508a5c8bf73ff..9fe77efeaf58c 100644 --- a/sdk/tables/Azure.Data.Tables/src/Queryable/ReferenceEqualityComparerOfT.cs +++ b/sdk/tables/Azure.Data.Tables/src/Queryable/ReferenceEqualityComparerOfT.cs @@ -6,7 +6,6 @@ namespace Azure.Data.Tables.Queryable { - #pragma warning disable SA1649 // File name should match first type name internal sealed class ReferenceEqualityComparer : ReferenceEqualityComparer, IEqualityComparer #pragma warning restore SA1649 // File name should match first type name @@ -47,6 +46,5 @@ public int GetHashCode(T obj) return obj.GetHashCode(); } - } } diff --git a/sdk/tables/Azure.Data.Tables/src/Sas/Errors.cs b/sdk/tables/Azure.Data.Tables/src/Sas/Errors.cs index ff1422816c39c..82a575d916997 100644 --- a/sdk/tables/Azure.Data.Tables/src/Sas/Errors.cs +++ b/sdk/tables/Azure.Data.Tables/src/Sas/Errors.cs @@ -6,7 +6,6 @@ namespace Azure.Data.Tables { - /// /// Create exceptions for common error cases. /// diff --git a/sdk/tables/Azure.Data.Tables/src/Sas/TableAccountSasPermissions.cs b/sdk/tables/Azure.Data.Tables/src/Sas/TableAccountSasPermissions.cs index e138429cb2e54..cc00f061132df 100644 --- a/sdk/tables/Azure.Data.Tables/src/Sas/TableAccountSasPermissions.cs +++ b/sdk/tables/Azure.Data.Tables/src/Sas/TableAccountSasPermissions.cs @@ -60,7 +60,6 @@ namespace Azure.Data.Tables /// internal static partial class TableExtensions { - /// /// Create a permissions string to provide /// . diff --git a/sdk/tables/Azure.Data.Tables/src/Sas/TableAccountSasQueryParameters.cs b/sdk/tables/Azure.Data.Tables/src/Sas/TableAccountSasQueryParameters.cs index c93646ea4e6ec..52d61b7a598ca 100644 --- a/sdk/tables/Azure.Data.Tables/src/Sas/TableAccountSasQueryParameters.cs +++ b/sdk/tables/Azure.Data.Tables/src/Sas/TableAccountSasQueryParameters.cs @@ -148,7 +148,6 @@ internal TableAccountSasQueryParameters( _resource = resource; _permissions = permissions; _signature = signature; - } /// diff --git a/sdk/tables/Azure.Data.Tables/src/Sas/TableSasPermissions.cs b/sdk/tables/Azure.Data.Tables/src/Sas/TableSasPermissions.cs index 58540efc60fad..08414ca0011dd 100644 --- a/sdk/tables/Azure.Data.Tables/src/Sas/TableSasPermissions.cs +++ b/sdk/tables/Azure.Data.Tables/src/Sas/TableSasPermissions.cs @@ -50,7 +50,6 @@ namespace Azure.Data.Tables /// internal static partial class TableExtensions { - /// /// Create a permissions string to provide /// . diff --git a/sdk/tables/Azure.Data.Tables/src/ServiceClient.cs b/sdk/tables/Azure.Data.Tables/src/ServiceClient.cs index 3682dd4fbf832..372d7cfa1afc2 100644 --- a/sdk/tables/Azure.Data.Tables/src/ServiceClient.cs +++ b/sdk/tables/Azure.Data.Tables/src/ServiceClient.cs @@ -8,6 +8,5 @@ namespace Azure.Data.Tables /// internal partial class ServiceClient { - } } diff --git a/sdk/tables/Azure.Data.Tables/src/TableConnectionString.cs b/sdk/tables/Azure.Data.Tables/src/TableConnectionString.cs index f6ee0603a39de..2f398824098e4 100644 --- a/sdk/tables/Azure.Data.Tables/src/TableConnectionString.cs +++ b/sdk/tables/Azure.Data.Tables/src/TableConnectionString.cs @@ -386,7 +386,6 @@ private static IDictionary ParseStringIntoSettings(string connec /// The StorageCredentials object specified in the settings. private static object GetCredentials(ConnectionString settings) { - settings.TryGetSegmentValue(TableConstants.ConnectionStrings.AccountNameSetting, out var accountName); settings.TryGetSegmentValue(TableConstants.ConnectionStrings.AccountKeySetting, out var accountKey); settings.TryGetSegmentValue(TableConstants.ConnectionStrings.SharedAccessSignatureSetting, out var sharedAccessSignature); @@ -481,6 +480,5 @@ private static (Uri, Uri) ConstructTableEndpoint(ConnectionString settings) => C settings.GetRequired(TableConstants.ConnectionStrings.AccountNameSetting), settings.GetNonRequired(TableConstants.ConnectionStrings.EndpointSuffixSetting), settings.GetNonRequired(TableConstants.ConnectionStrings.SharedAccessSignatureSetting)); - } } diff --git a/sdk/tables/Azure.Data.Tables/src/TableConstants.cs b/sdk/tables/Azure.Data.Tables/src/TableConstants.cs index fefcb60f6f772..91b9a2023a656 100644 --- a/sdk/tables/Azure.Data.Tables/src/TableConstants.cs +++ b/sdk/tables/Azure.Data.Tables/src/TableConstants.cs @@ -137,7 +137,6 @@ internal static class TableAccountServices { public const string Table = "t"; } - } /// /// Table Connection String constant values. diff --git a/sdk/tables/Azure.Data.Tables/src/TableEntity.Dictionary.cs b/sdk/tables/Azure.Data.Tables/src/TableEntity.Dictionary.cs index 3fe85d0ab77d1..e90cbf9ca9dd5 100644 --- a/sdk/tables/Azure.Data.Tables/src/TableEntity.Dictionary.cs +++ b/sdk/tables/Azure.Data.Tables/src/TableEntity.Dictionary.cs @@ -9,7 +9,6 @@ namespace Azure.Data.Tables { - public partial class TableEntity : IDictionary { /// diff --git a/sdk/tables/Azure.Data.Tables/src/TableServiceClient.cs b/sdk/tables/Azure.Data.Tables/src/TableServiceClient.cs index 888feb5d67b4f..0a1fe615a0323 100644 --- a/sdk/tables/Azure.Data.Tables/src/TableServiceClient.cs +++ b/sdk/tables/Azure.Data.Tables/src/TableServiceClient.cs @@ -260,7 +260,6 @@ public virtual AsyncPageable GetTablesAsync(string filter = null, int /// An containing a collection of . public virtual Pageable GetTables(string filter = null, int? maxPerPage = null, CancellationToken cancellationToken = default) { - return PageableHelpers.CreateEnumerable( pageSizeHint => { diff --git a/sdk/tables/Azure.Data.Tables/src/TableSharedKeyPipelinePolicy.cs b/sdk/tables/Azure.Data.Tables/src/TableSharedKeyPipelinePolicy.cs index ced9fc983fd0c..8fc805e844295 100644 --- a/sdk/tables/Azure.Data.Tables/src/TableSharedKeyPipelinePolicy.cs +++ b/sdk/tables/Azure.Data.Tables/src/TableSharedKeyPipelinePolicy.cs @@ -134,6 +134,5 @@ public static IDictionary GetQueryParameters(Uri uri) } return parameters; } - } } diff --git a/sdk/tables/Azure.Data.Tables/tests/TableClientLiveTests.cs b/sdk/tables/Azure.Data.Tables/tests/TableClientLiveTests.cs index 1dfb19cd55192..f15ded0b6882b 100644 --- a/sdk/tables/Azure.Data.Tables/tests/TableClientLiveTests.cs +++ b/sdk/tables/Azure.Data.Tables/tests/TableClientLiveTests.cs @@ -23,7 +23,6 @@ namespace Azure.Data.Tables.Tests [IgnoreOnNet5("https://github.com/Azure/azure-sdk-for-net/issues/16964")] public class TableClientLiveTests : TableServiceLiveTestsBase { - public TableClientLiveTests(bool isAsync, TableEndpointType endpointType) : base(isAsync, endpointType /* To record tests, add this argument, RecordedTestMode.Record */) { } @@ -951,7 +950,6 @@ public async Task GetAccessPoliciesReturnsPolicies() Assert.That(policies.Value[0].AccessPolicy.ExpiresOn, Is.EqualTo(policyToCreate[0].AccessPolicy.ExpiresOn)); Assert.That(policies.Value[0].AccessPolicy.Permission, Is.EqualTo(policyToCreate[0].AccessPolicy.Permission)); Assert.That(policies.Value[0].AccessPolicy.StartsOn, Is.EqualTo(policyToCreate[0].AccessPolicy.StartsOn)); - } /// diff --git a/sdk/tables/Azure.Data.Tables/tests/TableClientQueryableLiveTests.cs b/sdk/tables/Azure.Data.Tables/tests/TableClientQueryableLiveTests.cs index a2a0c60f3ff9c..8445151560d4c 100644 --- a/sdk/tables/Azure.Data.Tables/tests/TableClientQueryableLiveTests.cs +++ b/sdk/tables/Azure.Data.Tables/tests/TableClientQueryableLiveTests.cs @@ -21,7 +21,6 @@ namespace Azure.Data.Tables.Tests [IgnoreOnNet5("https://github.com/Azure/azure-sdk-for-net/issues/16964")] public class TableClientQueryableLiveTests : TableServiceLiveTestsBase { - public TableClientQueryableLiveTests(bool isAsync, TableEndpointType endpointType) : base(isAsync, endpointType /* To record tests, add this argument, RecordedTestMode.Record */) { } @@ -262,7 +261,6 @@ public async Task TableQueryableMultipleWhere() Assert.That(entity, Is.Not.Null); Assert.That(entity.PartitionKey, Is.EqualTo(PartitionKeyValue)); Assert.That(entity.RowKey, Is.EqualTo(entitiesToCreate[1].RowKey)); - } [RecordedTest] diff --git a/sdk/tables/Azure.Data.Tables/tests/TableServiceClientLiveTests.cs b/sdk/tables/Azure.Data.Tables/tests/TableServiceClientLiveTests.cs index 75491bafd3bd4..fb61029a3b2d7 100644 --- a/sdk/tables/Azure.Data.Tables/tests/TableServiceClientLiveTests.cs +++ b/sdk/tables/Azure.Data.Tables/tests/TableServiceClientLiveTests.cs @@ -22,7 +22,6 @@ namespace Azure.Data.Tables.Tests /// public class TableServiceClientLiveTests : TableServiceLiveTestsBase { - public TableServiceClientLiveTests(bool isAsync, TableEndpointType endpointType) : base(isAsync, endpointType /* To record tests, add this argument, RecordedTestMode.Record */) { } diff --git a/sdk/tables/Azure.Data.Tables/tests/TableServiceClientTests.cs b/sdk/tables/Azure.Data.Tables/tests/TableServiceClientTests.cs index c43b7820b8c18..523c4f49e2379 100644 --- a/sdk/tables/Azure.Data.Tables/tests/TableServiceClientTests.cs +++ b/sdk/tables/Azure.Data.Tables/tests/TableServiceClientTests.cs @@ -11,10 +11,8 @@ namespace Azure.Tables.Tests { public class TableServiceClientTests : ClientTestBase { - public TableServiceClientTests(bool isAsync) : base(isAsync) { - } /// diff --git a/sdk/tables/Azure.Data.Tables/tests/TableServiceLiveTestsBase.cs b/sdk/tables/Azure.Data.Tables/tests/TableServiceLiveTestsBase.cs index a3858d7466219..64aeed432b1ef 100644 --- a/sdk/tables/Azure.Data.Tables/tests/TableServiceLiveTestsBase.cs +++ b/sdk/tables/Azure.Data.Tables/tests/TableServiceLiveTestsBase.cs @@ -20,7 +20,6 @@ namespace Azure.Data.Tables.Tests /// public class TableServiceLiveTestsBase : RecordedTestBase { - public TableServiceLiveTestsBase(bool isAsync, TableEndpointType endpointType, RecordedTestMode recordedTestMode) : base(isAsync, recordedTestMode) { _endpointType = endpointType; @@ -60,7 +59,6 @@ public TableServiceLiveTestsBase(bool isAsync, TableEndpointType endpointType) : [SetUp] public async Task TablesTestSetup() { - ServiceUri = _endpointType switch { TableEndpointType.Storage => TestEnvironment.StorageUri, @@ -112,7 +110,6 @@ public async Task TablesTeardown() /// protected static List CreateTableEntities(string partitionKeyValue, int count) { - // Create some entities. return Enumerable.Range(1, count).Select(n => { @@ -141,7 +138,6 @@ protected static List CreateTableEntities(string partitionKeyValue, /// protected static List CreateDictionaryTableEntities(string partitionKeyValue, int count) { - // Create some entities. return Enumerable.Range(1, count).Select(n => { @@ -170,7 +166,6 @@ protected static List CreateDictionaryTableEntities(string partitio /// protected static List CreateCustomTableEntities(string partitionKeyValue, int count) { - // Create some entities. return Enumerable.Range(1, count).Select(n => { @@ -199,7 +194,6 @@ protected static List CreateCustomTableEntities(string partitionKeyV /// protected static List CreateComplexTableEntities(string partitionKeyValue, int count) { - // Create some entities. return Enumerable.Range(1, count).Select(n => { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeBatchInput.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeBatchInput.cs index 37ba5bc428c47..306d0f0e09ae0 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeBatchInput.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeBatchInput.cs @@ -12,7 +12,6 @@ namespace Azure.AI.TextAnalytics.Models [CodeGenModel("AnalyzeBatchInput")] internal partial class AnalyzeBatchInput { - /// Initializes a new instance of AnalyzeBatchInput. /// Contains a set of input documents to be analyzed by the service. /// The set of tasks to execute on the input documents. Cannot specify the same task more than once. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/DocumentHealthcareResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/DocumentHealthcareResult.cs index 3faa104d0970b..274dd0cb1e20c 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/DocumentHealthcareResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/DocumentHealthcareResult.cs @@ -86,6 +86,5 @@ internal static HealthcareEntity ResolveHealthcareEntity(IEnumerable public EntitiesTaskParameters Parameters { get; set; } - } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/EntitiesTaskParameters.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/EntitiesTaskParameters.cs index a3b6fb8ba17d4..e774a8efc5a62 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/EntitiesTaskParameters.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/EntitiesTaskParameters.cs @@ -21,6 +21,5 @@ public partial class EntitiesTaskParameters /// StringIndexType /// internal StringIndexType? StringIndexType { get; set; } - } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/HealthcareEntity.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/HealthcareEntity.cs index 0f219fcae7374..267414b85b745 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/HealthcareEntity.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/HealthcareEntity.cs @@ -16,6 +16,5 @@ public partial class HealthcareEntity /// IsNegated /// public bool IsNegated { get; } - } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/HealthcareOperation.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/HealthcareOperation.cs index a468850d1f1c5..23803a7534b06 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/HealthcareOperation.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/HealthcareOperation.cs @@ -204,7 +204,6 @@ private async ValueTask UpdateStatusAsync(bool async, CancellationToke if (update.Value.Status == JobStatus.Succeeded) { - // we need to first assign a vaue and then mark the operation as completed to avoid race conditions _value = Transforms.ConvertToRecognizeHealthcareEntitiesResultCollection(update.Value.Results, _idToIndexMap); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/JobManifestTasks.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/JobManifestTasks.cs index d0fc1b6f2971f..b53ff67815121 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/JobManifestTasks.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/JobManifestTasks.cs @@ -27,6 +27,5 @@ public partial class JobManifestTasks /// KeyPhraseExtractionTasks /// public IList KeyPhraseExtractionTasks { get; internal set; } - } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/JobStatus.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/JobStatus.cs index 413399c8f93d5..1a042c9293a91 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/JobStatus.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/JobStatus.cs @@ -12,6 +12,5 @@ namespace Azure.AI.TextAnalytics [CodeGenModel("State")] public partial struct JobStatus { - } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/KeyPhrasesTask.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/KeyPhrasesTask.cs index 95fac1b9982da..3fc64a35f0f29 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/KeyPhrasesTask.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/KeyPhrasesTask.cs @@ -15,6 +15,5 @@ public partial class KeyPhrasesTask /// Parameters for KeyPhrasesTask /// public KeyPhrasesTaskParameters Parameters { get; set; } - } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/PiiTask.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/PiiTask.cs index f865fc738e8c5..bba47e611845d 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/PiiTask.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/PiiTask.cs @@ -11,11 +11,9 @@ namespace Azure.AI.TextAnalytics [CodeGenModel("PiiTask")] public partial class PiiTask { - /// /// Parameters for PiiTask /// public PiiTaskParameters Parameters { get; set; } - } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs index 056dd7c3cea14..2aa929bf95346 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs @@ -1355,7 +1355,6 @@ public virtual async Task> AnalyzeSen MultiLanguageBatchInput documentInputs = ConvertToMultiLanguageInputs(documents); return await AnalyzeSentimentBatchAsync(documentInputs, analyzeSentimentOptions, cancellationToken).ConfigureAwait(false); - } /// @@ -1412,7 +1411,6 @@ public virtual async Task> AnalyzeSen MultiLanguageBatchInput documentInputs = ConvertToMultiLanguageInputs(documents); return await AnalyzeSentimentBatchAsync(documentInputs, options, cancellationToken).ConfigureAwait(false); - } /// @@ -2122,7 +2120,6 @@ public virtual async Task StartHealthcareAsync(string docum scope.Failed(e); throw; } - } /// @@ -2369,7 +2366,6 @@ public virtual async Task StartCancelHealthJobAsync(HealthcareOperation scope.Failed(e); throw; } - } /// Runs the cancel job for healthcare operation which was initialized using or diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextDocumentInput.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextDocumentInput.cs index 6e855d7a4c920..d9c562373a642 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextDocumentInput.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextDocumentInput.cs @@ -25,6 +25,5 @@ public TextDocumentInput(string id, string text) : base(id, text) { } /// (for example, "en" for English or "es" for Spanish). /// public string Language { get; set; } - } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs index c0d46daf53978..38f191a08eeb6 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs @@ -42,7 +42,6 @@ internal static List ConvertToErrors(IReadOnlyList ConvertToWarnings(IReadOnlyList internalWarnings) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs index 39b0efa43198c..7f27510f0e1f5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs @@ -203,7 +203,6 @@ public async Task AnalyzeOperationWithMultipleTasks() Assert.IsNotNull(entitiesResult[0].Id); Assert.IsNotNull(entitiesResult[0].Entities); Assert.IsNotNull(entitiesResult[0].Error); - } [Test] @@ -301,7 +300,6 @@ await Task.Run(() => { Assert.IsTrue(ex.ErrorCode.Equals("InvalidArgument")); Assert.IsTrue(ex.Status.Equals(400)); }); - } [Test] diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsClientMockTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsClientMockTests.cs index c0d793df68386..0df71bd21092e 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsClientMockTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsClientMockTests.cs @@ -243,7 +243,6 @@ public async Task DetectedLanguageNullName() Assert.IsNull(response.FirstOrDefault().PrimaryLanguage.Name); Assert.IsNotNull(response.FirstOrDefault().PrimaryLanguage.Iso6391Name); - } [Test] @@ -284,7 +283,6 @@ public async Task DetectedLanguageNullIso6391Name() Assert.IsNotNull(response.FirstOrDefault().PrimaryLanguage.Name); Assert.IsNull(response.FirstOrDefault().PrimaryLanguage.Iso6391Name); - } // We shipped TA 5.0.0 Text == string.Empty if the service returned a null value for Text. From 5b051798b5f947608b8c3b7ab89f44209c8bd828 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Thu, 3 Dec 2020 16:44:47 -0800 Subject: [PATCH 3/4] generator update --- eng/Packages.Data.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 652a38022995e..39002cf2b201c 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -9,7 +9,7 @@ - + From 80dd7618ac571896d1e378378fc18216a40516c4 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Fri, 4 Dec 2020 08:27:21 -0800 Subject: [PATCH 4/4] FB and snippets --- sdk/core/Azure.Core/generate_solution.ps1 | 2 +- sdk/core/Azure.Core/samples/Pipeline.md | 1 - sdk/storage/Azure.Storage.Blobs/README.md | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sdk/core/Azure.Core/generate_solution.ps1 b/sdk/core/Azure.Core/generate_solution.ps1 index 33a8a73aad5f2..642c6361f839f 100644 --- a/sdk/core/Azure.Core/generate_solution.ps1 +++ b/sdk/core/Azure.Core/generate_solution.ps1 @@ -2,7 +2,7 @@ Set-StrictMode -Version Latest $RepoRoot = Resolve-Path $PSScriptRoot\..\..\.. $ObjDirectory = "$RepoRoot\artifacts\obj"; -#dotnet restore $RepoRoot\eng\service.proj +dotnet restore $RepoRoot\eng\service.proj pushd $PSScriptRoot diff --git a/sdk/core/Azure.Core/samples/Pipeline.md b/sdk/core/Azure.Core/samples/Pipeline.md index 49157412fa43b..a5e2344760344 100644 --- a/sdk/core/Azure.Core/samples/Pipeline.md +++ b/sdk/core/Azure.Core/samples/Pipeline.md @@ -35,7 +35,6 @@ public class StopwatchPolicy : HttpPipelinePolicy stopwatch.Stop(); Console.WriteLine($"Request to {message.Request.Uri} took {stopwatch.Elapsed}"); - } public override void Process(HttpMessage message, ReadOnlyMemory pipeline) diff --git a/sdk/storage/Azure.Storage.Blobs/README.md b/sdk/storage/Azure.Storage.Blobs/README.md index 2da6f86dd5669..fccc013d4a2ce 100644 --- a/sdk/storage/Azure.Storage.Blobs/README.md +++ b/sdk/storage/Azure.Storage.Blobs/README.md @@ -162,7 +162,6 @@ try catch (RequestFailedException ex) when (ex.ErrorCode == BlobErrorCode.ContainerBeingDeleted || ex.ErrorCode == BlobErrorCode.ContainerNotFound) - { // Ignore any errors if the container being deleted or if it has already been deleted }