diff --git a/buildtools/Copy-Dependencies.ps1 b/buildtools/Copy-Dependencies.ps1 deleted file mode 100644 index bf7703b32ca8..000000000000 --- a/buildtools/Copy-Dependencies.ps1 +++ /dev/null @@ -1,182 +0,0 @@ -# Find all dependency paths under a folder and copy each of them to the target folder -Function Copy-Dependencies -{ - [CmdletBinding()] - Param - ( - # The list of dependencies to copy - # - # Note, only dependencies of Core projects may currently be listed - # Restoring the full slns just for copying was disruptive to later tests - # - # If ever modifying this list, you likely need to update buildtools/NoticeForZips.txt and - # the corresponding copy-license-and-notice task as well. - [Parameter()] - [string[]] - $DependencyNames = @("microsoft.bcl.asyncinterfaces", "system.runtime.compilerservices.unsafe", "system.threading.tasks.extensions", - "awscrt", "awscrt-auth", "awscrt-http", "awscrt-checksums"), - - # The list of dependencies with additional targets - # Each entry should contain the dependency name as a key, source and target as value - [Parameter()] - [hashtable] - $DependenciesWithAditionalTargets = @{ - "awscrt" = @{Source = "netstandard2.0"; Target = "netcoreapp3.1"} - "awscrt-auth" = @{Source = "netstandard2.0"; Target = "netcoreapp3.1"} - "awscrt-http" = @{Source = "netstandard2.0"; Target = "netcoreapp3.1"} - "awscrt-checksums" = @{Source = "netstandard2.0"; Target = "netcoreapp3.1"} - }, - - # The location to copy the built dlls to - [Parameter(Mandatory=$true, Position=1)] - [string] - $Destination, - - # Absolute path to a temporary folder to restore the Core projects into prior the copy the dependencies from - [Parameter(Mandatory=$true, Position=2)] - [string] - $TempRestoreFolder, - - # The build type. If not specified defaults to 'release'. - [Parameter()] - [string] - $BuildType = "release", - - # The supported platforms in .NET SDK - [Parameter()] - [string[]] - $AcceptedPlatforms = @("net35","net45","netstandard2.0","netcoreapp3.1"), - - # The supported platforms in .NET SDK - [Parameter()] - [string[]] - $ProjectFiles = @("AWSSDK.Core.Net35.csproj", "AWSSDK.Core.Net45.csproj", "AWSSDK.Core.NetStandard.csproj", "AWSSDK.Extensions.CrtIntegration.Net35.csproj", - "AWSSDK.Extensions.CrtIntegration.Net45.csproj", "AWSSDK.Extensions.CrtIntegration.NetStandard.csproj") - - ) - - Process - { - foreach ($project in $ProjectFiles) - { - # Check two paths to support running in either the root or /buildtools folders - if (Test-Path sdk/src/core/$project) { - dotnet restore -f --packages $TempRestoreFolder sdk/src/core/$project - } - elseif (Test-Path ../sdk/src/core/$project) - { - dotnet restore -f --packages $TempRestoreFolder ../sdk/src/core/$project - } - elseif (Test-Path extensions/src/AWSSDK.Extensions.CrtIntegration/$project) - { - dotnet restore -f --packages $TempRestoreFolder extensions/src/AWSSDK.Extensions.CrtIntegration/$project - } - elseif (Test-Path ../extensions/src/AWSSDK.Extensions.CrtIntegration/$project) - { - dotnet restore -f --packages $TempRestoreFolder ../extensions/src/AWSSDK.Extensions.CrtIntegration/$project - } - } - - foreach ($dependency in $DependencyNames) - { - Write-Debug "Checking if $dependency exists in $TempRestoreFolder" - if (Test-Path $TempRestoreFolder/$dependency) { - $dependencyFolder = Get-Item -Path $TempRestoreFolder/$dependency - $versions = Get-ChildItem -Path $dependencyFolder | Sort-Object -Property Name -Descending - $max = $versions[0] - $libPath = Join-Path $max.FullName lib - if (Test-Path $libPath) - { - $targets = Get-Item -Path $libPath | Get-ChildItem - foreach ($target in $targets) - { - $targetDllPath = Join-Path $target.FullName *.dll - if (($AcceptedPlatforms -match $target.Name) -And (Test-Path $targetDllPath)) - { - $dllFile = Get-ChildItem -Path $targetDllPath - if (@($dllFile).Length -eq 1) - { - Write-Debug "Copying $dllFile to $Destination for $target" - Copy-Dependency -SourceFile $dllFile -Destination $Destination -Platform $target.Name - - if ($DependenciesWithAditionalTargets.ContainsKey($dependency) -And - $target.Name -eq $DependenciesWithAditionalTargets.$dependency.Source) - { - Copy-Dependency -SourceFile $dllFile -Destination $Destination -Platform $DependenciesWithAditionalTargets.$dependency.Target - } - - } - else - { - throw "Multiple dll files found for dependency $dependency" - } - } - else - { - Write-Debug "$target is not an accepted platform for $dependency" - } - } - } - else - { - throw "No lib folder found for dependency $dependency" - } - } - else - { - throw "Could not find dependency $dependency in packages $TempRestoreFolder" - } - } - - Write-Debug "Deleting $TempRestoreFolder" - Remove-Item -Recurse -Force $TempRestoreFolder - } -} - -# Given the path of a dependency dll, copy it to the target folder for the correct platform -Function Copy-Dependency -{ - [CmdletBinding()] - Param - ( - # The path to the dll for the dependency - [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=0)] - [string] - $SourceFile, - - # The location to copy the built dll to - [Parameter(Mandatory=$true, Position=1)] - [string] - $Destination, - - # The platform to copy. - [Parameter()] - [string] - $Platform - ) - - Process - { - Write-Verbose "Copying built SDK assemblies beneath $SourceFile to $Destination" - if (!(Test-Path $Destination)) - { - New-Item $Destination -ItemType Directory - } - $platformDestination = Join-Path $Destination $Platform - if (!(Test-Path $platformDestination)) - { - New-Item $platformDestination -ItemType Directory - } - $assembly = Get-Item -Path $SourceFile - Write-Debug "Checking if $assembly exists" - if(!(Test-Path $assembly)) - { - throw "Configured to copy $assembly but it was not found. Please check the path of the dependency." - } - - Write-Host "Copying $($assembly.FullName) to $(Resolve-Path $platformDestination)" - Copy-Item $assembly.FullName -Destination $(Resolve-Path $platformDestination) - } -} - -Copy-Dependencies -Destination ..\Deployment\assemblies $(Join-Path -Path $([System.IO.Path]::GetTempPath()) -ChildPath "/temp-nuget-packages") \ No newline at end of file diff --git a/buildtools/Copy-SDKAssemblies.ps1 b/buildtools/Copy-SDKAssemblies.ps1 deleted file mode 100644 index 3ac81f3d4424..000000000000 --- a/buildtools/Copy-SDKAssemblies.ps1 +++ /dev/null @@ -1,244 +0,0 @@ -# Script parameters -Param -( - [string]$PublicKeyTokenToCheck, - - # The build type. If not specified defaults to 'release'. - [Parameter()] - [string]$BuildType = "release", - - [Parameter()] - [string[]]$ServiceList = "" -) - -# Functions - -Function Get-PublicKeyToken -{ - [CmdletBinding()] - Param - ( - # The assembly in question - [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, ValueFromPipeline=$true, Position=0)] - [string]$AssemblyPath - ) - - $token = $null - $token = [System.Reflection.Assembly]::LoadFrom($AssemblyPath).GetName().GetPublicKeyToken() - if ( $token ) - { - $key = "" - foreach($b in $token) - { - $key += "{0:x2}" -f $b - } - return $key - } - else - { - Write-Error "NO TOKEN!! - $AssemblyPath" - } -} - -Function Copy-SdkAssemblies -{ - [CmdletBinding()] - Param - ( - # The root folder containing the core runtime or a service - [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=0)] - [string] - $SourceRoot, - - # The location to copy the built dll and pdb to - [Parameter(Mandatory=$true, Position=1)] - [string] - $Destination, - - # The build type. If not specified defaults to 'release'. - [Parameter()] - [string] - $BuildType = "release", - - # The platforms to copy. Defaults to all if not specified. - [Parameter()] - [string[]] - $Platforms = @("net35","net45","netstandard2.0","netcoreapp3.1","net8.0"), - - # The public key token that all assemblies should have. Optional. - [Parameter()] - [string] - $PublicKeyToken = "", - - [Parameter()] - [string[]] - $PackageList = @() - ) - - Process - { - Write-Verbose "Copying built SDK assemblies beneath $SourceRoot to $Destination" - - if (!(Test-Path $Destination)) - { - New-Item $Destination -ItemType Directory - } - - $dir = Get-Item $SourceRoot - $servicename = $dir.Name - - foreach ($p in $Platforms) - { - $relativeSourcePath = "bin\$BuildType\$p" - - if (!(Join-Path $dir.FullName $relativeSourcePath | Test-Path)) - { - continue - } - - $platformDestination = Join-Path $Destination $p - if (!(Test-Path $platformDestination)) - { - New-Item $platformDestination -ItemType Directory - } - - if ($servicename.StartsWith("AWSSDK")) { - $filter = "bin\$BuildType\$p\$servicename.*" - } - else { - $filter = "bin\$BuildType\$p\AWSSDK.$servicename.*" - } - - $sourceDirectory = $null - $sourceDirectory = [System.IO.Path]::Combine($dir.FullName, 'bin', $BuildType, $p) - Write-Debug "Checking if $sourceDirectory exists" - if(!(Test-Path $sourceDirectory)) - { - continue - } - - $files = gci -Path $dir.FullName -Filter $filter -ErrorAction Stop - - foreach ($a in $files) - { - $assemblyName = $a.Name - $assemblyExtension = [System.IO.Path]::GetExtension($assemblyName).ToLower() - if ($assemblyExtension -eq ".dll") - { - $aToken = Get-PublicKeyToken -AssemblyPath $a.FullName - Write-Debug "File $assemblyName has token = $aToken" - if ($PublicKeyToken -ne $aToken) - { - $message = "File = {0}, Token = {1}, does not match Expected Token = {2}" -f $a.FullName, $aToken, $PublicKeyToken - Write-Error $message - return - } - } - Write-Host "Copying $($a.FullName) to $($platformDestination)" - Copy-Item $a.FullName $platformDestination - } - } - } -} - -Function Copy-CoreClrSdkAssemblies -{ - [CmdletBinding()] - Param - ( - # The root folder containing the core runtime or a service - [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, Position = 0)] - [string]$SourceRoot, - # The location to copy the built dll and pdb to - [Parameter(Mandatory = $true, Position = 1)] - [string]$Destination, - # The build type. If not specified defaults to 'release'. - [Parameter()] - [string]$BuildType = "release", - # The platforms to copy. Defaults to all if not specified. - [Parameter()] - [string[]]$Platforms = @("netstandard1.5"), - # The public key token that all assemblies should have. Optional. - [Parameter()] - [string]$PublicKeyToken = "" - ) - - Process - { - Write-Verbose "Copying built NetStandard SDK assemblies beneath $SourceRoot to $Destination" - - if (!(Test-Path $Destination)) - { - New-Item $Destination -ItemType Directory - } - - $assemblyFoldersPattern = Join-Path $SourceRoot "*.Dnx" - $assemblyFolderRoots = gci $assemblyFoldersPattern - foreach ($afr in $assemblyFolderRoots) - { - foreach ($p in $Platforms) - { - $sourceFolder = Join-Path $afr (Join-Path $BuildType $p) - $targetFolder = Join-Path $Destination $p - - if (!(Test-Path $targetFolder)) - { - New-Item $targetFolder -ItemType Directory - } - - Write-Verbose "Copying from $sourceFolder to $targetFolder..." - - $files = gci $sourceFolder - - foreach ($f in $files) - { - Write-Host "Copying $($f.FullName) to $($targetFolder)" - Copy-Item -Path $f.FullName -Destination $targetFolder - } - } - } - } -} - -$builtservices = New-Object System.Collections.ArrayList -if (![string]::IsNullOrEmpty($ServiceList)) -{ - foreach($service in $ServiceList.split(@(';',','))) - { - if ($service -eq "Core") - { - $builtservices = $null - break - } - else - { - $builtservices.Add($service.ToLower()) - } - } -} -else -{ - $builtservices = $null -} - -Write-Verbose "Copying $BuildType SDK assemblies to deployment folders for BCL platforms" -$args = @{ - "Destination" = "..\Deployment\assemblies" - "PublicKeyToken" = $PublicKeyTokenToCheck - "BuildType" = $BuildType -} - -Copy-SDKAssemblies -SourceRoot ..\sdk\src\Core -Destination ..\Deployment\assemblies -PublicKeyToken $PublicKeyTokenToCheck -BuildType $BuildType - -$services = Get-ChildItem ..\sdk\src\services -foreach ($s in $services) -{ - if ($null -eq $builtservices -Or $builtservices.contains($s.Name.ToLower())) - { - Copy-SDKAssemblies -SourceRoot $s.FullName -Destination ..\Deployment\assemblies -PublicKeyToken $PublicKeyTokenToCheck -BuildType $BuildType - } -} - -Write-Verbose "Copying $BuildType AWSSDK.Extensions assemblies to deployment folders" -Copy-SDKAssemblies -SourceRoot ..\extensions\src\AWSSDK.Extensions.CrtIntegration -Destination ..\Deployment\assemblies -PublicKeyToken $PublicKeyTokenToCheck -BuildType $BuildType -Copy-SDKAssemblies -SourceRoot ..\extensions\src\AWSSDK.Extensions.NETCore.Setup -Destination ..\Deployment\assemblies -PublicKeyToken $PublicKeyTokenToCheck -BuildType $BuildType \ No newline at end of file diff --git a/buildtools/CustomTasks/CustomTasks.csproj b/buildtools/CustomTasks/CustomTasks.csproj index 6df343e70a88..f48541e86868 100644 --- a/buildtools/CustomTasks/CustomTasks.csproj +++ b/buildtools/CustomTasks/CustomTasks.csproj @@ -2,7 +2,7 @@ netstandard2.0 - net45 + net472 CustomTasks CustomTasks false @@ -20,7 +20,7 @@ - + diff --git a/buildtools/TestWrapper/DummyMSTestCases/DummyMSTestCases.csproj b/buildtools/TestWrapper/DummyMSTestCases/DummyMSTestCases.csproj index 932d78295ab5..86561e8b1f18 100644 --- a/buildtools/TestWrapper/DummyMSTestCases/DummyMSTestCases.csproj +++ b/buildtools/TestWrapper/DummyMSTestCases/DummyMSTestCases.csproj @@ -2,7 +2,7 @@ netstandard2.0 - net45 + net472 Library DummyMSTestCases DummyMSTestCases diff --git a/buildtools/TestWrapper/DummyNoRetryTestCases/DummyNoRetryTestCases.csproj b/buildtools/TestWrapper/DummyNoRetryTestCases/DummyNoRetryTestCases.csproj index c60a2c2dff7f..cb9024486334 100644 --- a/buildtools/TestWrapper/DummyNoRetryTestCases/DummyNoRetryTestCases.csproj +++ b/buildtools/TestWrapper/DummyNoRetryTestCases/DummyNoRetryTestCases.csproj @@ -2,7 +2,7 @@ netstandard2.0 - net45 + net472 Library DummyNoRetryTestCases DummyNoRetryTestCases diff --git a/buildtools/TestWrapper/DummyXUnitTestCases/DummyXUnitTestCases.csproj b/buildtools/TestWrapper/DummyXUnitTestCases/DummyXUnitTestCases.csproj index 67b342583175..46a6377e9d85 100644 --- a/buildtools/TestWrapper/DummyXUnitTestCases/DummyXUnitTestCases.csproj +++ b/buildtools/TestWrapper/DummyXUnitTestCases/DummyXUnitTestCases.csproj @@ -2,7 +2,7 @@ netstandard2.0 - net45 + net472 Library DummyXUnitTestCases DummyXUnitTestCases diff --git a/buildtools/TestWrapper/TestRunners/TestRunners.csproj b/buildtools/TestWrapper/TestRunners/TestRunners.csproj index 6d8c0c75f62c..32d2c51d319d 100644 --- a/buildtools/TestWrapper/TestRunners/TestRunners.csproj +++ b/buildtools/TestWrapper/TestRunners/TestRunners.csproj @@ -2,7 +2,7 @@ netstandard2.0 - net45 + net472 Library TestWrapper TestWrapper @@ -19,7 +19,7 @@ - + diff --git a/buildtools/build.proj b/buildtools/build.proj index 8241b2e4e2da..c1af958d9709 100644 --- a/buildtools/build.proj +++ b/buildtools/build.proj @@ -60,11 +60,9 @@ - AWSSDK.Net35.sln - AWSSDK.Net45.sln + AWSSDK.NetFramework.sln AWSSDK.NetStandard.sln - AWSSDK.UnitTests.Net35.csproj - AWSSDK.UnitTests.Net45.csproj + AWSSDK.UnitTests.NetFramework.csproj UnitTests.NetStandard.csproj false @@ -175,15 +173,10 @@ - - - - - - - - - + + + + @@ -273,13 +266,9 @@ - - - - - - - + + + @@ -289,14 +278,7 @@ - - @@ -310,27 +292,15 @@ - - - - - - - + + + - - - - - - - - - + + + - - @@ -400,12 +358,7 @@ - - - - + @@ -439,7 +386,7 @@ diff --git a/buildtools/doc-build.proj b/buildtools/doc-build.proj index 56348e08427e..009736bc7bc0 100644 --- a/buildtools/doc-build.proj +++ b/buildtools/doc-build.proj @@ -20,10 +20,10 @@ $(MSBuildProjectDirectory)\..\docgenerator - - net45 + net472 * $(MSBuildProjectDirectory)\..\Deployment\assemblies diff --git a/buildtools/self-service.proj b/buildtools/self-service.proj deleted file mode 100644 index 24aa5f579777..000000000000 --- a/buildtools/self-service.proj +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - CustomTasks\bin\Debug\CustomTasks.dll - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docgenerator/SDKDocGeneratorLib/GeneratorOptions.cs b/docgenerator/SDKDocGeneratorLib/GeneratorOptions.cs index 4320f18d0eb5..896f27b6686f 100644 --- a/docgenerator/SDKDocGeneratorLib/GeneratorOptions.cs +++ b/docgenerator/SDKDocGeneratorLib/GeneratorOptions.cs @@ -61,7 +61,7 @@ public string SDKVersionFilePath /// /// The platform subfolder considered to be hosting the primary source of - /// assemblies for doc generation. If not specified, we attempt to use 'net45'. + /// assemblies for doc generation. If not specified, we attempt to use 'net472'. /// If that subfolder platform does not exist, we'll use the first subfolder /// under the SDKAssembliesRoot that we find. /// diff --git a/extensions/src/AWSSDK.Extensions.CloudFront.Signers/AWSSDK.Extensions.CloudFront.Signers.NetStandard.csproj b/extensions/src/AWSSDK.Extensions.CloudFront.Signers/AWSSDK.Extensions.CloudFront.Signers.NetStandard.csproj index 1194450a69d1..c19a984e2314 100644 --- a/extensions/src/AWSSDK.Extensions.CloudFront.Signers/AWSSDK.Extensions.CloudFront.Signers.NetStandard.csproj +++ b/extensions/src/AWSSDK.Extensions.CloudFront.Signers/AWSSDK.Extensions.CloudFront.Signers.NetStandard.csproj @@ -3,7 +3,7 @@ netstandard2.0;netcoreapp3.1;net8.0 AWSSDK.Extensions.CloudFront.Signers AWSSDK.Extensions.CloudFront.Signers - $(DefineConstants);NETSTANDARD;AWS_ASYNC_API + $(DefineConstants);NETSTANDARD false false false diff --git a/generator/.DevConfigs/a8dc513b-c930-4b25-be67-82beb4369c6b.json b/generator/.DevConfigs/a8dc513b-c930-4b25-be67-82beb4369c6b.json new file mode 100644 index 000000000000..64d187acf83a --- /dev/null +++ b/generator/.DevConfigs/a8dc513b-c930-4b25-be67-82beb4369c6b.json @@ -0,0 +1,9 @@ +{ + "core": { + "changeLogMessages": [ + "Remove and adjust unused targets NET35 and NET45 from codebase." + ], + "type": "patch", + "updateMinimum": true + } + } \ No newline at end of file diff --git a/generator/ProtocolTestsGenerator/README.md b/generator/ProtocolTestsGenerator/README.md index 7cf6453b6ac8..21367163bf04 100644 --- a/generator/ProtocolTestsGenerator/README.md +++ b/generator/ProtocolTestsGenerator/README.md @@ -26,9 +26,9 @@ cd ProtocolTestsGenerator ``` 3. The protocol tests will be outputted to the `sdk/test/ProtocolTests/Generated//dotnet-protocol-test-codegen` folder. -4. To run the tests you can open the AWSSDK.ProtocolTests.Net45.sln and run the tests in Visual Studio or run the following command in the `sdk/test/ProtocolTests` directory. +4. To run the tests you can open the AWSSDK.ProtocolTests.NetFramework.sln and run the tests in Visual Studio or run the following command in the `sdk/test/ProtocolTests` directory. ``` -dotnet test AWSSDK.ProtocolTests.Net45.csproj +dotnet test AWSSDK.ProtocolTests.NetFramework.csproj ``` ## Debugging Protocol Tests diff --git a/generator/ServiceClientGenerator/Program.cs b/generator/ServiceClientGenerator/Program.cs index f3170e6c5d19..ad6381db27bc 100644 --- a/generator/ServiceClientGenerator/Program.cs +++ b/generator/ServiceClientGenerator/Program.cs @@ -86,8 +86,6 @@ static int Main(string[] args) GeneratorDriver.GenerateDefaultConfigurationModeEnum(generationManifest, options); GeneratorDriver.GenerateEndpoints(options); GeneratorDriver.GenerateS3Enumerations(options); - - GeneratorDriver.RemoveLegacyFiles(options.SdkRootFolder); } else { diff --git a/generator/ServiceClientGeneratorLib/GeneratorDriver.cs b/generator/ServiceClientGeneratorLib/GeneratorDriver.cs index b5354aaf981a..f6b96e532d40 100644 --- a/generator/ServiceClientGeneratorLib/GeneratorDriver.cs +++ b/generator/ServiceClientGeneratorLib/GeneratorDriver.cs @@ -1562,55 +1562,6 @@ private static void RemoveOrphanedServices(string path, IEnumerable code } } - /// - /// Removes project files (*.csproj) and folders that are not needed in the next version of the SDK: - /// - public static void RemoveLegacyFiles(string sdkRootFolder) - { - // TODO: Remove this method once net35 and net45 are removed from the SDK. - var legacyProjectSuffixes = new HashSet - { - "Net35.csproj", - "Net45.csproj" - }; - - var legacyFolderNames = new HashSet - { - "_bcl35", - Utils.PathCombineAlt("Generated", "_bcl45"), - Utils.PathCombineAlt("Generated", "_bcl45+netstandard"), - Utils.PathCombineAlt("Generated", "Model", "_bcl45+netstandard"), - Utils.PathCombineAlt("Config", "35"), - Utils.PathCombineAlt("Config", "45") - }; - - var allProjectFiles = Directory.GetFiles(sdkRootFolder, "*.csproj", SearchOption.AllDirectories).OrderBy(f => f); - foreach (var file in allProjectFiles) - { - var fullPath = Utils.ConvertPathAlt(Path.GetFullPath(file)); - var shouldDelete = legacyProjectSuffixes.Any(x => fullPath.EndsWith(x)); - - if (shouldDelete && File.Exists(file)) - { - Console.Error.WriteLine("**** Warning: Removing obsolete csproj file " + Path.GetFileName(file)); - File.Delete(file); - } - } - - var allFolders = Directory.EnumerateDirectories(sdkRootFolder, "*", SearchOption.AllDirectories).OrderBy(d => d); - foreach (var folder in allFolders) - { - var fullPath = Utils.ConvertPathAlt(Path.GetFullPath(folder)); - var shouldDelete = legacyFolderNames.Any(x => fullPath.Contains(x)); - - if (shouldDelete && Directory.Exists(folder)) - { - Console.Error.WriteLine("**** Warning: Removing obsolete folder " + fullPath); - Directory.Delete(folder, recursive: true); - } - } - } - /// /// Constructs endpoint constant name from a region code /// e.g. us-east-1 -> USEast1 diff --git a/generator/ServiceClientGeneratorLib/ProjectFileConfiguration.cs b/generator/ServiceClientGeneratorLib/ProjectFileConfiguration.cs index a5d3d3f14fab..41cc8678b3db 100644 --- a/generator/ServiceClientGeneratorLib/ProjectFileConfiguration.cs +++ b/generator/ServiceClientGeneratorLib/ProjectFileConfiguration.cs @@ -159,8 +159,8 @@ public bool IsPlatformCodeFolder(string sourceFolder) public IEnumerable PackageReferences { get; private set; } /// - /// Specify where the framework binaries are. For net35 in vs2017 project, this is needed - /// to work around https://github.com/Microsoft/msbuild/issues/1333 + /// Specify where the framework binaries are. This was last needed for net35 in vs2017 project + /// to work around https://github.com/Microsoft/msbuild/issues/1333 when the target was in use. /// public string FrameworkPathOverride { get; private set; } diff --git a/generator/ServiceClientGeneratorLib/ServiceClientGeneratorLib.csproj b/generator/ServiceClientGeneratorLib/ServiceClientGeneratorLib.csproj index 841f4598fed4..9d8dc8b5373b 100644 --- a/generator/ServiceClientGeneratorLib/ServiceClientGeneratorLib.csproj +++ b/generator/ServiceClientGeneratorLib/ServiceClientGeneratorLib.csproj @@ -1,6 +1,6 @@  - netstandard2.0;netcoreapp3.1;net8.0;net45 + netstandard2.0;netcoreapp3.1;net8.0;net472 netstandard2.0;netcoreapp3.1;net8.0 portable true @@ -738,10 +738,10 @@ - + - - + + \ No newline at end of file diff --git a/generator/ServiceClientGeneratorLib/SolutionFileCreator.cs b/generator/ServiceClientGeneratorLib/SolutionFileCreator.cs index 44d3c4b1c2c0..c6ac40542d59 100644 --- a/generator/ServiceClientGeneratorLib/SolutionFileCreator.cs +++ b/generator/ServiceClientGeneratorLib/SolutionFileCreator.cs @@ -571,11 +571,7 @@ private void AddTestProjectsAndDependencies(IEnumerable f)) { diff --git a/generator/ServiceModels/_manifest.json b/generator/ServiceModels/_manifest.json index be5112a4f6be..24252ee5bfd6 100644 --- a/generator/ServiceModels/_manifest.json +++ b/generator/ServiceModels/_manifest.json @@ -3,7 +3,7 @@ { "name": "NetFramework", "targetFrameworks": [ "net472" ], - "defineConstants": [ "BCL", "AWS_ASYNC_API", "CODE_ANALYSIS" ], + "defineConstants": [ "BCL", "CODE_ANALYSIS" ], "template": "VS2017ProjectFile", "excludeFolders": [ "_netstandard", "obj"], "nugetTargetPlatform": "net472", @@ -28,7 +28,7 @@ { "name": "NetStandard", "targetFrameworks": [ "netstandard2.0", "netcoreapp3.1", "net8.0" ], - "defineConstants": [ "NETSTANDARD", "AWS_ASYNC_API"], + "defineConstants": [ "NETSTANDARD"], "template": "VS2017ProjectFile", "binSubFolder" : "", "configurations" : [], @@ -60,7 +60,7 @@ "Custom\\Runtime\\TestResponses\\*.txt", "Custom\\Runtime\\EventStreams\\test_vectors\\*", "Custom\\Runtime\\TestEndpoints\\*.json", - "Custom\\TestTools\\ComparerTest.json", + "Custom\\TestTools\\ComparerTest.json" ], "packageReferences": [ { diff --git a/sdk/nuget-content/account-management.ps1 b/sdk/nuget-content/account-management.ps1 index 158e6e20e027..fb5e9a61ac5b 100644 --- a/sdk/nuget-content/account-management.ps1 +++ b/sdk/nuget-content/account-management.ps1 @@ -1,7 +1,7 @@ function RegisterProfile() { - $dllpath = "..\lib\net35\AWSSDK.Core.dll" + $dllpath = "..\lib\net472\AWSSDK.Core.dll" $sdkassembly = [System.Reflection.Assembly]::LoadFrom($dllpath) $completed = $FALSE diff --git a/sdk/src/Core/AWSSDK.Core.NetFramework.csproj b/sdk/src/Core/AWSSDK.Core.NetFramework.csproj index a6c535e48f87..5e8f36044fc1 100644 --- a/sdk/src/Core/AWSSDK.Core.NetFramework.csproj +++ b/sdk/src/Core/AWSSDK.Core.NetFramework.csproj @@ -2,7 +2,7 @@ true net472 - DEBUG;TRACE;BCL;AWS_ASYNC_API;CODE_ANALYSIS + DEBUG;TRACE;BCL;CODE_ANALYSIS portable true AWSSDK.Core diff --git a/sdk/src/Core/AWSSDK.Core.NetStandard.csproj b/sdk/src/Core/AWSSDK.Core.NetStandard.csproj index 598b70850dcf..378dbadec69c 100644 --- a/sdk/src/Core/AWSSDK.Core.NetStandard.csproj +++ b/sdk/src/Core/AWSSDK.Core.NetStandard.csproj @@ -2,7 +2,7 @@ true netstandard2.0;netcoreapp3.1;net8.0 - $(DefineConstants);NETSTANDARD;AWS_ASYNC_API + $(DefineConstants);NETSTANDARD $(DefineConstants);NETSTANDARD20;AWS_ASYNC_ENUMERABLES_API $(DefineConstants);AWS_ASYNC_ENUMERABLES_API $(DefineConstants);AWS_ASYNC_ENUMERABLES_API diff --git a/sdk/src/Core/Amazon.Runtime/AmazonServiceClient.cs b/sdk/src/Core/Amazon.Runtime/AmazonServiceClient.cs index 0b514e1bdc50..08318677973f 100644 --- a/sdk/src/Core/Amazon.Runtime/AmazonServiceClient.cs +++ b/sdk/src/Core/Amazon.Runtime/AmazonServiceClient.cs @@ -219,8 +219,6 @@ protected TResponse Invoke(AmazonWebServiceRequest request, InvokeOpt return response; } -#if AWS_ASYNC_API - protected System.Threading.Tasks.Task InvokeAsync( AmazonWebServiceRequest request, InvokeOptionsBase options, @@ -249,7 +247,6 @@ protected System.Threading.Tasks.Task InvokeAsync( SetupCSMHandler(executionContext.RequestContext); return this.RuntimePipeline.InvokeAsync(executionContext); } -#endif protected virtual IEnumerable EndpointOperation(EndpointOperationContextBase context) { return null; } diff --git a/sdk/src/Core/Amazon.Runtime/CSM/CSMUtilities.cs b/sdk/src/Core/Amazon.Runtime/CSM/CSMUtilities.cs index 81983773851e..6881496f47da 100644 --- a/sdk/src/Core/Amazon.Runtime/CSM/CSMUtilities.cs +++ b/sdk/src/Core/Amazon.Runtime/CSM/CSMUtilities.cs @@ -21,9 +21,7 @@ using System.Text; using System.Text.RegularExpressions; using System.IO; -#if AWS_ASYNC_API using System.Threading.Tasks; -#endif using System.Text.Json; namespace Amazon.Runtime.Internal @@ -35,7 +33,7 @@ namespace Amazon.Runtime.Internal public static class CSMUtilities { private const string requestKey = "Request"; -#if AWS_ASYNC_API + public static Task SerializetoJsonAndPostOverUDPAsync(MonitoringAPICall monitoringAPICall) { var monitoringAPICallAttempt = monitoringAPICall as MonitoringAPICallAttempt; @@ -55,27 +53,7 @@ public static Task SerializetoJsonAndPostOverUDPAsync(MonitoringAPICall monitori } return Task.FromResult(0); } -#else - public static void BeginSerializetoJsonAndPostOverUDP(MonitoringAPICall monitoringAPICall) - { - string response = string.Empty; - var monitoringAPICallAttempt = monitoringAPICall as MonitoringAPICallAttempt; - if (monitoringAPICallAttempt != null) - { - if (CreateUDPMessage(monitoringAPICallAttempt, out response)) - { - MonitoringListener.Instance.BeginPostMessagesOverUDPInvoke(response); - } - } - else - { - if (CreateUDPMessage((MonitoringAPICallEvent)monitoringAPICall, out response)) - { - MonitoringListener.Instance.BeginPostMessagesOverUDPInvoke(response); - } - } - } -#endif + public static void SerializetoJsonAndPostOverUDP(MonitoringAPICall monitoringAPICall) { string response = string.Empty; diff --git a/sdk/src/Core/Amazon.Runtime/CSM/MonitoringListener.cs b/sdk/src/Core/Amazon.Runtime/CSM/MonitoringListener.cs index 24f719c27f56..6a1414246cd0 100644 --- a/sdk/src/Core/Amazon.Runtime/CSM/MonitoringListener.cs +++ b/sdk/src/Core/Amazon.Runtime/CSM/MonitoringListener.cs @@ -17,9 +17,7 @@ using System.Net; using System.Net.Sockets; using System.Text; -#if AWS_ASYNC_API using System.Threading.Tasks; -#endif using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Util; @@ -82,7 +80,6 @@ public void PostMessagesOverUDP(string response) /// /// Method to post UDP datagram for async calls /// -#if AWS_ASYNC_API public async Task PostMessagesOverUDPAsync(string response) { try @@ -97,42 +94,6 @@ await _udpClient.SendAsync(Encoding.UTF8.GetBytes(response), } } - /// - /// Method to post UDP datagram for bcl35 async calls - /// -#else - public void BeginPostMessagesOverUDPInvoke(string response) - { - try - { - _udpClient.BeginSend(Encoding.UTF8.GetBytes(response), - Encoding.UTF8.GetBytes(response).Length, _host, _port, new AsyncCallback(EndSendMessagesOverUDPInvoke), _udpClient); - } - catch (Exception e) - { - // If UDP post fails, the errors is logged and is returned without rethrowing the exception - logger.InfoFormat("Error when posting UDP datagrams. " + e.Message); - } - } - - private void EndSendMessagesOverUDPInvoke(IAsyncResult ar) - { - try - { - var udpClient = (UdpClient)ar.AsyncState; - if (!ar.IsCompleted) - { - ar.AsyncWaitHandle.WaitOne(); - } - udpClient.EndSend(ar); - } - catch (Exception e) - { - // If UDP post fails, the errors is logged and is returned without rethrowing the exception - logger.InfoFormat("Error when posting UDP datagrams. " + e.Message); - } - } -#endif private bool _disposed; public void Dispose() { diff --git a/sdk/src/Core/Amazon.Runtime/CredentialManagement/SharedCredentialsFile.cs b/sdk/src/Core/Amazon.Runtime/CredentialManagement/SharedCredentialsFile.cs index 06cd7c0d770d..bb4f039394c6 100644 --- a/sdk/src/Core/Amazon.Runtime/CredentialManagement/SharedCredentialsFile.cs +++ b/sdk/src/Core/Amazon.Runtime/CredentialManagement/SharedCredentialsFile.cs @@ -827,18 +827,6 @@ private bool TryGetProfile(string profileName, bool doRefresh, bool isSsoSession AccountIdEndpointMode? accountIdEndpointMode = null; if (reservedProperties.TryGetValue(AccountIdEndpointModeField, out var accountIdEndpointModeString)) { -#if BCL35 - try - { - accountIdEndpointMode = (AccountIdEndpointMode)Enum.Parse(typeof(AccountIdEndpointMode), accountIdEndpointModeString, true); - } - catch (Exception) - { - _logger.InfoFormat("Invalid value {0} for {1} in profile {2}. A string preferred/disabled/required is expected.", accountIdEndpointModeString, AccountIdEndpointModeField, profileName); - profile = null; - return false; - } -#else if (!Enum.TryParse(accountIdEndpointModeString, true, out var accountIdEndpointModeTemp)) { _logger.InfoFormat("Invalid value {0} for {1} in profile {2}. A string preferred/disabled/required is expected.", accountIdEndpointModeString, AccountIdEndpointModeField, profileName); @@ -846,24 +834,11 @@ private bool TryGetProfile(string profileName, bool doRefresh, bool isSsoSession return false; } accountIdEndpointMode = accountIdEndpointModeTemp; -#endif } RequestChecksumCalculation? requestChecksumCalculation = null; if (reservedProperties.TryGetValue(RequestChecksumCalculationField, out var requestChecksumCalculationString)) { -#if BCL35 - try - { - requestChecksumCalculation = (RequestChecksumCalculation)Enum.Parse(typeof(RequestChecksumCalculation), requestChecksumCalculationString, true); - } - catch (Exception) - { - _logger.InfoFormat("Invalid value {0} for {1} in profile {2}. A string WHEN_SUPPORTED or WHEN_REQUIRED is expected.", requestChecksumCalculationString, RequestChecksumCalculationField, profileName); - profile = null; - return false; - } -#else if (!Enum.TryParse(requestChecksumCalculationString, true, out var requestChecksumCalculationTemp)) { _logger.InfoFormat("Invalid value {0} for {1} in profile {2}. A string WHEN_SUPPORTED or WHEN_REQUIRED is expected.", requestChecksumCalculationString, RequestChecksumCalculationField, profileName); @@ -871,24 +846,11 @@ private bool TryGetProfile(string profileName, bool doRefresh, bool isSsoSession return false; } requestChecksumCalculation = requestChecksumCalculationTemp; -#endif } ResponseChecksumValidation? responseChecksumValidation = null; if (reservedProperties.TryGetValue(ResponseChecksumValidationField, out var responseChecksumValidationString)) { -#if BCL35 - try - { - responseChecksumValidation = (ResponseChecksumValidation)Enum.Parse(typeof(ResponseChecksumValidation), responseChecksumValidationString, true); - } - catch (Exception) - { - _logger.InfoFormat("Invalid value {0} for {1} in profile {2}. A string WHEN_SUPPORTED or WHEN_REQUIRED is expected.", responseChecksumValidationString, ResponseChecksumValidationField, profileName); - profile = null; - return false; - } -#else if (!Enum.TryParse(responseChecksumValidationString, true, out var responseChecksumValidationTemp)) { _logger.InfoFormat("Invalid value {0} for {1} in profile {2}. A string WHEN_SUPPORTED or WHEN_REQUIRED is expected.", responseChecksumValidationString, ResponseChecksumValidationField, profileName); @@ -896,7 +858,6 @@ private bool TryGetProfile(string profileName, bool doRefresh, bool isSsoSession return false; } responseChecksumValidation = responseChecksumValidationTemp; -#endif } profile = new CredentialProfile(profileName, profileOptions) { diff --git a/sdk/src/Core/Amazon.Runtime/Credentials/DefaultInstanceProfileAWSCredentials.cs b/sdk/src/Core/Amazon.Runtime/Credentials/DefaultInstanceProfileAWSCredentials.cs index f625fce5d241..af7743925ee8 100644 --- a/sdk/src/Core/Amazon.Runtime/Credentials/DefaultInstanceProfileAWSCredentials.cs +++ b/sdk/src/Core/Amazon.Runtime/Credentials/DefaultInstanceProfileAWSCredentials.cs @@ -18,9 +18,7 @@ using System; using System.Globalization; using System.Threading; -#if AWS_ASYNC_API using System.Threading.Tasks; -#endif namespace Amazon.Runtime { diff --git a/sdk/src/Core/Amazon.Runtime/Credentials/Internal/_bcl+netstandard/SSOTokenFileCache.cs b/sdk/src/Core/Amazon.Runtime/Credentials/Internal/_bcl+netstandard/SSOTokenFileCache.cs index 3303a2b1b06f..016625a76e4e 100644 --- a/sdk/src/Core/Amazon.Runtime/Credentials/Internal/_bcl+netstandard/SSOTokenFileCache.cs +++ b/sdk/src/Core/Amazon.Runtime/Credentials/Internal/_bcl+netstandard/SSOTokenFileCache.cs @@ -18,10 +18,8 @@ using System.IO; using System.Text; using Amazon.Runtime.CredentialManagement; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif using Amazon.Runtime.Internal.Util; using Amazon.Util; using Amazon.Util.Internal; @@ -45,8 +43,6 @@ public interface ISSOTokenFileCache /// List ScanSsoTokens(string ssoCacheDirectory); - -#if AWS_ASYNC_API /// /// Tries to load a from the SSO File Cache. /// @@ -86,7 +82,6 @@ public interface ISSOTokenFileCache /// Cancels the operation /// Task> ScanSsoTokensAsync(string ssoCacheDirectory, CancellationToken cancellationToken = default); -#endif } [SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Try methods intentionally suppress all Exceptions")] diff --git a/sdk/src/Core/Amazon.Runtime/Credentials/Internal/_bcl+netstandard/SSOTokenManager.cs b/sdk/src/Core/Amazon.Runtime/Credentials/Internal/_bcl+netstandard/SSOTokenManager.cs index 9e4dfb1cf3a9..f790b7a24328 100644 --- a/sdk/src/Core/Amazon.Runtime/Credentials/Internal/_bcl+netstandard/SSOTokenManager.cs +++ b/sdk/src/Core/Amazon.Runtime/Credentials/Internal/_bcl+netstandard/SSOTokenManager.cs @@ -35,11 +35,9 @@ public interface ISSOTokenManager #endif -#if AWS_ASYNC_API Task GetTokenAsync(SSOTokenManagerGetTokenOptions options, CancellationToken cancellationToken = default); Task LogoutAsync(string ssoCacheDirectory = null, CancellationToken cancellationToken = default); Task LogoutAsync(SSOTokenManagerGetTokenOptions options, CancellationToken cancellationToken = default); -#endif } public class SSOTokenManager : ISSOTokenManager { @@ -107,8 +105,6 @@ private static string BuildCacheKey(SSOTokenManagerGetTokenOptions options) } } -#if BCL || AWS_ASYNC_API - private class RefreshState { public bool FailedLastRefreshAttempt { get; set; } @@ -128,7 +124,6 @@ private class CacheState public SsoToken Token { get; set; } public RefreshState RefreshState { get; set; } } -#endif #if BCL public SsoToken GetToken(SSOTokenManagerGetTokenOptions options) @@ -387,7 +382,6 @@ private SsoToken GenerateNewToken(SSOTokenManagerGetTokenOptions options) #endif -#if AWS_ASYNC_API public async Task GetTokenAsync(SSOTokenManagerGetTokenOptions options, CancellationToken cancellationToken = default) { CacheState inMemoryToken = null; @@ -681,7 +675,6 @@ private static List GetEmptySSOTokenOptions(SSOTokenManagerGetTokenOptio return emptyProperties; } -#endif private static SsoToken MapGetSsoTokenResponseToSsoToken(GetSsoTokenResponse response, string session) { diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Auth/AbstractAWSSigner.cs b/sdk/src/Core/Amazon.Runtime/Internal/Auth/AbstractAWSSigner.cs index 63e0a87026d5..7afd8fe2286e 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Auth/AbstractAWSSigner.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Auth/AbstractAWSSigner.cs @@ -105,7 +105,6 @@ protected static string ComputeHash(byte[] data, string secretkey, SigningAlgori public abstract void Sign(IRequest request, IClientConfig clientConfig, RequestMetrics metrics, BaseIdentity identity); -#if AWS_ASYNC_API public virtual System.Threading.Tasks.Task SignAsync( IRequest request, IClientConfig clientConfig, @@ -120,7 +119,6 @@ public virtual System.Threading.Tasks.Task SignAsync( return Task.FromResult(0); #endif } -#endif public abstract ClientProtocol Protocol { get; } diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Auth/BearerTokenSigner.cs b/sdk/src/Core/Amazon.Runtime/Internal/Auth/BearerTokenSigner.cs index 744b23fdf5ba..8d13e865ec11 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Auth/BearerTokenSigner.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Auth/BearerTokenSigner.cs @@ -14,11 +14,8 @@ */ using System; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; - -#endif using Amazon.Runtime.Identity; using Amazon.Runtime.Internal.Util; diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Auth/ISigner.cs b/sdk/src/Core/Amazon.Runtime/Internal/Auth/ISigner.cs index 818c601900c3..582f918c4709 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Auth/ISigner.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Auth/ISigner.cs @@ -13,10 +13,8 @@ * permissions and limitations under the License. */ -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif using Amazon.Runtime.Internal.Util; using Amazon.Runtime.Identity; diff --git a/sdk/src/Core/Amazon.Runtime/Internal/EndpointDiscoveryResolver.cs b/sdk/src/Core/Amazon.Runtime/Internal/EndpointDiscoveryResolver.cs index d1427d07702f..aa5c70e8d6f1 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/EndpointDiscoveryResolver.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/EndpointDiscoveryResolver.cs @@ -79,20 +79,11 @@ public virtual IEnumerable ResolveEndpoints(EndpointOpera { if (refreshCache) { - //Async fetch new endpoints because one or more of the endpoints in the cache have expired. -#if AWS_ASYNC_API - // Task only exists in framework 4.5 and up, and Standard. + //Async fetch new endpoints because one or more of the endpoints in the cache have expired. System.Threading.Tasks.Task.Run(() => { ProcessInvokeEndpointOperation(cacheKey, InvokeEndpointOperation, false); }); -#else - // ThreadPool only exists in 3.5 and below. These implementations do not have the Task library. - System.Threading.ThreadPool.QueueUserWorkItem((state) => - { - ProcessInvokeEndpointOperation(cacheKey, InvokeEndpointOperation, false); - }); -#endif } return endpoints; @@ -112,19 +103,11 @@ public virtual IEnumerable ResolveEndpoints(EndpointOpera else if (_config.EndpointDiscoveryEnabled) { //Optionally find and endpoint for this supported operation async -#if AWS_ASYNC_API - // Task only exists in framework 4.5 and up, and Standard. System.Threading.Tasks.Task.Run(() => { ProcessInvokeEndpointOperation(cacheKey, InvokeEndpointOperation, false); }); -#else - // ThreadPool only exists in 3.5 and below. These implementations do not have the Task library. - System.Threading.ThreadPool.QueueUserWorkItem((state) => - { - ProcessInvokeEndpointOperation(cacheKey, InvokeEndpointOperation, false); - }); -#endif + return null; } //else not required or endpoint discovery has been disabled so fall through to normal regional endpoint diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Transform/IWebResponseData.cs b/sdk/src/Core/Amazon.Runtime/Internal/Transform/IWebResponseData.cs index ad0816898a23..1bf934618009 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Transform/IWebResponseData.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Transform/IWebResponseData.cs @@ -38,8 +38,6 @@ public interface IHttpResponseBody : IDisposable { Stream OpenResponse(); -#if AWS_ASYNC_API System.Threading.Tasks.Task OpenResponseAsync(); -#endif } } diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Transform/_bcl/HttpWebRequestResponseData.cs b/sdk/src/Core/Amazon.Runtime/Internal/Transform/_bcl/HttpWebRequestResponseData.cs index e016e558ad5d..dd44e36be366 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Transform/_bcl/HttpWebRequestResponseData.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Transform/_bcl/HttpWebRequestResponseData.cs @@ -156,14 +156,14 @@ public Stream OpenResponse() return _response.GetResponseStream(); } -#if AWS_ASYNC_API + public System.Threading.Tasks.Task OpenResponseAsync() { // There is no GetResponseStreamAsync on HttpWebResponse so just // reuse the sync version. return System.Threading.Tasks.Task.FromResult(OpenResponse()); } -#endif + public void Dispose() { Dispose(true); diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Util/CachingWrapperStream.cs b/sdk/src/Core/Amazon.Runtime/Internal/Util/CachingWrapperStream.cs index 96a3ccf1945e..4767b1f66fd3 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Util/CachingWrapperStream.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Util/CachingWrapperStream.cs @@ -24,10 +24,8 @@ using System.Linq; using System.Text; using Amazon.Runtime; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Runtime.Internal.Util { @@ -95,14 +93,12 @@ public override int Read(byte[] buffer, int offset, int count) return numberOfBytesRead; } -#if AWS_ASYNC_API public override async Task ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) { var numberOfBytesRead = await base.ReadAsync(buffer, offset, count, cancellationToken).ConfigureAwait(false); UpdateCacheAfterReading(buffer, offset, numberOfBytesRead); return numberOfBytesRead; } -#endif private void UpdateCacheAfterReading(byte[] buffer, int offset, int numberOfBytesRead) { diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Util/ChunkedUploadWrapperStream.cs b/sdk/src/Core/Amazon.Runtime/Internal/Util/ChunkedUploadWrapperStream.cs index 975092964c81..01ab2da21cae 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Util/ChunkedUploadWrapperStream.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Util/ChunkedUploadWrapperStream.cs @@ -22,10 +22,8 @@ using System.Security.Cryptography; using System.Collections.Generic; using System.Linq; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Runtime.Internal.Util { @@ -207,7 +205,6 @@ private int AdjustBufferAfterReading(byte[] buffer, int offset, int count, int b return count; } -#if AWS_ASYNC_API public override async Task ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) { int bytesRead = 0; @@ -283,7 +280,6 @@ private async Task FillInputBufferAsync(CancellationToken cancellationToken return inputBufferPos; } -#endif /// /// Results of the header-signing portion of the request when using SigV4 signing diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Util/CompressionWrapperStream.cs b/sdk/src/Core/Amazon.Runtime/Internal/Util/CompressionWrapperStream.cs index 0ec3a387e88c..319430233fed 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Util/CompressionWrapperStream.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Util/CompressionWrapperStream.cs @@ -18,9 +18,7 @@ using System.IO; using System.Threading; using System; -#if AWS_ASYNC_API using System.Threading.Tasks; -#endif namespace Amazon.Runtime.Internal.Util { @@ -124,8 +122,6 @@ public override int Read(byte[] buffer, int offset, int count) } } - -#if AWS_ASYNC_API /// /// Reads a sequence of bytes from the current stream and compresses it. The compressed bytes /// are written into internal buffer . If the count of compressed bytes @@ -186,8 +182,6 @@ public override async Task ReadAsync(byte[] buffer, int offset, int count, return await _outputBufferStream.ReadAsync(buffer, offset, count).ConfigureAwait(false); } } -#endif - #if !NETSTANDARD /// diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Util/DecryptStream.cs b/sdk/src/Core/Amazon.Runtime/Internal/Util/DecryptStream.cs index 3fda9d02ad0e..4c63ac833bc2 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Util/DecryptStream.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Util/DecryptStream.cs @@ -24,10 +24,8 @@ using System.IO; using Amazon.Runtime; using System.Security.Cryptography; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Runtime.Internal.Util { @@ -88,7 +86,6 @@ public override int Read(byte[] buffer, int offset, int count) return result; } -#if AWS_ASYNC_API /// /// Asynchronously reads a sequence of bytes from the current stream and advances /// the position within the stream by the number of bytes read. @@ -119,7 +116,6 @@ public override async Task ReadAsync(byte[] buffer, int offset, int count, int result = await this.CryptoStream.ReadAsync(buffer, offset, count, cancellationToken).ConfigureAwait(false); return result; } -#endif #if BCL public override void Close() diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Util/EncryptStream.cs b/sdk/src/Core/Amazon.Runtime/Internal/Util/EncryptStream.cs index 6e730b7ced31..c2f7c46df015 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Util/EncryptStream.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Util/EncryptStream.cs @@ -25,10 +25,8 @@ using Amazon.Runtime; using System.Collections; using System.Diagnostics; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Runtime.Internal.Util { @@ -98,7 +96,6 @@ public override int Read(byte[] buffer, int offset, int count) return Append(buffer, offset, previousPosition, readBytes); } -#if AWS_ASYNC_API /// /// Asynchronously reads a sequence of bytes from the current stream, advances /// the position within the stream by the number of bytes read, and monitors @@ -137,7 +134,6 @@ public override async Task ReadAsync(byte[] buffer, int offset, int count, return Append(buffer, offset, previousPosition, readBytes); } -#endif private int Append(byte[] buffer, int offset, long previousPosition, int readBytes) { diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Util/EncryptUploadPartStream.cs b/sdk/src/Core/Amazon.Runtime/Internal/Util/EncryptUploadPartStream.cs index dbfdea984a34..148e2b6e8d15 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Util/EncryptUploadPartStream.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Util/EncryptUploadPartStream.cs @@ -23,10 +23,8 @@ using System; using System.IO; using Amazon.Runtime; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Runtime.Internal.Util { @@ -89,7 +87,6 @@ public override int Read(byte[] buffer, int offset, int count) return Append(buffer, offset, readBytes); } -#if AWS_ASYNC_API /// /// Asynchronously reads a sequence of bytes from the current stream, advances /// the position within the stream by the number of bytes read, and monitors @@ -122,7 +119,6 @@ public override async Task ReadAsync(byte[] buffer, int offset, int count, int readBytes = await base.ReadAsync(buffer, offset, count, cancellationToken).ConfigureAwait(false); return Append(buffer, offset, readBytes); } -#endif private int Append(byte[] buffer, int offset, int readBytes) { diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Util/EventStream.cs b/sdk/src/Core/Amazon.Runtime/Internal/Util/EventStream.cs index 3b9845db6e47..5fcc4a22efab 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Util/EventStream.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Util/EventStream.cs @@ -19,9 +19,7 @@ using System.Linq; using System.Text; using System.Threading; -#if AWS_ASYNC_API using System.Threading.Tasks; -#endif namespace Amazon.Runtime.Internal.Util { @@ -123,8 +121,6 @@ public override void WriteByte(byte value) throw new NotImplementedException(); } - -#if AWS_ASYNC_API public override Task FlushAsync(CancellationToken cancellationToken) { return BaseStream.FlushAsync(cancellationToken); @@ -145,7 +141,6 @@ public override Task WriteAsync(byte[] buffer, int offset, int count, Cancellati { throw new NotImplementedException(); } -#endif #if !NETSTANDARD public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, Object state) diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Util/HashStream.cs b/sdk/src/Core/Amazon.Runtime/Internal/Util/HashStream.cs index 520121cc4831..fd32b41ef8ed 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Util/HashStream.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Util/HashStream.cs @@ -23,10 +23,8 @@ using Amazon.Util.Internal; using System; using System.IO; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Runtime.Internal.Util { @@ -158,7 +156,6 @@ public override int Read(byte[] buffer, int offset, int count) return result; } -#if AWS_ASYNC_API /// /// Asynchronously reads a sequence of bytes from the current stream, advances /// the position within the stream by the number of bytes read, and monitors @@ -203,7 +200,6 @@ public async override Task ReadAsync(byte[] buffer, int offset, int count, } return result; } -#endif #if !NETSTANDARD /// diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Util/MultiValueHeaderParser.cs b/sdk/src/Core/Amazon.Runtime/Internal/Util/MultiValueHeaderParser.cs index c80675f4cbda..028d4b5ca3de 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Util/MultiValueHeaderParser.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Util/MultiValueHeaderParser.cs @@ -249,18 +249,5 @@ private static int AdvanceIndexIfComma(byte[] input, int index) throw new ArgumentException($"Expected delimiter `{Delimiter}` in input data at index {index}."); } } - -#if BCL35 - private class Tuple - { - internal T1 Item1 { get; private set; } - internal T2 Item2 { get; private set; } - internal Tuple(T1 item1, T2 item2) - { - Item1 = item1; - Item2 = item2; - } - } -#endif } } diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Util/PartialWrapperStream.cs b/sdk/src/Core/Amazon.Runtime/Internal/Util/PartialWrapperStream.cs index 8e17ca02dd7a..ff33193458f9 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Util/PartialWrapperStream.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Util/PartialWrapperStream.cs @@ -24,10 +24,8 @@ using System.Collections.Generic; using System.IO; using System.Text; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Runtime.Internal.Util { @@ -153,7 +151,6 @@ public override void WriteByte(byte value) throw new NotSupportedException(); } -#if AWS_ASYNC_API /// /// Asynchronously reads a sequence of bytes from the current stream, advances /// the position within the stream by the number of bytes read, and monitors @@ -210,7 +207,6 @@ public override Task WriteAsync(byte[] buffer, int offset, int count, Cancellati { throw new NotSupportedException(); } -#endif #if !NETSTANDARD public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, Object state) diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Util/ReadOnlyWrapperStream.cs b/sdk/src/Core/Amazon.Runtime/Internal/Util/ReadOnlyWrapperStream.cs index 74d3c7dd96cb..94e385ed3af0 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Util/ReadOnlyWrapperStream.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Util/ReadOnlyWrapperStream.cs @@ -22,10 +22,8 @@ using System; using System.IO; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Runtime.Internal.Util { @@ -102,7 +100,6 @@ public override void Flush() throw new NotSupportedException(); } -#if AWS_ASYNC_API /// /// Asynchronously clears all buffers for this stream and causes any buffered data /// to be written to the underlying device. @@ -140,7 +137,6 @@ public override Task WriteAsync(byte[] buffer, int offset, int count, Cancellati { throw new NotSupportedException(); } -#endif #endregion } @@ -182,7 +178,6 @@ public override int Read(byte[] buffer, int offset, int count) return result; } -#if AWS_ASYNC_API public override async Task ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) { int bytesToRead = count < this.RemainingSize ? count : (int)this.RemainingSize; @@ -193,7 +188,6 @@ public override async Task ReadAsync(byte[] buffer, int offset, int count, _currentPosition += result; return result; } -#endif public override long Length { diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Util/StringUtils.cs b/sdk/src/Core/Amazon.Runtime/Internal/Util/StringUtils.cs index 7c6134e0d365..880883a4ef40 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Util/StringUtils.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Util/StringUtils.cs @@ -384,17 +384,11 @@ public static string FromValueTypeList(List values) where T : struct } // See https://datatracker.ietf.org/doc/html/rfc7231.html#section-7.1.1.1 // FromDateTimeToRFC822 is compatible with IMF-fixdate -#if NET35 - else if (typeof(T) == typeof(DateTime)) - { - return string.Join(",", values?.Select(x => FromDateTimeToRFC822((DateTime)(object)x)).ToArray()); - } -#else else if (typeof(T) == typeof(DateTime)) { return string.Join(",", values?.Select(x => FromDateTimeToRFC822((DateTime)(object)x))); } -#endif + return FromList(values?.Select(x => x.ToString())); } diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Util/TrailingHeadersWrapperStream.cs b/sdk/src/Core/Amazon.Runtime/Internal/Util/TrailingHeadersWrapperStream.cs index 16ac6b3efc5d..cc20a9670530 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Util/TrailingHeadersWrapperStream.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Util/TrailingHeadersWrapperStream.cs @@ -21,10 +21,8 @@ using System.Linq; using System.Security.Cryptography; using System.Text; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Runtime.Internal.Util { @@ -98,14 +96,9 @@ public TrailingHeadersWrapperStream( /// that many bytes are not currently available, or zero (0) if the end of the stream has been reached. public override int Read(byte[] buffer, int offset, int count) { -#if AWS_ASYNC_API return ReadInternal(buffer, offset, count, false, CancellationToken.None).GetAwaiter().GetResult(); -#else - return ReadInternal(buffer, offset, count, false); -#endif } -#if AWS_ASYNC_API /// /// Asynchronously reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. /// @@ -120,13 +113,8 @@ public override async Task ReadAsync(byte[] buffer, int offset, int count, { return await ReadInternal(buffer, offset, count, true, cancellationToken).ConfigureAwait(false); } -#endif -#if AWS_ASYNC_API private async Task ReadInternal(byte[] buffer, int offset, int count, bool useAsyncRead, CancellationToken cancellationToken) -#else - private int ReadInternal(byte[] buffer, int offset, int count, bool useAsyncRead) -#endif { var countRemainingForThisRead = count; var countFromPrefix = 0; @@ -151,11 +139,7 @@ private int ReadInternal(byte[] buffer, int offset, int count, bool useAsyncRead } else { -#if AWS_ASYNC_API countFromStream = await base.ReadAsync(thisBuffer, 0, countRemainingForThisRead, cancellationToken).ConfigureAwait(false); -#else - throw new AmazonClientException($"Attempted to call {nameof(TrailingHeadersWrapperStream)}.ReadAsync from an unsupported target platform."); -#endif } // Update rolling checksum for that content, and copy it to the output buffer diff --git a/sdk/src/Core/Amazon.Runtime/Internal/Util/WrapperStream.cs b/sdk/src/Core/Amazon.Runtime/Internal/Util/WrapperStream.cs index 8f02e84e14dd..c4f0590b91ba 100644 --- a/sdk/src/Core/Amazon.Runtime/Internal/Util/WrapperStream.cs +++ b/sdk/src/Core/Amazon.Runtime/Internal/Util/WrapperStream.cs @@ -22,10 +22,8 @@ using System; using System.IO; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Runtime.Internal.Util { @@ -303,7 +301,6 @@ public override void Write(byte[] buffer, int offset, int count) BaseStream.Write(buffer, offset, count); } -#if AWS_ASYNC_API /// /// Asynchronously clears all buffers for this stream and causes any buffered data /// to be written to the underlying device. @@ -373,7 +370,6 @@ public override Task WriteAsync(byte[] buffer, int offset, int count, Cancellati { return BaseStream.WriteAsync(buffer, offset, count, cancellationToken); } -#endif #endregion diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/ErrorHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/ErrorHandler.cs index 825eeb1e52c8..49fbc4d88f5b 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/ErrorHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/ErrorHandler.cs @@ -83,7 +83,6 @@ public override void InvokeSync(IExecutionContext executionContext) } } -#if AWS_ASYNC_API /// /// Handles and processes any exception thrown from underlying handlers. /// @@ -118,7 +117,6 @@ public override async System.Threading.Tasks.Task InvokeAsync(IExecutionCo return null; } -#endif /// /// Disposes the response body. @@ -172,7 +170,6 @@ private bool ProcessException(IExecutionContext executionContext, Exception exce return true; } -#if AWS_ASYNC_API /// /// Processes an exception by invoking a matching exception handler /// for the given exception. @@ -211,6 +208,5 @@ private async System.Threading.Tasks.Task ProcessExceptionAsync(IExecution // No match found, rethrow the original exception. return true; } -#endif } } diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/ExceptionHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/ExceptionHandler.cs index f7714b66b4e7..ef4acafb25bb 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/ExceptionHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/ExceptionHandler.cs @@ -40,12 +40,10 @@ public bool Handle(IExecutionContext executionContext, Exception exception) public abstract bool HandleException(IExecutionContext executionContext, T exception); -#if AWS_ASYNC_API public async System.Threading.Tasks.Task HandleAsync(IExecutionContext executionContext, Exception exception) { return await HandleExceptionAsync(executionContext, exception as T).ConfigureAwait(false); } public abstract System.Threading.Tasks.Task HandleExceptionAsync(IExecutionContext executionContext, T exception); -#endif } } diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/HttpErrorResponseExceptionHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/HttpErrorResponseExceptionHandler.cs index c2ed10c811d3..fb77c1352ee3 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/HttpErrorResponseExceptionHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/HttpErrorResponseExceptionHandler.cs @@ -64,7 +64,6 @@ public override bool HandleException(IExecutionContext executionContext, HttpErr } } -#if AWS_ASYNC_API /// /// Handles an exception for the given execution context. /// @@ -93,9 +92,6 @@ public override async System.Threading.Tasks.Task HandleExceptionAsync(IEx } } - -#endif - /// /// Shared logic for the HandleException and HandleExceptionAsync /// diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/IExceptionHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/IExceptionHandler.cs index 8535325df088..2d5cfe3dc355 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/IExceptionHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/IExceptionHandler.cs @@ -35,7 +35,6 @@ public interface IExceptionHandler /// bool Handle(IExecutionContext executionContext, Exception exception); -#if AWS_ASYNC_API /// /// Handles an exception for the given execution context. /// @@ -48,7 +47,6 @@ public interface IExceptionHandler /// This method can also throw a new exception to replace the original exception. /// System.Threading.Tasks.Task HandleAsync(IExecutionContext executionContext, Exception exception); -#endif } /// diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/_bcl/WebExceptionHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/_bcl/WebExceptionHandler.cs index 2bac1352fcfb..6ba36bf8250b 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/_bcl/WebExceptionHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/ErrorHandler/_bcl/WebExceptionHandler.cs @@ -47,12 +47,9 @@ public override bool HandleException(IExecutionContext executionContext, WebExce throw new AmazonServiceException(message, exception); } - -#if AWS_ASYNC_API public override System.Threading.Tasks.Task HandleExceptionAsync(IExecutionContext executionContext, WebException exception) { return System.Threading.Tasks.Task.FromResult(this.HandleException(executionContext, exception)); } -#endif } } diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/BaseEndpointResolver.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/BaseEndpointResolver.cs index 51e260c21e72..5991a79634aa 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/BaseEndpointResolver.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/BaseEndpointResolver.cs @@ -37,13 +37,11 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext executionContext) { PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif protected virtual void PreInvoke(IExecutionContext executionContext) { diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/CSMHandler/CSMCallAttemptHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/CSMHandler/CSMCallAttemptHandler.cs index 68975a04a976..4e8bfcfd6c7b 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/CSMHandler/CSMCallAttemptHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/CSMHandler/CSMCallAttemptHandler.cs @@ -54,7 +54,6 @@ public override void InvokeSync(IExecutionContext executionContext) } } -#if AWS_ASYNC_API /// /// Calls the PreInvoke and PostInvoke methods before and after calling the next handler /// in the pipeline. @@ -84,7 +83,6 @@ public override async System.Threading.Tasks.Task InvokeAsync(IExecutionCo _ = CSMUtilities.SerializetoJsonAndPostOverUDPAsync(executionContext.RequestContext.CSMCallAttempt); } } -#endif /// /// Method that gets called in the final clause that captures data for each http request diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/CSMHandler/CSMCallEventHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/CSMHandler/CSMCallEventHandler.cs index a7fe307b14fd..3aecbb9be25f 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/CSMHandler/CSMCallEventHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/CSMHandler/CSMCallEventHandler.cs @@ -52,7 +52,6 @@ public override void InvokeSync(IExecutionContext executionContext) } } -#if AWS_ASYNC_API /// /// Calls the PreInvoke and PostInvoke methods before and after calling the next handler /// in the pipeline. @@ -76,7 +75,6 @@ public override async System.Threading.Tasks.Task InvokeAsync(IExecutionCo _ = CSMUtilities.SerializetoJsonAndPostOverUDPAsync(executionContext.RequestContext.CSMCallEvent); } } -#endif /// /// Invoked from the finally block of CSMCallEventHandler's Invoke method. diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/CallbackHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/CallbackHandler.cs index 31491b6999b9..eb88a700c95f 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/CallbackHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/CallbackHandler.cs @@ -46,7 +46,6 @@ public override void InvokeSync(IExecutionContext executionContext) PostInvoke(executionContext); } -#if AWS_ASYNC_API /// /// Calls the PreInvoke and PostInvoke methods before and after calling the next handler /// in the pipeline. @@ -62,7 +61,6 @@ public override async System.Threading.Tasks.Task InvokeAsync(IExecutionCo PostInvoke(executionContext); return response; } -#endif /// /// Executes the OnPreInvoke action as part of pre-invoke. diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/ChecksumHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/ChecksumHandler.cs index a27bc96e1b88..d5d638add640 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/ChecksumHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/ChecksumHandler.cs @@ -37,7 +37,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -51,7 +50,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// Calculates the checksum of the payload of a request, and sets the checksum request header only once. diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/CompressionHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/CompressionHandler.cs index 580acef17206..06f0d19a63d2 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/CompressionHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/CompressionHandler.cs @@ -42,7 +42,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -56,7 +55,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// Handles the logic of compressing the payload of a request. diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/EndpointDiscoveryHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/EndpointDiscoveryHandler.cs index 8da292c04242..5891251456e2 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/EndpointDiscoveryHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/EndpointDiscoveryHandler.cs @@ -63,7 +63,6 @@ public override void InvokeSync(IExecutionContext executionContext) } } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -102,7 +101,6 @@ public override async System.Threading.Tasks.Task InvokeAsync(IExecutionCo throw new AmazonClientException("Neither a response was returned nor an exception was thrown in the Runtime EndpointDiscoveryResolver."); } -#endif /// /// Resolves the endpoint to be used for the current request diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/EndpointResolver.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/EndpointResolver.cs index 8454ce991409..c7a9133928d7 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/EndpointResolver.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/EndpointResolver.cs @@ -35,7 +35,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -49,7 +48,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// Resolves the endpoint to be used for the current request diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/ErrorCallbackHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/ErrorCallbackHandler.cs index af711c1f2aa1..f9ce133cfd85 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/ErrorCallbackHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/ErrorCallbackHandler.cs @@ -45,7 +45,6 @@ public override void InvokeSync(IExecutionContext executionContext) } } -#if AWS_ASYNC_API public override async System.Threading.Tasks.Task InvokeAsync(IExecutionContext executionContext) { try @@ -58,7 +57,6 @@ public override async System.Threading.Tasks.Task InvokeAsync(IExecutionCo throw; } } -#endif /// /// Executes the OnError action if an exception occurs during the diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/Marshaller.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/Marshaller.cs index e975beac0ffd..258f487ee788 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/Marshaller.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/Marshaller.cs @@ -45,7 +45,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -59,7 +58,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// Marshalls the request before calling invoking the next handler. diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/MetricsHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/MetricsHandler.cs index fead5abaddda..ce77ccc3964d 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/MetricsHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/MetricsHandler.cs @@ -68,7 +68,6 @@ public override void InvokeSync(IExecutionContext executionContext) } } -#if AWS_ASYNC_API /// /// Captures the overall execution time and logs final metrics. /// @@ -112,6 +111,5 @@ public override async System.Threading.Tasks.Task InvokeAsync(IExecutionCo span.Dispose(); } } -#endif } } diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/RedirectHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/RedirectHandler.cs index a4219d35d708..8ca5dcbfe2c9 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/RedirectHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/RedirectHandler.cs @@ -41,7 +41,6 @@ public override void InvokeSync(IExecutionContext executionContext) } while (HandleRedirect(executionContext)); } -#if AWS_ASYNC_API /// /// Processes HTTP redirects and reissues the call to the /// redirected location. @@ -59,7 +58,6 @@ public override async System.Threading.Tasks.Task InvokeAsync(IExecutionCo } while (HandleRedirect(executionContext)); return result; } -#endif /// /// Checks if an HTTP 307 (temporary redirect) has occured and changes the diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/_bcl/BindingRedirectCheckHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/_bcl/BindingRedirectCheckHandler.cs index 16b6a2651d68..b64073852e8f 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/_bcl/BindingRedirectCheckHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/_bcl/BindingRedirectCheckHandler.cs @@ -54,7 +54,6 @@ public override void InvokeSync(IExecutionContext executionContext) } } -#if AWS_ASYNC_API /// /// Check FileNotFoundException for binding errors. /// @@ -78,7 +77,6 @@ public override async System.Threading.Tasks.Task InvokeAsync(IExecutionCo throw; } } -#endif public static bool IsBindingException(FileNotFoundException e) { diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/HttpHandler/HttpHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/HttpHandler/HttpHandler.cs index 734e4475342b..3479ef5d8b8f 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/HttpHandler/HttpHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/HttpHandler/HttpHandler.cs @@ -171,7 +171,6 @@ private static void RecordHttpTelemetryData(IExecutionContext executionContext, traceSpan.SetAttribute(TelemetryConstants.HTTPResponseContentLengthAttributeKey, response.ContentLength); } -#if AWS_ASYNC_API /// /// Issues an HTTP request for the current request context. /// @@ -264,7 +263,6 @@ private static async System.Threading.Tasks.Task CompleteFailedRequest(IExecutio iwrd.ResponseBody.Dispose(); } } -#endif private static void SetMetrics(IRequestContext requestContext) { diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/HttpHandler/IHttpRequestFactory.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/HttpHandler/IHttpRequestFactory.cs index e8962c1f0b25..60710ac00cbc 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/HttpHandler/IHttpRequestFactory.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/HttpHandler/IHttpRequestFactory.cs @@ -122,7 +122,6 @@ public interface IHttpRequest : IDisposable /// Version HttpProtocolVersion { get; set; } -#if AWS_ASYNC_API /// /// Gets a handle to the request content. /// @@ -142,8 +141,5 @@ public interface IHttpRequest : IDisposable System.Threading.Tasks.Task WriteToRequestBodyAsync(TRequestContent requestContent, byte[] requestData, IDictionary headers, System.Threading.CancellationToken cancellationToken); #endif - -#endif - } } diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/HttpHandler/_bcl/HttpWebRequestFactory.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/HttpHandler/_bcl/HttpWebRequestFactory.cs index ecb9fe950e78..13de5e0b74b3 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/HttpHandler/_bcl/HttpWebRequestFactory.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/HttpHandler/_bcl/HttpWebRequestFactory.cs @@ -22,10 +22,8 @@ using System.Globalization; using System.IO; using System.Net; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Runtime.Internal { @@ -223,7 +221,6 @@ public IHttpRequestStreamHandle SetupHttpRequestStreamPublisher(IDictionary /// Writes a stream to the request body. /// @@ -380,7 +377,6 @@ public virtual async Task GetResponseAsync(System.Threading.Ca } } } -#endif /// /// Configures a request as per the request context. diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/IPipelineHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/IPipelineHandler.cs index 1d84bed73e75..23bd9d3d1eed 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/IPipelineHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/IPipelineHandler.cs @@ -48,8 +48,6 @@ public partial interface IPipelineHandler /// requests and response context. void InvokeSync(IExecutionContext executionContext); -#if AWS_ASYNC_API - /// /// Contains the processing logic for an asynchronous request invocation. /// This method should call InnerHandler.InvokeSync to continue processing of the @@ -61,6 +59,5 @@ public partial interface IPipelineHandler /// A task that represents the asynchronous operation. System.Threading.Tasks.Task InvokeAsync(IExecutionContext executionContext) where T : AmazonWebServiceResponse, new(); -#endif } } diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/PipelineHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/PipelineHandler.cs index a1c604c7e6d8..81d9abbcfb34 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/PipelineHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/PipelineHandler.cs @@ -60,8 +60,6 @@ public virtual void InvokeSync(IExecutionContext executionContext) throw new InvalidOperationException("Cannot invoke InnerHandler. InnerHandler is not set."); } -#if AWS_ASYNC_API - /// /// Contains the processing logic for an asynchronous request invocation. /// This method calls InnerHandler.InvokeSync to continue processing of the @@ -83,7 +81,6 @@ public virtual System.Threading.Tasks.Task InvokeAsync(IExecutionContext e } throw new InvalidOperationException("Cannot invoke InnerHandler. InnerHandler is not set."); } -#endif /// /// Logs the metrics for the current execution context. diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/RetryHandler/RetryHandler.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/RetryHandler/RetryHandler.cs index 17b98526c1e2..65b977ddb1c0 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/RetryHandler/RetryHandler.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/RetryHandler/RetryHandler.cs @@ -118,8 +118,6 @@ public override void InvokeSync(IExecutionContext executionContext) } while (shouldRetry); } -#if AWS_ASYNC_API - /// /// Invokes the inner handler and performs a retry, if required as per the /// retry policy. @@ -189,8 +187,6 @@ public override async System.Threading.Tasks.Task InvokeAsync(IExecutionCo throw new AmazonClientException("Neither a response was returned nor an exception was thrown in the Runtime RetryHandler."); } -#endif - /// /// Prepares the request for retry. /// diff --git a/sdk/src/Core/Amazon.Runtime/Pipeline/RuntimePipeline.cs b/sdk/src/Core/Amazon.Runtime/Pipeline/RuntimePipeline.cs index 0a98f33db0ce..d7f101fcf8c4 100644 --- a/sdk/src/Core/Amazon.Runtime/Pipeline/RuntimePipeline.cs +++ b/sdk/src/Core/Amazon.Runtime/Pipeline/RuntimePipeline.cs @@ -136,7 +136,6 @@ public IResponseContext InvokeSync(IExecutionContext executionContext) return executionContext.ResponseContext; } -#if AWS_ASYNC_API /// /// Invokes the pipeline asynchronously. /// @@ -149,7 +148,6 @@ public System.Threading.Tasks.Task InvokeAsync(IExecutionContext execution return _handler.InvokeAsync(executionContext); } -#endif #endregion diff --git a/sdk/src/Core/Amazon.Runtime/SharedInterfaces/ICoreAmazonSQS.cs b/sdk/src/Core/Amazon.Runtime/SharedInterfaces/ICoreAmazonSQS.cs index 4535e37a0c63..4e328df75065 100644 --- a/sdk/src/Core/Amazon.Runtime/SharedInterfaces/ICoreAmazonSQS.cs +++ b/sdk/src/Core/Amazon.Runtime/SharedInterfaces/ICoreAmazonSQS.cs @@ -24,14 +24,13 @@ public interface ICoreAmazonSQS /// The attributes for the queue. Dictionary GetAttributes(string queueUrl); #endif -#if AWS_ASYNC_API + /// /// Get the attributes for the queue identified by the queue URL asynchronously. /// /// The queue URL to get attributes for. /// A Task containing the result of a dictionary of attributes for the queue. System.Threading.Tasks.Task> GetAttributesAsync(string queueUrl); -#endif #if BCL /// @@ -45,7 +44,7 @@ public interface ICoreAmazonSQS /// The attributes to set. void SetAttributes(string queueUrl, Dictionary attributes); #endif -#if AWS_ASYNC_API + /// /// Set the attributes on the queue identified by the queue URL asynchronously. /// @@ -53,6 +52,5 @@ public interface ICoreAmazonSQS /// The attributes to set. /// A Task System.Threading.Tasks.Task SetAttributesAsync(string queueUrl, Dictionary attributes); -#endif } } diff --git a/sdk/src/Core/Amazon.Runtime/SharedInterfaces/_bcl+netstandard/ICoreAmazonSSO.cs b/sdk/src/Core/Amazon.Runtime/SharedInterfaces/_bcl+netstandard/ICoreAmazonSSO.cs index 3614cfa36698..32e9aa956335 100644 --- a/sdk/src/Core/Amazon.Runtime/SharedInterfaces/_bcl+netstandard/ICoreAmazonSSO.cs +++ b/sdk/src/Core/Amazon.Runtime/SharedInterfaces/_bcl+netstandard/ICoreAmazonSSO.cs @@ -32,9 +32,7 @@ public interface ICoreAmazonSSO #endif -#if AWS_ASYNC_API Task CredentialsFromSsoAccessTokenAsync(string accountId, string roleName, string accessToken, IDictionary additionalProperties); -#endif } /// @@ -50,8 +48,6 @@ public interface ICoreAmazonSSO_Logout #endif -#if AWS_ASYNC_API Task LogoutAsync(string accessToken, CancellationToken cancellationToken = default); -#endif } } diff --git a/sdk/src/Core/Amazon.Runtime/SharedInterfaces/_bcl+netstandard/ICoreAmazonSSOOIDC.cs b/sdk/src/Core/Amazon.Runtime/SharedInterfaces/_bcl+netstandard/ICoreAmazonSSOOIDC.cs index 97712b22b9c7..0c7a86f6aaf8 100644 --- a/sdk/src/Core/Amazon.Runtime/SharedInterfaces/_bcl+netstandard/ICoreAmazonSSOOIDC.cs +++ b/sdk/src/Core/Amazon.Runtime/SharedInterfaces/_bcl+netstandard/ICoreAmazonSSOOIDC.cs @@ -15,10 +15,8 @@ using System; using System.Collections.Generic; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Runtime.SharedInterfaces { @@ -44,7 +42,6 @@ public interface ICoreAmazonSSOOIDC GetSsoTokenResponse GetSsoToken(GetSsoTokenRequest getSsoTokenRequest); #endif -#if AWS_ASYNC_API /// /// /// This method is used internally to access the Amazon SSO OIDC service within other service assemblies. @@ -56,7 +53,6 @@ public interface ICoreAmazonSSOOIDC /// /// Task GetSsoTokenAsync(GetSsoTokenRequest getSsoTokenRequest); -#endif #if BCL /// @@ -72,7 +68,6 @@ public interface ICoreAmazonSSOOIDC GetSsoTokenResponse RefreshToken(GetSsoTokenResponse previousResponse); #endif -#if AWS_ASYNC_API /// /// /// This method is used internally to access the Amazon SSO OIDC service within other service assemblies. @@ -84,7 +79,6 @@ public interface ICoreAmazonSSOOIDC /// /// Task RefreshTokenAsync(GetSsoTokenResponse previousResponse); -#endif } /// @@ -95,7 +89,6 @@ public interface ICoreAmazonSSOOIDC /// public interface ICoreAmazonSSOOIDC_V2 { -#if AWS_ASYNC_API /// /// /// This method is used internally to access the Amazon SSO OIDC service within other service assemblies. @@ -107,7 +100,6 @@ public interface ICoreAmazonSSOOIDC_V2 /// /// Task GetSsoTokenAsync(GetSsoTokenRequest getSsoTokenRequest, CancellationToken cancellationToken); -#endif } /// @@ -149,7 +141,6 @@ public class PkceFlowOptions public Func RetrieveAuthorizationCodeCallback { get; set; } #endif -#if AWS_ASYNC_API /// /// The SDK will construct an authorization URL which the client must send an HTTP GET to retrieve the authorization code (as described in RFC 7636). /// The return value of this delegate will then be used when invoking the CreateToken operation (in addition to the generated code_verifier). @@ -158,7 +149,6 @@ public class PkceFlowOptions /// This callback will only be invoked in the asynchronous code path of the SSO token manager. /// public Func> RetrieveAuthorizationCodeCallbackAsync { get; set; } -#endif } public class GetSsoTokenRequest diff --git a/sdk/src/Core/Amazon.Runtime/TokenBucket.cs b/sdk/src/Core/Amazon.Runtime/TokenBucket.cs index ca35adac0598..9de67f5d222e 100644 --- a/sdk/src/Core/Amazon.Runtime/TokenBucket.cs +++ b/sdk/src/Core/Amazon.Runtime/TokenBucket.cs @@ -148,7 +148,6 @@ public bool TryAcquireToken(double amount, bool failFast) return true; } -#if AWS_ASYNC_API /// /// This method attempts to acquire capacity from the client's token /// @@ -189,7 +188,6 @@ public async System.Threading.Tasks.Task TryAcquireTokenAsync(double amoun return true; } -#endif private bool? SetupAcquireToken(double amount) { @@ -351,12 +349,10 @@ protected virtual void WaitForToken(int delayMs) AWSSDKUtils.Sleep(delayMs); } -#if AWS_ASYNC_API protected virtual async System.Threading.Tasks.Task WaitForTokenAsync(int delayMs, CancellationToken cancellationToken) { await System.Threading.Tasks.Task.Delay(delayMs, cancellationToken).ConfigureAwait(false); } -#endif protected virtual double GetTimestamp() { diff --git a/sdk/src/Core/Amazon.Runtime/Tokens/AWSTokenProviderChain.cs b/sdk/src/Core/Amazon.Runtime/Tokens/AWSTokenProviderChain.cs index 709c3308c6fc..25f4c4edcaaa 100644 --- a/sdk/src/Core/Amazon.Runtime/Tokens/AWSTokenProviderChain.cs +++ b/sdk/src/Core/Amazon.Runtime/Tokens/AWSTokenProviderChain.cs @@ -14,10 +14,8 @@ */ using System.Linq; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Runtime { @@ -49,7 +47,6 @@ public bool TryResolveToken(out AWSToken token) } #endif -#if AWS_ASYNC_API public async Task> TryResolveTokenAsync(CancellationToken cancellationToken = default) { foreach (var provider in _chain) @@ -62,6 +59,5 @@ public async Task> TryResolveTokenAsync(CancellationToken return TryResponse.Failure; } -#endif } } \ No newline at end of file diff --git a/sdk/src/Core/Amazon.Runtime/Tokens/DefaultAWSTokenProviderChain.cs b/sdk/src/Core/Amazon.Runtime/Tokens/DefaultAWSTokenProviderChain.cs index d4abafca5f79..21f58969b255 100644 --- a/sdk/src/Core/Amazon.Runtime/Tokens/DefaultAWSTokenProviderChain.cs +++ b/sdk/src/Core/Amazon.Runtime/Tokens/DefaultAWSTokenProviderChain.cs @@ -14,10 +14,8 @@ */ using System; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Runtime { @@ -69,11 +67,9 @@ public bool TryResolveToken(out AWSToken token) } #endif -#if AWS_ASYNC_API public async Task> TryResolveTokenAsync(CancellationToken cancellationToken = default) { return await _chain.Value.TryResolveTokenAsync(cancellationToken).ConfigureAwait(false); } -#endif } } \ No newline at end of file diff --git a/sdk/src/Core/Amazon.Runtime/Tokens/IAWSTokenProvider.cs b/sdk/src/Core/Amazon.Runtime/Tokens/IAWSTokenProvider.cs index de32838b40c9..295cc8096072 100644 --- a/sdk/src/Core/Amazon.Runtime/Tokens/IAWSTokenProvider.cs +++ b/sdk/src/Core/Amazon.Runtime/Tokens/IAWSTokenProvider.cs @@ -14,10 +14,8 @@ */ using Amazon.Runtime.Internal.Auth; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Runtime { @@ -39,7 +37,6 @@ public interface IAWSTokenProvider bool TryResolveToken(out AWSToken token); #endif -#if AWS_ASYNC_API /// /// Attempts to load an . /// @@ -47,6 +44,5 @@ public interface IAWSTokenProvider /// exception. /// Task> TryResolveTokenAsync(CancellationToken cancellationToken = default); -#endif } } \ No newline at end of file diff --git a/sdk/src/Core/Amazon.Runtime/Tokens/StaticTokenProvider.cs b/sdk/src/Core/Amazon.Runtime/Tokens/StaticTokenProvider.cs index 5560e11a177c..32d0089a6f1e 100644 --- a/sdk/src/Core/Amazon.Runtime/Tokens/StaticTokenProvider.cs +++ b/sdk/src/Core/Amazon.Runtime/Tokens/StaticTokenProvider.cs @@ -1,8 +1,6 @@ using System; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif using Amazon.Util; namespace Amazon.Runtime @@ -55,7 +53,6 @@ public bool TryResolveToken(out AWSToken token) } #endif -#if AWS_ASYNC_API public Task> TryResolveTokenAsync(CancellationToken cancellationToken = default) { var isTokenUnexpired = IsTokenUnexpired(); @@ -67,7 +64,6 @@ public Task> TryResolveTokenAsync(CancellationToken cancel Value = isTokenUnexpired ? new AWSToken { Token = _token, Expiration = _expiration } : null }); } -#endif private bool IsTokenUnexpired() { diff --git a/sdk/src/Core/Amazon.Runtime/TryResponse.cs b/sdk/src/Core/Amazon.Runtime/TryResponse.cs index c8b9aa90014b..e1e02fb2155d 100644 --- a/sdk/src/Core/Amazon.Runtime/TryResponse.cs +++ b/sdk/src/Core/Amazon.Runtime/TryResponse.cs @@ -15,7 +15,6 @@ namespace Amazon.Runtime { -#if AWS_ASYNC_API /// /// Helper class to support a TryGetFoo(out var foo) pattern for async operations. /// This is necessary because async methods do not support output parameters. @@ -30,5 +29,4 @@ public class TryResponse #pragma warning restore CA1000 // Do not declare static members on generic types } -#endif } \ No newline at end of file diff --git a/sdk/src/Core/Amazon.Runtime/_bcl+netstandard/Tokens/ProfileTokenProvider.cs b/sdk/src/Core/Amazon.Runtime/_bcl+netstandard/Tokens/ProfileTokenProvider.cs index cfb2dc77c4d1..574b9a6ddbdc 100644 --- a/sdk/src/Core/Amazon.Runtime/_bcl+netstandard/Tokens/ProfileTokenProvider.cs +++ b/sdk/src/Core/Amazon.Runtime/_bcl+netstandard/Tokens/ProfileTokenProvider.cs @@ -18,10 +18,8 @@ using Amazon.Runtime.Credentials.Internal; using Amazon.Util; using Amazon.Util.Internal; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Runtime { @@ -72,7 +70,6 @@ public bool TryResolveToken(out AWSToken token) } #endif -#if AWS_ASYNC_API public Task> TryResolveTokenAsync(CancellationToken cancellationToken = default) { if (LoadAndValidateProfile(out var profile)) @@ -84,7 +81,6 @@ public Task> TryResolveTokenAsync(CancellationToken cancel return Task.FromResult(TryResponse.Failure); } } -#endif /// /// Loads the from diff --git a/sdk/src/Core/Amazon.Runtime/_bcl+netstandard/Tokens/SSOTokenProvider.cs b/sdk/src/Core/Amazon.Runtime/_bcl+netstandard/Tokens/SSOTokenProvider.cs index c376c95d1fe8..33d4c8af2732 100644 --- a/sdk/src/Core/Amazon.Runtime/_bcl+netstandard/Tokens/SSOTokenProvider.cs +++ b/sdk/src/Core/Amazon.Runtime/_bcl+netstandard/Tokens/SSOTokenProvider.cs @@ -16,10 +16,8 @@ using System; using Amazon.Runtime.Credentials.Internal; using Amazon.Runtime.Internal.Util; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Runtime { @@ -88,7 +86,6 @@ public bool TryResolveToken(out AWSToken token) } #endif -#if AWS_ASYNC_API public async Task> TryResolveTokenAsync(CancellationToken cancellationToken = default) { try @@ -114,7 +111,6 @@ public async Task> TryResolveTokenAsync(CancellationToken throw; } } -#endif private SSOTokenManagerGetTokenOptions BuildSsoTokenManagerGetTokenOptions() { diff --git a/sdk/src/Core/Amazon.Util/AWSSDKUtils.cs b/sdk/src/Core/Amazon.Util/AWSSDKUtils.cs index 826a3ca44047..8d7f57b2edd5 100644 --- a/sdk/src/Core/Amazon.Util/AWSSDKUtils.cs +++ b/sdk/src/Core/Amazon.Util/AWSSDKUtils.cs @@ -38,9 +38,7 @@ using Amazon.Runtime.Endpoints; using ThirdParty.RuntimeBackports; -#if AWS_ASYNC_API using System.Threading.Tasks; -#endif #if NETSTANDARD using System.Net.Http; using System.Runtime.InteropServices; @@ -1683,7 +1681,7 @@ public static ProcessExecutionResult RunProcess(ProcessStartInfo processStartInf }; } } -#if AWS_ASYNC_API + [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")] public static async Task RunProcessAsync(ProcessStartInfo processStartInfo) { @@ -1715,7 +1713,6 @@ public static async Task RunProcessAsync(ProcessStartInf } } -#endif /// /// This method allows to check whether a property of an object returned by a service call diff --git a/sdk/src/Core/Amazon.Util/Internal/FileRetriever.cs b/sdk/src/Core/Amazon.Util/Internal/FileRetriever.cs index c014f690cda5..051867ed2add 100644 --- a/sdk/src/Core/Amazon.Util/Internal/FileRetriever.cs +++ b/sdk/src/Core/Amazon.Util/Internal/FileRetriever.cs @@ -15,10 +15,8 @@ using System; using System.IO; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.Util.Internal { @@ -39,14 +37,10 @@ public interface IFile /// void Delete(string path); - - -#if AWS_ASYNC_API /// Task ReadAllTextAsync(string path, CancellationToken token = default); /// Task WriteAllTextAsync(string path, string contents, CancellationToken token = default); -#endif } /// @@ -58,7 +52,6 @@ public class FileRetriever : IFile public void WriteAllText(string path, string contents) => File.WriteAllText(path, contents); public void Delete(string path) => File.Delete(path); -#if AWS_ASYNC_API public async Task ReadAllTextAsync(string path, CancellationToken token = default) { using (var fs = File.OpenRead(path)) @@ -75,7 +68,6 @@ public async Task WriteAllTextAsync(string path, string contents, CancellationTo await writer.WriteAsync(contents).ConfigureAwait(false); } -#endif } } diff --git a/sdk/src/Services/APIGateway/Custom/Internal/AmazonAPIGatewayPostMarshallHandler.cs b/sdk/src/Services/APIGateway/Custom/Internal/AmazonAPIGatewayPostMarshallHandler.cs index 9791631fcee0..f85a9e5bfc83 100644 --- a/sdk/src/Services/APIGateway/Custom/Internal/AmazonAPIGatewayPostMarshallHandler.cs +++ b/sdk/src/Services/APIGateway/Custom/Internal/AmazonAPIGatewayPostMarshallHandler.cs @@ -35,7 +35,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -49,7 +48,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif protected virtual void PreInvoke(IExecutionContext executionContext) { diff --git a/sdk/src/Services/CloudFormation/Custom/Internal/ProcessRequestHandler.cs b/sdk/src/Services/CloudFormation/Custom/Internal/ProcessRequestHandler.cs index f13047362273..850660754fec 100644 --- a/sdk/src/Services/CloudFormation/Custom/Internal/ProcessRequestHandler.cs +++ b/sdk/src/Services/CloudFormation/Custom/Internal/ProcessRequestHandler.cs @@ -41,7 +41,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -55,7 +54,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// Set NotificationARNs to empty if the collection is empty before continuing on in the pipeline. diff --git a/sdk/src/Services/CognitoIdentity/Custom/CognitoAWSCredentials.cs b/sdk/src/Services/CognitoIdentity/Custom/CognitoAWSCredentials.cs index 79ff72822063..2e9de2f4536d 100644 --- a/sdk/src/Services/CognitoIdentity/Custom/CognitoAWSCredentials.cs +++ b/sdk/src/Services/CognitoIdentity/Custom/CognitoAWSCredentials.cs @@ -361,7 +361,6 @@ protected virtual IdentityState RefreshIdentity() return new IdentityState(identityId, isCached); } -#if AWS_ASYNC_API /// /// Gets the Identity Id corresponding to the credentials retrieved from Cognito. /// Note: this setting may change during execution. To be notified of its @@ -410,8 +409,6 @@ public virtual async System.Threading.Tasks.Task RefreshIdentityA return new IdentityState(identityId, isCached); } -#endif - /// /// Checks the exception from a call that used an identity id and determines if the /// failure was caused by a cached identity id. If it was determined then the cache @@ -539,8 +536,6 @@ public CognitoAWSCredentials( #region Overrides -#if AWS_ASYNC_API - /// /// Retrieves credentials from Cognito Identity and optionally STS /// @@ -657,8 +652,6 @@ private async System.Threading.Tasks.Task GetPoolCreden return credentialsState; } -#endif - /// /// Retrieves credentials from Cognito Identity and optionally STS /// diff --git a/sdk/src/Services/CognitoSync/Custom/Internal/CognitoCredentialsRetriever.cs b/sdk/src/Services/CognitoSync/Custom/Internal/CognitoCredentialsRetriever.cs index 042563def0c0..9b6abb6cfe9d 100644 --- a/sdk/src/Services/CognitoSync/Custom/Internal/CognitoCredentialsRetriever.cs +++ b/sdk/src/Services/CognitoSync/Custom/Internal/CognitoCredentialsRetriever.cs @@ -68,7 +68,6 @@ protected void PreInvoke(IExecutionContext executionContext) } } -#if AWS_ASYNC_API /// /// Continue the request pipeline and copy over the cognito identity id. /// @@ -89,7 +88,6 @@ public override async System.Threading.Tasks.Task InvokeAsync(IExecutionCo return result; } -#endif private static void SetIdentity(IExecutionContext executionContext, string identityId, string identityPoolId) { diff --git a/sdk/src/Services/DSQL/Custom/Util/DSQLAuthTokenGenerator.cs b/sdk/src/Services/DSQL/Custom/Util/DSQLAuthTokenGenerator.cs index e309b04b896e..d2faf80712f0 100644 --- a/sdk/src/Services/DSQL/Custom/Util/DSQLAuthTokenGenerator.cs +++ b/sdk/src/Services/DSQL/Custom/Util/DSQLAuthTokenGenerator.cs @@ -119,7 +119,6 @@ public static string GenerateDbConnectAuthToken(AWSCredentials credentials, Regi return GenerateAuthToken(immutableCredentials, region, hostname, DBConnectActionValue); } -#if AWS_ASYNC_API /// /// Generate a token for IAM authentication to a DSQL database cluster for the DbConnect action. /// @@ -135,8 +134,6 @@ public static async System.Threading.Tasks.Task GenerateDbConnectAuthTok var immutableCredentials = await credentials.GetCredentialsAsync().ConfigureAwait(false); return GenerateAuthToken(immutableCredentials, region, hostname, DBConnectActionValue); } -#endif - /// /// Generate a token for IAM authentication to a DSQL database cluster for the DbConnectAdmin action. @@ -204,7 +201,6 @@ public static string GenerateDbConnectAdminAuthToken(AWSCredentials credentials, return GenerateAuthToken(immutableCredentials, region, hostname, DBConnectAdminActionValue); } -#if AWS_ASYNC_API /// /// Generate a token for IAM authentication to a DSQL database cluster for the DbConnectAdmin action. /// @@ -220,8 +216,6 @@ public static async System.Threading.Tasks.Task GenerateDbConnectAdminAu var immutableCredentials = await credentials.GetCredentialsAsync().ConfigureAwait(false); return GenerateAuthToken(immutableCredentials, region, hostname, DBConnectAdminActionValue); } -#endif - private static string GenerateAuthToken(ImmutableCredentials immutableCredentials, RegionEndpoint region, string hostname, string actionValue) { diff --git a/sdk/src/Services/DocDB/Custom/Internal/PreSignedUrlRequestHandler.cs b/sdk/src/Services/DocDB/Custom/Internal/PreSignedUrlRequestHandler.cs index e893ff4e39a1..1218e217e079 100644 --- a/sdk/src/Services/DocDB/Custom/Internal/PreSignedUrlRequestHandler.cs +++ b/sdk/src/Services/DocDB/Custom/Internal/PreSignedUrlRequestHandler.cs @@ -56,7 +56,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -70,7 +69,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// diff --git a/sdk/src/Services/DynamoDBv2/Custom/DataModel/BatchGet.cs b/sdk/src/Services/DynamoDBv2/Custom/DataModel/BatchGet.cs index a8fc67184a9e..7a191da8f5bb 100644 --- a/sdk/src/Services/DynamoDBv2/Custom/DataModel/BatchGet.cs +++ b/sdk/src/Services/DynamoDBv2/Custom/DataModel/BatchGet.cs @@ -19,12 +19,8 @@ using Amazon.Runtime.Telemetry.Tracing; using System.Diagnostics.CodeAnalysis; using ThirdParty.RuntimeBackports; - - -#if AWS_ASYNC_API -using System.Threading.Tasks; -#endif using System.Threading; +using System.Threading.Tasks; namespace Amazon.DynamoDBv2.DataModel { @@ -184,14 +180,12 @@ private void ExecuteHelper() PopulateResults(DocumentBatch.Results); } -#if AWS_ASYNC_API private async Task ExecuteHelperAsync(CancellationToken cancellationToken) { CreateDocumentBatch(); await DocumentBatch.ExecuteHelperAsync(cancellationToken).ConfigureAwait(false); PopulateResults(DocumentBatch.Results); } -#endif internal override void CreateDocumentBatch() { @@ -308,7 +302,6 @@ private void ExecuteHelper() } } -#if AWS_ASYNC_API private async Task ExecuteHelperAsync(CancellationToken cancellationToken) { MultiTableDocumentBatchGet superBatch = new MultiTableDocumentBatchGet(); @@ -328,7 +321,6 @@ private async Task ExecuteHelperAsync(CancellationToken cancellationToken) abstractBatch.PopulateResults(abstractBatch.DocumentBatch.Results); } } -#endif private TracerProvider GetTracerProvider(List allBatches) { diff --git a/sdk/src/Services/DynamoDBv2/Custom/DataModel/BatchWrite.cs b/sdk/src/Services/DynamoDBv2/Custom/DataModel/BatchWrite.cs index 97f4d59d0ce5..38849a53b4d8 100644 --- a/sdk/src/Services/DynamoDBv2/Custom/DataModel/BatchWrite.cs +++ b/sdk/src/Services/DynamoDBv2/Custom/DataModel/BatchWrite.cs @@ -20,11 +20,8 @@ using Amazon.Runtime.Telemetry.Tracing; using System.Diagnostics.CodeAnalysis; using ThirdParty.RuntimeBackports; - -#if AWS_ASYNC_API -using System.Threading.Tasks; -#endif using System.Threading; +using System.Threading.Tasks; namespace Amazon.DynamoDBv2.DataModel { @@ -209,12 +206,10 @@ private void ExecuteHelper() DocumentBatch.ExecuteHelper(); } -#if AWS_ASYNC_API private Task ExecuteHelperAsync(CancellationToken cancellationToken) { return DocumentBatch.ExecuteHelperAsync(cancellationToken); } -#endif } /// @@ -277,7 +272,6 @@ private void ExecuteHelper() superBatch.ExecuteHelper(); } -#if AWS_ASYNC_API private Task ExecuteHelperAsync(CancellationToken cancellationToken) { MultiTableDocumentBatchWrite superBatch = new MultiTableDocumentBatchWrite(); @@ -289,7 +283,6 @@ private Task ExecuteHelperAsync(CancellationToken cancellationToken) } return superBatch.ExecuteHelperAsync(cancellationToken); } -#endif private TracerProvider GetTracerProvider(List allBatches) { diff --git a/sdk/src/Services/DynamoDBv2/Custom/DataModel/Context.cs b/sdk/src/Services/DynamoDBv2/Custom/DataModel/Context.cs index 57a43bdba112..a3da12717752 100644 --- a/sdk/src/Services/DynamoDBv2/Custom/DataModel/Context.cs +++ b/sdk/src/Services/DynamoDBv2/Custom/DataModel/Context.cs @@ -19,10 +19,7 @@ using System.Linq; using System.Linq.Expressions; using System.Threading; -#if AWS_ASYNC_API using System.Threading.Tasks; - -#endif using Amazon.DynamoDBv2.DocumentModel; using ThirdParty.RuntimeBackports; using Expression = Amazon.DynamoDBv2.DocumentModel.Expression; @@ -411,7 +408,6 @@ public IMultiTableTransactWrite CreateMultiTableTransactWrite(params ITransactWr PopulateInstance(storage, value, flatConfig); } -#if AWS_ASYNC_API private async Task SaveHelperAsync<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType)] T>(T value, DynamoDBFlatConfig flatConfig, CancellationToken cancellationToken) { await SaveHelperAsync(typeof(T), value, flatConfig, cancellationToken).ConfigureAwait(false); @@ -468,7 +464,6 @@ private async Task SaveHelperAsync([DynamicallyAccessedMembers(InternalConstants } PopulateInstance(storage, value, flatConfig); } -#endif /// public Document ToDocument<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType)] T>(T value) @@ -512,14 +507,12 @@ private async Task SaveHelperAsync([DynamicallyAccessedMembers(InternalConstants return LoadHelper(key, flatConfig, storageConfig); } -#if AWS_ASYNC_API private Task LoadHelperAsync<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType)] T>(object hashKey, object rangeKey, DynamoDBFlatConfig flatConfig, CancellationToken cancellationToken) { ItemStorageConfig storageConfig = StorageConfigCache.GetConfig(flatConfig); Key key = MakeKey(hashKey, rangeKey, storageConfig, flatConfig); return LoadHelperAsync(key, flatConfig, storageConfig, cancellationToken); } -#endif private T LoadHelper<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType)] T>(T keyObject, DynamoDBFlatConfig flatConfig) { @@ -528,15 +521,12 @@ private async Task SaveHelperAsync([DynamicallyAccessedMembers(InternalConstants return LoadHelper(key, flatConfig, storageConfig); } -#if AWS_ASYNC_API - private Task LoadHelperAsync<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType)] T>(T keyObject, DynamoDBFlatConfig flatConfig, CancellationToken cancellationToken) { ItemStorageConfig storageConfig = StorageConfigCache.GetConfig(flatConfig); Key key = MakeKey(keyObject, storageConfig, flatConfig); return LoadHelperAsync(key, flatConfig, storageConfig, cancellationToken); } -#endif private T LoadHelper<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType)] T>(Key key, DynamoDBFlatConfig flatConfig, ItemStorageConfig storageConfig) { @@ -554,8 +544,6 @@ private async Task SaveHelperAsync([DynamicallyAccessedMembers(InternalConstants return instance; } -#if AWS_ASYNC_API - private async Task LoadHelperAsync<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType)] T>(Key key, DynamoDBFlatConfig flatConfig, ItemStorageConfig storageConfig, CancellationToken cancellationToken) { GetItemOperationConfig getConfig = new GetItemOperationConfig @@ -571,7 +559,6 @@ private async Task SaveHelperAsync([DynamicallyAccessedMembers(InternalConstants T instance = DocumentToObject(storage, flatConfig); return instance; } -#endif /// public T FromDocument<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType)] T>(Document document) @@ -652,7 +639,6 @@ private async Task SaveHelperAsync([DynamicallyAccessedMembers(InternalConstants table.DeleteHelper(key, null); } -#if AWS_ASYNC_API private Task DeleteHelperAsync<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType)] T>(object hashKey, object rangeKey, DynamoDBFlatConfig flatConfig, CancellationToken cancellationToken) { ItemStorageConfig storageConfig = StorageConfigCache.GetConfig(flatConfig); @@ -661,7 +647,6 @@ private async Task SaveHelperAsync([DynamicallyAccessedMembers(InternalConstants Table table = GetTargetTable(storageConfig, flatConfig); return table.DeleteHelperAsync(key, null, cancellationToken); } -#endif private void DeleteHelper<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType)] T>(T value, DynamoDBFlatConfig flatConfig) { @@ -685,8 +670,6 @@ private async Task SaveHelperAsync([DynamicallyAccessedMembers(InternalConstants } } -#if AWS_ASYNC_API - private static readonly Task CompletedTask = Task.FromResult(null); private Task DeleteHelperAsync<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType)] T>(T value, DynamoDBFlatConfig flatConfig, CancellationToken cancellationToken) @@ -711,7 +694,6 @@ private async Task SaveHelperAsync([DynamicallyAccessedMembers(InternalConstants cancellationToken); } } -#endif #endregion } diff --git a/sdk/src/Services/DynamoDBv2/Custom/DataModel/TransactGet.cs b/sdk/src/Services/DynamoDBv2/Custom/DataModel/TransactGet.cs index 09268d05f0dd..10bfed668cee 100644 --- a/sdk/src/Services/DynamoDBv2/Custom/DataModel/TransactGet.cs +++ b/sdk/src/Services/DynamoDBv2/Custom/DataModel/TransactGet.cs @@ -17,11 +17,8 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; - -#endif using Amazon.DynamoDBv2.DocumentModel; using Amazon.Runtime.Telemetry.Tracing; using ThirdParty.RuntimeBackports; @@ -180,13 +177,11 @@ private void ExecuteHelper() PopulateResults(); } -#if AWS_ASYNC_API private async Task ExecuteHelperAsync(CancellationToken cancellationToken) { await DocumentTransaction.ExecuteHelperAsync(cancellationToken).ConfigureAwait(false); PopulateResults(); } -#endif internal override void PopulateResults() { @@ -266,7 +261,6 @@ private void ExecuteHelper() } } -#if AWS_ASYNC_API private async Task ExecuteHelperAsync(CancellationToken cancellationToken) { MultiTableDocumentTransactGet transaction = new MultiTableDocumentTransactGet(); @@ -283,7 +277,7 @@ private async Task ExecuteHelperAsync(CancellationToken cancellationToken) abstractTransactGet.PopulateResults(); } } -#endif + private TracerProvider GetTracerProvider(List allTransactionParts) { var tracerProvider = AWSConfigs.TelemetryProvider.TracerProvider; diff --git a/sdk/src/Services/DynamoDBv2/Custom/DataModel/TransactWrite.cs b/sdk/src/Services/DynamoDBv2/Custom/DataModel/TransactWrite.cs index eaa5f5ba06a0..1366037fc3d0 100644 --- a/sdk/src/Services/DynamoDBv2/Custom/DataModel/TransactWrite.cs +++ b/sdk/src/Services/DynamoDBv2/Custom/DataModel/TransactWrite.cs @@ -18,11 +18,8 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; - -#endif using Amazon.DynamoDBv2.DocumentModel; using Amazon.Runtime.Telemetry.Tracing; using ThirdParty.RuntimeBackports; @@ -387,13 +384,11 @@ private void ExecuteHelper() PopulateObjects(); } -#if AWS_ASYNC_API private async Task ExecuteHelperAsync(CancellationToken cancellationToken) { await DocumentTransaction.ExecuteHelperAsync(cancellationToken).ConfigureAwait(false); PopulateObjects(); } -#endif internal override void PopulateObjects() { @@ -543,7 +538,6 @@ private void ExecuteHelper() } } -#if AWS_ASYNC_API private async Task ExecuteHelperAsync(CancellationToken cancellationToken) { MultiTableDocumentTransactWrite transaction = new MultiTableDocumentTransactWrite(); @@ -574,6 +568,5 @@ private TracerProvider GetTracerProvider(List allTransactionPart } return tracerProvider; } -#endif } } diff --git a/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentBatchGet.cs b/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentBatchGet.cs index 2d061d071b23..bed5997bf64f 100644 --- a/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentBatchGet.cs +++ b/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentBatchGet.cs @@ -17,9 +17,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading; -#if AWS_ASYNC_API using System.Threading.Tasks; -#endif using Amazon.DynamoDBv2.Model; using Amazon.Runtime.Telemetry.Tracing; @@ -181,7 +179,6 @@ internal void ExecuteHelper() } } -#if AWS_ASYNC_API internal async Task ExecuteHelperAsync(CancellationToken cancellationToken) { MultiBatchGet resultsObject = new MultiBatchGet @@ -201,7 +198,6 @@ internal async Task ExecuteHelperAsync(CancellationToken cancellationToken) Results = new List(); } } -#endif internal void AddKey(Document document) { @@ -324,7 +320,6 @@ internal void ExecuteHelper() } } -#if AWS_ASYNC_API internal async Task ExecuteHelperAsync(CancellationToken cancellationToken) { var errMsg = $"All {nameof(IDocumentBatchGet)} objects must be of type {nameof(DocumentBatchGet)}"; @@ -349,7 +344,6 @@ internal async Task ExecuteHelperAsync(CancellationToken cancellationToken) } } } -#endif #endregion @@ -391,7 +385,6 @@ public Dictionary> GetItems() return GetItemsHelper(); } -#if AWS_ASYNC_API /// /// Gets items configured in Batches from the server asynchronously /// @@ -421,7 +414,6 @@ internal async Task>> GetItemsHelperAsync(Canc return itemsAsDocuments; } -#endif internal Dictionary> GetItemsHelper() { @@ -444,7 +436,6 @@ internal Dictionary> GetItemsHelper() return itemsAsDocuments; } -#if AWS_ASYNC_API private async Task GetAttributeItemsAsync(CancellationToken cancellationToken) { var results = new Results(Batches); @@ -471,7 +462,6 @@ private async Task GetAttributeItemsAsync(CancellationToken cancellatio return results; } -#endif private Results GetAttributeItems() { @@ -528,7 +518,6 @@ private static void CallUntilCompletion(IAmazonDynamoDB client, BatchGetItemRequ } while (request.RequestItems.Count > 0); } -#if AWS_ASYNC_API private static async Task CallUntilCompletionAsync(IAmazonDynamoDB client, BatchGetItemRequest request, Results allResults, CancellationToken cancellationToken) { do @@ -545,7 +534,6 @@ private static async Task CallUntilCompletionAsync(IAmazonDynamoDB client, Batch request.RequestItems = serviceResponse.UnprocessedKeys; } while (request.RequestItems.Count > 0); } -#endif private static BatchGetItemRequest CreateRequest(Dictionary set) { diff --git a/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentBatchWrite.cs b/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentBatchWrite.cs index 1ad44ea83503..4554e5472077 100644 --- a/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentBatchWrite.cs +++ b/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentBatchWrite.cs @@ -18,9 +18,7 @@ using System.Linq; using System.Net; using System.Threading; -#if AWS_ASYNC_API using System.Threading.Tasks; -#endif using Amazon.DynamoDBv2.Model; using Amazon.Runtime.Telemetry.Tracing; @@ -169,7 +167,6 @@ internal void ExecuteHelper() multiBatchWrite.WriteItems(); } -#if AWS_ASYNC_API internal Task ExecuteHelperAsync(CancellationToken cancellationToken) { MultiBatchWrite multiBatchWrite = new MultiBatchWrite @@ -178,7 +175,6 @@ internal Task ExecuteHelperAsync(CancellationToken cancellationToken) }; return multiBatchWrite.WriteItemsAsync(cancellationToken); } -#endif internal void AddKeyToDelete(Key key) { @@ -263,7 +259,6 @@ internal void ExecuteHelper() multiBatchWrite.WriteItems(); } -#if AWS_ASYNC_API internal Task ExecuteHelperAsync(CancellationToken cancellationToken) { var errMsg = $"All {nameof(IDocumentBatchWrite)} objects must be of type {nameof(DocumentBatchWrite)}"; @@ -273,7 +268,6 @@ internal Task ExecuteHelperAsync(CancellationToken cancellationToken) }; return multiBatchWrite.WriteItemsAsync(cancellationToken); } -#endif #endregion @@ -322,7 +316,6 @@ public void WriteItems() WriteItemsHelper(Batches); } -#if AWS_ASYNC_API /// /// Pushes items configured in Batches to the server asynchronously /// @@ -330,7 +323,6 @@ public void WriteItems() { return WriteItemsHelperAsync(Batches, cancellationToken); } -#endif #region Private helper methods @@ -351,7 +343,6 @@ private void WriteItemsHelper(List batches) } } -#if AWS_ASYNC_API private async Task WriteItemsHelperAsync(List batches, CancellationToken cancellationToken) { if (Batches == null || Batches.Count == 0) @@ -368,7 +359,6 @@ private async Task WriteItemsHelperAsync(List batches, Cance await SendSetAsync(nextSet, targetTable, cancellationToken).ConfigureAwait(false); } } -#endif private void SendSet(Dictionary> set, Table targetTable) { @@ -408,7 +398,6 @@ private void SendSet(Dictionary> set, Ta } } -#if AWS_ASYNC_API private async Task SendSetAsync(Dictionary> set, Table targetTable, CancellationToken cancellationToken) { Dictionary> documentMap = null; @@ -446,7 +435,6 @@ private async Task SendSetAsync(Dictionary> documentMap, IAmazonDynamoDB client, CancellationToken cancellationToken) { do @@ -647,7 +634,6 @@ private async Task CallUntilCompletionAsync(BatchWriteItemRequest request, Dicti } } } -#endif private Dictionary> ConvertBatches(List batches) { diff --git a/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentTransactGet.cs b/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentTransactGet.cs index 42aee6eaefda..0de58b0ca8f1 100644 --- a/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentTransactGet.cs +++ b/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentTransactGet.cs @@ -17,9 +17,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading; -#if AWS_ASYNC_API using System.Threading.Tasks; -#endif using Amazon.DynamoDBv2.Model; using Amazon.Runtime.Telemetry.Tracing; @@ -194,13 +192,11 @@ internal void ExecuteHelper() Results = items.Values.SingleOrDefault() ?? new List(); } -#if AWS_ASYNC_API internal async Task ExecuteHelperAsync(CancellationToken cancellationToken) { var items = await GetMultiTransactGet().GetItemsAsync(cancellationToken).ConfigureAwait(false); Results = items.Values.SingleOrDefault() ?? new List(); } -#endif internal void AddKeyHelper(Key key, TransactGetItemOperationConfig operationConfig = null) { @@ -301,7 +297,6 @@ internal void ExecuteHelper() } } -#if AWS_ASYNC_API internal async Task ExecuteHelperAsync(CancellationToken cancellationToken) { var items = await GetMultiTransactGet().GetItemsAsync(cancellationToken).ConfigureAwait(false); @@ -314,7 +309,6 @@ internal async Task ExecuteHelperAsync(CancellationToken cancellationToken) docTransactGet.Results = results ?? new List(); } } -#endif private MultiTransactGet GetMultiTransactGet() { @@ -361,12 +355,10 @@ public Dictionary> GetItems() return GetItemsHelper(); } -#if AWS_ASYNC_API public Task>> GetItemsAsync(CancellationToken cancellationToken) { return GetItemsHelperAsync(cancellationToken); } -#endif #endregion @@ -393,7 +385,6 @@ private Dictionary> GetItemsHelper() return GetDocuments(response.Responses); } -#if AWS_ASYNC_API private async Task>> GetItemsHelperAsync(CancellationToken cancellationToken) { if (Items == null || !Items.Any()) return new Dictionary>(); @@ -403,7 +394,6 @@ private async Task>> GetItemsHelp var response = await dynamoDbClient.TransactGetItemsAsync(request, cancellationToken).ConfigureAwait(false); return GetDocuments(response.Responses); } -#endif private TransactGetItemsRequest ConstructRequest(bool isAsync) { diff --git a/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentTransactWrite.cs b/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentTransactWrite.cs index cfe4de17166b..34086aeea136 100644 --- a/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentTransactWrite.cs +++ b/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentTransactWrite.cs @@ -16,10 +16,8 @@ using System; using System.Collections.Generic; using System.Linq; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif using Amazon.DynamoDBv2.Model; using Amazon.Runtime.Telemetry.Tracing; @@ -397,7 +395,6 @@ internal void ExecuteHelper() } } -#if AWS_ASYNC_API internal async Task ExecuteHelperAsync(CancellationToken cancellationToken) { try @@ -409,7 +406,6 @@ internal async Task ExecuteHelperAsync(CancellationToken cancellationToken) if (ConditionCheckFailedItems == null) ConditionCheckFailedItems = new List(); } } -#endif private MultiTransactWrite GetMultiTransactWrite() { @@ -624,7 +620,6 @@ internal void ExecuteHelper() } } -#if AWS_ASYNC_API internal async Task ExecuteHelperAsync(CancellationToken cancellationToken) { List docTransactionParts = new(); @@ -643,7 +638,6 @@ internal async Task ExecuteHelperAsync(CancellationToken cancellationToken) } } } -#endif private MultiTransactWrite GetMultiTransactWrite() { @@ -690,12 +684,11 @@ public void WriteItems() WriteItemsHelper(); } -#if AWS_ASYNC_API public Task WriteItemsAsync(CancellationToken cancellationToken) { return WriteItemsHelperAsync(cancellationToken); } -#endif + #endregion @@ -735,7 +728,6 @@ private void WriteItemsHelper() } } -#if AWS_ASYNC_API private async Task WriteItemsHelperAsync(CancellationToken cancellationToken) { if (Items == null || !Items.Any()) return; @@ -758,7 +750,6 @@ private async Task WriteItemsHelperAsync(CancellationToken cancellationToken) item.CommitChanges(); } } -#endif private TransactWriteItemsRequest ConstructRequest(bool isAsync) { diff --git a/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/Search.cs b/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/Search.cs index b1028d4302fa..7b5229f16a96 100644 --- a/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/Search.cs +++ b/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/Search.cs @@ -21,9 +21,7 @@ using System.Globalization; using Amazon.Runtime.Telemetry.Tracing; -#if AWS_ASYNC_API using System.Threading.Tasks; -#endif using System.Threading; namespace Amazon.DynamoDBv2.DocumentModel @@ -436,7 +434,6 @@ internal List GetNextSetHelper() return ret; } -#if AWS_ASYNC_API internal async Task> GetNextSetHelperAsync(CancellationToken cancellationToken) { List ret = new List(); @@ -552,7 +549,6 @@ internal async Task> GetNextSetHelperAsync(CancellationToken canc return ret; } -#endif internal List GetRemainingHelper() { @@ -571,7 +567,6 @@ internal List GetRemainingHelper() return ret; } -#if AWS_ASYNC_API internal async Task> GetRemainingHelperAsync(CancellationToken cancellationToken) { List ret = new List(); @@ -588,7 +583,6 @@ internal async Task> GetRemainingHelperAsync(CancellationToken ca return ret; } -#endif private int count; diff --git a/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/Table.cs b/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/Table.cs index 84034ca03af3..023532ed7e9f 100644 --- a/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/Table.cs +++ b/sdk/src/Services/DynamoDBv2/Custom/DocumentModel/Table.cs @@ -20,9 +20,7 @@ using Amazon.Util; using System.Linq; using System.Threading; -#if AWS_ASYNC_API using System.Threading.Tasks; -#endif using System.Collections.Generic; using System.Globalization; using Amazon.DynamoDBv2.DataModel; @@ -1241,7 +1239,6 @@ internal Document PutItemHelper(Document doc, PutItemOperationConfig config) return ret; } -#if AWS_ASYNC_API internal async Task PutItemHelperAsync(Document doc, PutItemOperationConfig config, CancellationToken cancellationToken) { var currentConfig = config ?? new PutItemOperationConfig(); @@ -1286,7 +1283,6 @@ internal async Task PutItemHelperAsync(Document doc, PutItemOperationC } return ret; } -#endif #endregion @@ -1327,7 +1323,6 @@ internal Document GetItemHelper(Key key, GetItemOperationConfig config) return this.FromAttributeMap(attributeMap); } -#if AWS_ASYNC_API internal async Task GetItemHelperAsync(Key key, GetItemOperationConfig config, CancellationToken cancellationToken) { var currentConfig = config ?? new GetItemOperationConfig(); @@ -1349,7 +1344,6 @@ internal async Task GetItemHelperAsync(Key key, GetItemOperationConfig return null; return this.FromAttributeMap(attributeMap); } -#endif #endregion @@ -1362,13 +1356,11 @@ internal Document UpdateHelper(Document doc, Primitive hashKey, Primitive rangeK return UpdateHelper(doc, key, config,null); } -#if AWS_ASYNC_API internal Task UpdateHelperAsync(Document doc, Primitive hashKey, Primitive rangeKey, UpdateItemOperationConfig config, Expression expression, CancellationToken cancellationToken) { Key key = (hashKey != null || rangeKey != null) ? MakeKey(hashKey, rangeKey) : MakeKey(doc); return UpdateHelperAsync(doc, key, config, expression, cancellationToken); } -#endif internal Document UpdateHelper(Document doc, Key key, UpdateItemOperationConfig config, Expression updateExpression) { @@ -1461,7 +1453,6 @@ internal Document UpdateHelper(Document doc, Key key, UpdateItemOperationConfig return ret; } -#if AWS_ASYNC_API internal async Task UpdateHelperAsync(Document doc, Key key, UpdateItemOperationConfig config, Expression updateExpression, CancellationToken cancellationToken) { var currentConfig = config ?? new UpdateItemOperationConfig(); @@ -1541,7 +1532,6 @@ internal async Task UpdateHelperAsync(Document doc, Key key, UpdateIte } return ret; } -#endif // Checks if key attributes have been updated internal bool HaveKeysChanged(Document doc) @@ -1614,7 +1604,6 @@ internal Document DeleteHelper(Key key, DeleteItemOperationConfig config) return ret; } -#if AWS_ASYNC_API internal async Task DeleteHelperAsync(Key key, DeleteItemOperationConfig config, CancellationToken cancellationToken) { var currentConfig = config ?? new DeleteItemOperationConfig(); @@ -1657,7 +1646,6 @@ internal async Task DeleteHelperAsync(Key key, DeleteItemOperationConf } return ret; } -#endif #endregion diff --git a/sdk/src/Services/EC2/Custom/Internal/AmazonEC2PostMarshallHandler.cs b/sdk/src/Services/EC2/Custom/Internal/AmazonEC2PostMarshallHandler.cs index 19eea0978f49..2038b5866fbe 100644 --- a/sdk/src/Services/EC2/Custom/Internal/AmazonEC2PostMarshallHandler.cs +++ b/sdk/src/Services/EC2/Custom/Internal/AmazonEC2PostMarshallHandler.cs @@ -42,7 +42,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -56,7 +55,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// Custom pipeline handler diff --git a/sdk/src/Services/EC2/Custom/Internal/AmazonEC2PreMarshallHandler.cs b/sdk/src/Services/EC2/Custom/Internal/AmazonEC2PreMarshallHandler.cs index 37b30ee60afb..b49ad2b5448b 100644 --- a/sdk/src/Services/EC2/Custom/Internal/AmazonEC2PreMarshallHandler.cs +++ b/sdk/src/Services/EC2/Custom/Internal/AmazonEC2PreMarshallHandler.cs @@ -53,7 +53,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -67,7 +66,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// Custom pipeline handler diff --git a/sdk/src/Services/EC2/Custom/Internal/AmazonEC2ResponseHandler.cs b/sdk/src/Services/EC2/Custom/Internal/AmazonEC2ResponseHandler.cs index c8812022512c..443f48a7903e 100644 --- a/sdk/src/Services/EC2/Custom/Internal/AmazonEC2ResponseHandler.cs +++ b/sdk/src/Services/EC2/Custom/Internal/AmazonEC2ResponseHandler.cs @@ -44,7 +44,6 @@ public override void InvokeSync(IExecutionContext executionContext) PostInvoke(executionContext); } -#if AWS_ASYNC_API /// /// Calls the and post invoke logic after calling the next handler /// in the pipeline. @@ -59,7 +58,6 @@ public override async System.Threading.Tasks.Task InvokeAsync(IExecutionCo PostInvoke(executionContext); return response; } -#endif /// /// Custom pipeline handler diff --git a/sdk/src/Services/ElasticFileSystem/Custom/Internal/IdempotencyHandler.cs b/sdk/src/Services/ElasticFileSystem/Custom/Internal/IdempotencyHandler.cs index b3588ad8b888..bb3f8eea5366 100644 --- a/sdk/src/Services/ElasticFileSystem/Custom/Internal/IdempotencyHandler.cs +++ b/sdk/src/Services/ElasticFileSystem/Custom/Internal/IdempotencyHandler.cs @@ -41,7 +41,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -55,7 +54,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// PreInvoke that sets the CreationToken for the CreateFileSystemRequest diff --git a/sdk/src/Services/ElasticLoadBalancing/Custom/Internal/ProcessRequestHandler.cs b/sdk/src/Services/ElasticLoadBalancing/Custom/Internal/ProcessRequestHandler.cs index 54f3ef665393..45fa786b1eff 100644 --- a/sdk/src/Services/ElasticLoadBalancing/Custom/Internal/ProcessRequestHandler.cs +++ b/sdk/src/Services/ElasticLoadBalancing/Custom/Internal/ProcessRequestHandler.cs @@ -40,7 +40,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -54,7 +53,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// Method to set the policy names before continuing on with the pipeline. diff --git a/sdk/src/Services/ElasticTranscoder/Custom/Internal/AmazonElasticTranscoderPreMarshallHandler.cs b/sdk/src/Services/ElasticTranscoder/Custom/Internal/AmazonElasticTranscoderPreMarshallHandler.cs index 063f236ff511..17438eb279bd 100644 --- a/sdk/src/Services/ElasticTranscoder/Custom/Internal/AmazonElasticTranscoderPreMarshallHandler.cs +++ b/sdk/src/Services/ElasticTranscoder/Custom/Internal/AmazonElasticTranscoderPreMarshallHandler.cs @@ -48,7 +48,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -62,7 +61,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// Logic to be executed before request marshalling. diff --git a/sdk/src/Services/Glacier/Custom/Internal/ProcessRequestHandler.cs b/sdk/src/Services/Glacier/Custom/Internal/ProcessRequestHandler.cs index e39b67e8fae4..b12f37911f86 100644 --- a/sdk/src/Services/Glacier/Custom/Internal/ProcessRequestHandler.cs +++ b/sdk/src/Services/Glacier/Custom/Internal/ProcessRequestHandler.cs @@ -24,7 +24,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -38,7 +37,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// Custom pipeline handler diff --git a/sdk/src/Services/MachineLearning/Custom/Internal/IdempotencyHandler.cs b/sdk/src/Services/MachineLearning/Custom/Internal/IdempotencyHandler.cs index b5d9d7f0b7a4..6a4d682a62db 100644 --- a/sdk/src/Services/MachineLearning/Custom/Internal/IdempotencyHandler.cs +++ b/sdk/src/Services/MachineLearning/Custom/Internal/IdempotencyHandler.cs @@ -41,7 +41,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -55,7 +54,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// Custom pipeline handler diff --git a/sdk/src/Services/MachineLearning/Custom/Internal/ProcessRequestHandler.cs b/sdk/src/Services/MachineLearning/Custom/Internal/ProcessRequestHandler.cs index 37e4d82c491c..a0c3bd483aaa 100644 --- a/sdk/src/Services/MachineLearning/Custom/Internal/ProcessRequestHandler.cs +++ b/sdk/src/Services/MachineLearning/Custom/Internal/ProcessRequestHandler.cs @@ -41,7 +41,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -55,7 +54,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// Custom pipeline handler diff --git a/sdk/src/Services/Neptune/Custom/Internal/PreSignedUrlRequestHandler.cs b/sdk/src/Services/Neptune/Custom/Internal/PreSignedUrlRequestHandler.cs index 42a7305105d5..0e8372d49c69 100644 --- a/sdk/src/Services/Neptune/Custom/Internal/PreSignedUrlRequestHandler.cs +++ b/sdk/src/Services/Neptune/Custom/Internal/PreSignedUrlRequestHandler.cs @@ -56,7 +56,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -70,7 +69,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// diff --git a/sdk/src/Services/RDS/Custom/Internal/PreSignedUrlRequestHandler.cs b/sdk/src/Services/RDS/Custom/Internal/PreSignedUrlRequestHandler.cs index 8b4164da06bc..03cbd00cd7d2 100644 --- a/sdk/src/Services/RDS/Custom/Internal/PreSignedUrlRequestHandler.cs +++ b/sdk/src/Services/RDS/Custom/Internal/PreSignedUrlRequestHandler.cs @@ -56,7 +56,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -70,7 +69,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// Auto-generates pre-signed URLs for requests that implement . diff --git a/sdk/src/Services/RDS/Custom/Util/RDSAuthTokenGenerator.cs b/sdk/src/Services/RDS/Custom/Util/RDSAuthTokenGenerator.cs index c044223b96cc..8c5a63fb4898 100644 --- a/sdk/src/Services/RDS/Custom/Util/RDSAuthTokenGenerator.cs +++ b/sdk/src/Services/RDS/Custom/Util/RDSAuthTokenGenerator.cs @@ -127,7 +127,6 @@ public static string GenerateAuthToken(AWSCredentials credentials, RegionEndpoin return GenerateAuthToken(immutableCredentials, region, hostname, port, dbUser); } -#if AWS_ASYNC_API /// /// Generate a token for IAM authentication to an RDS database. /// @@ -145,7 +144,6 @@ public static async System.Threading.Tasks.Task GenerateAuthTokenAsync(A var immutableCredentials = await credentials.GetCredentialsAsync().ConfigureAwait(false); return GenerateAuthToken(immutableCredentials, region, hostname, port, dbUser); } -#endif private static string GenerateAuthToken(ImmutableCredentials immutableCredentials, RegionEndpoint region, string hostname, int port, string dbUser) { diff --git a/sdk/src/Services/Route53/Custom/Internal/AmazonRoute53PostMarshallHandler.cs b/sdk/src/Services/Route53/Custom/Internal/AmazonRoute53PostMarshallHandler.cs index cf0028fbdf46..f86dd9f4fc43 100644 --- a/sdk/src/Services/Route53/Custom/Internal/AmazonRoute53PostMarshallHandler.cs +++ b/sdk/src/Services/Route53/Custom/Internal/AmazonRoute53PostMarshallHandler.cs @@ -26,7 +26,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -40,7 +39,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// Custom pipeline handler diff --git a/sdk/src/Services/Route53/Custom/Internal/AmazonRoute53PreMarshallHandler.cs b/sdk/src/Services/Route53/Custom/Internal/AmazonRoute53PreMarshallHandler.cs index deeca339829e..b9c3d6d6531e 100644 --- a/sdk/src/Services/Route53/Custom/Internal/AmazonRoute53PreMarshallHandler.cs +++ b/sdk/src/Services/Route53/Custom/Internal/AmazonRoute53PreMarshallHandler.cs @@ -25,7 +25,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -39,7 +38,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// Custom pipeline handler diff --git a/sdk/src/Services/S3/Custom/AmazonS3Client.Extensions.cs b/sdk/src/Services/S3/Custom/AmazonS3Client.Extensions.cs index e3b489e2ff39..8cb5df66e327 100644 --- a/sdk/src/Services/S3/Custom/AmazonS3Client.Extensions.cs +++ b/sdk/src/Services/S3/Custom/AmazonS3Client.Extensions.cs @@ -18,9 +18,7 @@ using System.Net; using System.Text; -#if AWS_ASYNC_API using System.Threading.Tasks; -#endif using Amazon.Runtime; using Amazon.Runtime.Internal; @@ -142,8 +140,6 @@ internal string GetPreSignedURLInternal(GetPreSignedUrlRequest request) return signingResult.Result; } - -#if AWS_ASYNC_API /// /// Asynchronously create a signed URL allowing access to a resource that would /// usually require authentication. @@ -206,7 +202,7 @@ internal async Task GetPreSignedURLInternalAsync(GetPreSignedUrlRequest var signingResult = ReturnSigningResult(signatureVersionToUse, irequest, Config, metrics, immutableCredentials, arn); return signingResult.Result; } -#endif + /// /// Marshalls the parameters for a presigned url for a preferred signing protocol. /// @@ -539,7 +535,7 @@ public string GetPreSignedURL(GetPreSignedUrlRequest request) { return GetPreSignedURLInternal(request); } -#if AWS_ASYNC_API + /// /// Asynchronously create a signed URL allowing access to a resource that would /// usually require authentication. @@ -566,8 +562,6 @@ public async Task GetPreSignedURLAsync(GetPreSignedUrlRequest request) return await GetPreSignedURLInternalAsync(request).ConfigureAwait(false); } - -#endif #endregion #region ICoreAmazonS3 Implementation diff --git a/sdk/src/Services/S3/Custom/IS3ExpressCredentialProvider.cs b/sdk/src/Services/S3/Custom/IS3ExpressCredentialProvider.cs index 0bd63947c20a..b0a3b6b9a1bf 100644 --- a/sdk/src/Services/S3/Custom/IS3ExpressCredentialProvider.cs +++ b/sdk/src/Services/S3/Custom/IS3ExpressCredentialProvider.cs @@ -15,10 +15,8 @@ using Amazon.S3.Model; using System; -#if AWS_ASYNC_API using System.Threading; using System.Threading.Tasks; -#endif namespace Amazon.S3 { @@ -34,11 +32,9 @@ public interface IS3ExpressCredentialProvider : IDisposable /// SessionCredentials ResolveSessionCredentials(string bucketName); -#if AWS_ASYNC_API /// /// Resolves S3Express session credentials based on the bucket name. /// Task ResolveSessionCredentialsAsync(string bucketName, CancellationToken cancellationToken = default); -#endif } } \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Internal/AmazonS3ExceptionHandler.cs b/sdk/src/Services/S3/Custom/Internal/AmazonS3ExceptionHandler.cs index 83f26fbcc466..7bd26844bf2e 100644 --- a/sdk/src/Services/S3/Custom/Internal/AmazonS3ExceptionHandler.cs +++ b/sdk/src/Services/S3/Custom/Internal/AmazonS3ExceptionHandler.cs @@ -49,7 +49,6 @@ public override void InvokeSync(IExecutionContext executionContext) } } -#if AWS_ASYNC_API public override async System.Threading.Tasks.Task InvokeAsync(IExecutionContext executionContext) { try @@ -62,7 +61,6 @@ public override async System.Threading.Tasks.Task InvokeAsync(IExecutionCo throw; } } -#endif /// /// Catch exceptions and clean up any open streams. diff --git a/sdk/src/Services/S3/Custom/Internal/AmazonS3KmsHandler.cs b/sdk/src/Services/S3/Custom/Internal/AmazonS3KmsHandler.cs index e993d04ee4d9..2a8655295484 100644 --- a/sdk/src/Services/S3/Custom/Internal/AmazonS3KmsHandler.cs +++ b/sdk/src/Services/S3/Custom/Internal/AmazonS3KmsHandler.cs @@ -37,7 +37,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -51,7 +50,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// Custom pipeline handler to enable sig V4 for Get requests. diff --git a/sdk/src/Services/S3/Custom/Internal/AmazonS3PostMarshallHandler.cs b/sdk/src/Services/S3/Custom/Internal/AmazonS3PostMarshallHandler.cs index a3d0f3099d8b..5e2198b0e55b 100644 --- a/sdk/src/Services/S3/Custom/Internal/AmazonS3PostMarshallHandler.cs +++ b/sdk/src/Services/S3/Custom/Internal/AmazonS3PostMarshallHandler.cs @@ -44,7 +44,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -58,7 +57,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif protected virtual void PreInvoke(IExecutionContext executionContext) { diff --git a/sdk/src/Services/S3/Custom/Internal/AmazonS3PreMarshallHandler.cs b/sdk/src/Services/S3/Custom/Internal/AmazonS3PreMarshallHandler.cs index dc3bfdd462ea..fb0bca4fc531 100644 --- a/sdk/src/Services/S3/Custom/Internal/AmazonS3PreMarshallHandler.cs +++ b/sdk/src/Services/S3/Custom/Internal/AmazonS3PreMarshallHandler.cs @@ -44,7 +44,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -58,7 +57,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif protected virtual void PreInvoke(IExecutionContext executionContext) { diff --git a/sdk/src/Services/S3/Custom/Internal/AmazonS3ResponseHandler.cs b/sdk/src/Services/S3/Custom/Internal/AmazonS3ResponseHandler.cs index d6fa9dcd0c22..cd8507852009 100644 --- a/sdk/src/Services/S3/Custom/Internal/AmazonS3ResponseHandler.cs +++ b/sdk/src/Services/S3/Custom/Internal/AmazonS3ResponseHandler.cs @@ -44,7 +44,6 @@ public override void InvokeSync(IExecutionContext executionContext) PostInvoke(executionContext); } -#if AWS_ASYNC_API /// /// Calls the and post invoke logic after calling the next handler /// in the pipeline. @@ -59,7 +58,6 @@ public override async System.Threading.Tasks.Task InvokeAsync(IExecutionCo PostInvoke(executionContext); return response; } -#endif protected virtual void PostInvoke(IExecutionContext executionContext) { diff --git a/sdk/src/Services/S3/Custom/Internal/S3Express/DefaultS3ExpressCredentialProvider.cs b/sdk/src/Services/S3/Custom/Internal/S3Express/DefaultS3ExpressCredentialProvider.cs index 1c85a4f802f7..3c1b7114a4a4 100644 --- a/sdk/src/Services/S3/Custom/Internal/S3Express/DefaultS3ExpressCredentialProvider.cs +++ b/sdk/src/Services/S3/Custom/Internal/S3Express/DefaultS3ExpressCredentialProvider.cs @@ -21,9 +21,7 @@ using Amazon.Util; using Amazon.Runtime.Internal.Util; using Amazon.Runtime; -#if AWS_ASYNC_API using System.Threading.Tasks; -#endif namespace Amazon.S3.Internal.S3Express { @@ -118,7 +116,6 @@ public SessionCredentials ResolveSessionCredentials(string bucketName) return sessionCredentials; } -#if AWS_ASYNC_API /// /// Resolves S3Express session credentials based on the bucket name. /// @@ -162,7 +159,6 @@ public async Task ResolveSessionCredentialsAsync(string buck } return sessionCredentials; } -#endif private SessionCredentials GetSessionCredentialsFromCache(string bucketName) { @@ -199,11 +195,7 @@ private void CacheSessionCredentials(string bucketName, SessionCredentials crede // to avoid keys being overwritten while the list is being populated. Once the list is populated // we only lock the cache when adding or updating items to allow other threads to resolve session // credentials. -#if AWS_ASYNC_API private async void RefreshCredentials(object _) -#else - private void RefreshCredentials(object _) -#endif { try { @@ -240,11 +232,7 @@ private void RefreshCredentials(object _) CreateSessionResponse credentials = null; try { -#if AWS_ASYNC_API credentials = await _s3Client.CreateSessionAsync(new CreateSessionRequest { BucketName = key }).ConfigureAwait(false); -#else - credentials = _s3Client.CreateSession(new CreateSessionRequest { BucketName = key }); -#endif } catch (NoSuchBucketException e) { diff --git a/sdk/src/Services/S3/Custom/Internal/S3Express/S3ExpressPreSigner.cs b/sdk/src/Services/S3/Custom/Internal/S3Express/S3ExpressPreSigner.cs index dbcb3032c698..90252985941d 100644 --- a/sdk/src/Services/S3/Custom/Internal/S3Express/S3ExpressPreSigner.cs +++ b/sdk/src/Services/S3/Custom/Internal/S3Express/S3ExpressPreSigner.cs @@ -17,9 +17,7 @@ using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.S3.Util; -#if AWS_ASYNC_API using System.Threading.Tasks; -#endif namespace Amazon.S3.Internal.S3Express { @@ -87,7 +85,6 @@ private static void PreSignRequest(IRequestContext requestContext, AmazonS3Confi requestContext.Identity = new BasicAWSCredentials(sessionCredentials.AccessKeyId, sessionCredentials.SecretAccessKey); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -136,7 +133,6 @@ private static async Task PreSignRequestAsync(IRequestContext requestContext, Am requestContext.Request.Headers[S3ExpressSessionHeader] = sessionCredentials.SessionToken; requestContext.Identity = new BasicAWSCredentials(sessionCredentials.AccessKeyId, sessionCredentials.SecretAccessKey); } -#endif private static string GetRequestBucketName(IRequest request) { diff --git a/sdk/src/Services/S3/Custom/Model/EncryptionTypeMismatchException.cs b/sdk/src/Services/S3/Custom/Model/EncryptionTypeMismatchException.cs index c261345841f3..2a86f1e4075d 100644 --- a/sdk/src/Services/S3/Custom/Model/EncryptionTypeMismatchException.cs +++ b/sdk/src/Services/S3/Custom/Model/EncryptionTypeMismatchException.cs @@ -115,11 +115,6 @@ protected EncryptionTypeMismatchException(System.Runtime.Serialization.Serializa /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. /// The parameter is a null reference (Nothing in Visual Basic). -#if BCL35 - [System.Security.Permissions.SecurityPermission( - System.Security.Permissions.SecurityAction.LinkDemand, - Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] -#endif [System.Security.SecurityCritical] // These FxCop rules are giving false-positives for this method [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] diff --git a/sdk/src/Services/S3/Custom/Model/IdempotencyParameterMismatchException.cs b/sdk/src/Services/S3/Custom/Model/IdempotencyParameterMismatchException.cs index f8a4b1343bda..ffbf5393f640 100644 --- a/sdk/src/Services/S3/Custom/Model/IdempotencyParameterMismatchException.cs +++ b/sdk/src/Services/S3/Custom/Model/IdempotencyParameterMismatchException.cs @@ -119,11 +119,6 @@ protected IdempotencyParameterMismatchException(System.Runtime.Serialization.Ser /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. /// The parameter is a null reference (Nothing in Visual Basic). -#if BCL35 - [System.Security.Permissions.SecurityPermission( - System.Security.Permissions.SecurityAction.LinkDemand, - Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] -#endif [System.Security.SecurityCritical] // These FxCop rules are giving false-positives for this method [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] diff --git a/sdk/src/Services/S3/Custom/Model/InvalidRequestException.cs b/sdk/src/Services/S3/Custom/Model/InvalidRequestException.cs index e97361219e10..f2a609094b29 100644 --- a/sdk/src/Services/S3/Custom/Model/InvalidRequestException.cs +++ b/sdk/src/Services/S3/Custom/Model/InvalidRequestException.cs @@ -114,11 +114,6 @@ protected InvalidRequestException(System.Runtime.Serialization.SerializationInfo /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. /// The parameter is a null reference (Nothing in Visual Basic). -#if BCL35 - [System.Security.Permissions.SecurityPermission( - System.Security.Permissions.SecurityAction.LinkDemand, - Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] -#endif [System.Security.SecurityCritical] // These FxCop rules are giving false-positives for this method [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] diff --git a/sdk/src/Services/S3/Custom/Model/InvalidWriteOffsetException.cs b/sdk/src/Services/S3/Custom/Model/InvalidWriteOffsetException.cs index dd31ab97a252..1085f33b77c4 100644 --- a/sdk/src/Services/S3/Custom/Model/InvalidWriteOffsetException.cs +++ b/sdk/src/Services/S3/Custom/Model/InvalidWriteOffsetException.cs @@ -114,11 +114,6 @@ protected InvalidWriteOffsetException(System.Runtime.Serialization.Serialization /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. /// The parameter is a null reference (Nothing in Visual Basic). -#if BCL35 - [System.Security.Permissions.SecurityPermission( - System.Security.Permissions.SecurityAction.LinkDemand, - Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] -#endif [System.Security.SecurityCritical] // These FxCop rules are giving false-positives for this method [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] diff --git a/sdk/src/Services/S3/Custom/Model/TooManyPartsException.cs b/sdk/src/Services/S3/Custom/Model/TooManyPartsException.cs index 211ac97cbdd5..1ed9616fceec 100644 --- a/sdk/src/Services/S3/Custom/Model/TooManyPartsException.cs +++ b/sdk/src/Services/S3/Custom/Model/TooManyPartsException.cs @@ -114,11 +114,6 @@ protected TooManyPartsException(System.Runtime.Serialization.SerializationInfo i /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. /// The parameter is a null reference (Nothing in Visual Basic). -#if BCL35 - [System.Security.Permissions.SecurityPermission( - System.Security.Permissions.SecurityAction.LinkDemand, - Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] -#endif [System.Security.SecurityCritical] // These FxCop rules are giving false-positives for this method [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] diff --git a/sdk/src/Services/S3/Custom/Util/AmazonS3HttpUtil.cs b/sdk/src/Services/S3/Custom/Util/AmazonS3HttpUtil.cs index d67bd047ec46..431273ae2fdd 100644 --- a/sdk/src/Services/S3/Custom/Util/AmazonS3HttpUtil.cs +++ b/sdk/src/Services/S3/Custom/Util/AmazonS3HttpUtil.cs @@ -17,9 +17,7 @@ using Amazon.Runtime; using Amazon.Util.Internal; -#if AWS_ASYNC_API using System.Threading.Tasks; -#endif @@ -33,7 +31,6 @@ internal class GetHeadResponse internal static class AmazonS3HttpUtil { -#if AWS_ASYNC_API internal static async Task GetHeadAsync(IAmazonS3 s3Client, IClientConfig config, string url, string header) { HttpWebRequest httpRequest = GetHeadHttpRequest(config, url); @@ -49,7 +46,6 @@ internal static async Task GetHeadAsync(IAmazonS3 s3Client, ICl return HandleWebException(header, we); } } -#endif internal static GetHeadResponse GetHead(IAmazonS3 s3Client, IClientConfig config, string url, string header) { diff --git a/sdk/src/Services/S3/Custom/Util/AmazonS3Util.cs b/sdk/src/Services/S3/Custom/Util/AmazonS3Util.cs index 75fdc9fba48f..3cb65948ff78 100644 --- a/sdk/src/Services/S3/Custom/Util/AmazonS3Util.cs +++ b/sdk/src/Services/S3/Custom/Util/AmazonS3Util.cs @@ -607,8 +607,6 @@ internal static bool ResourcePathContainsOutpostsResource(IRequest request) || request.PathResources.Any(pr => IsOutpostResource(pr.Value.Trim().Trim(separators))); } - -#if AWS_ASYNC_API /// /// Determines whether an S3 bucket exists or not. /// @@ -640,6 +638,5 @@ public static async System.Threading.Tasks.Task DoesS3BucketExistV2Async(I } return true; } -#endif } } diff --git a/sdk/src/Services/S3Control/Custom/Internal/AmazonS3ControlExceptionHandler.cs b/sdk/src/Services/S3Control/Custom/Internal/AmazonS3ControlExceptionHandler.cs index fb6532c2456c..1271379d3148 100644 --- a/sdk/src/Services/S3Control/Custom/Internal/AmazonS3ControlExceptionHandler.cs +++ b/sdk/src/Services/S3Control/Custom/Internal/AmazonS3ControlExceptionHandler.cs @@ -51,7 +51,6 @@ public override void InvokeSync(IExecutionContext executionContext) } } -#if AWS_ASYNC_API public override async System.Threading.Tasks.Task InvokeAsync(IExecutionContext executionContext) { try @@ -64,7 +63,6 @@ public override async System.Threading.Tasks.Task InvokeAsync(IExecutionCo throw; } } -#endif private static void ExtractAmazonIdHeader(IExecutionContext executionContext, Exception exception) { diff --git a/sdk/src/Services/S3Control/Custom/Internal/AmazonS3ControlPostUnmarshallHandler.cs b/sdk/src/Services/S3Control/Custom/Internal/AmazonS3ControlPostUnmarshallHandler.cs index d0d1945e89cb..12abea335502 100644 --- a/sdk/src/Services/S3Control/Custom/Internal/AmazonS3ControlPostUnmarshallHandler.cs +++ b/sdk/src/Services/S3Control/Custom/Internal/AmazonS3ControlPostUnmarshallHandler.cs @@ -43,7 +43,6 @@ public override void InvokeSync(IExecutionContext executionContext) PostInvoke(executionContext); } -#if AWS_ASYNC_API /// /// Calls the and post invoke logic after calling the next handler /// in the pipeline. @@ -58,7 +57,6 @@ public override async System.Threading.Tasks.Task InvokeAsync(IExecutionCo PostInvoke(executionContext); return response; } -#endif protected virtual void PostInvoke(IExecutionContext executionContext) { diff --git a/sdk/src/Services/SQS/Custom/IAmazonSQS.Extension.cs b/sdk/src/Services/SQS/Custom/IAmazonSQS.Extension.cs index eee240af555d..fb9d9b142248 100644 --- a/sdk/src/Services/SQS/Custom/IAmazonSQS.Extension.cs +++ b/sdk/src/Services/SQS/Custom/IAmazonSQS.Extension.cs @@ -31,7 +31,7 @@ public partial interface IAmazonSQS : IDisposable, ICoreAmazonSQS /// The ARN for the SQS queue. This can be used when setting up the S3 bucket notification. string AuthorizeS3ToSendMessage(string queueUrl, string bucket); #endif -#if AWS_ASYNC_API + /// /// This is a utility method which asynchronously updates the policy of a queue to allow the /// S3 bucket to publish events to it. @@ -40,6 +40,5 @@ public partial interface IAmazonSQS : IDisposable, ICoreAmazonSQS /// The bucket that will be given access to send messages from. /// A Task containing the ARN for the SQS queue. This can be used when setting up the S3 bucket notification. System.Threading.Tasks.Task AuthorizeS3ToSendMessageAsync(string queueUrl, string bucket); -#endif } } \ No newline at end of file diff --git a/sdk/src/Services/SQS/Custom/Internal/ProcessRequestHandler.cs b/sdk/src/Services/SQS/Custom/Internal/ProcessRequestHandler.cs index 7682d45a3ed3..072b70753a75 100644 --- a/sdk/src/Services/SQS/Custom/Internal/ProcessRequestHandler.cs +++ b/sdk/src/Services/SQS/Custom/Internal/ProcessRequestHandler.cs @@ -26,7 +26,6 @@ public override void InvokeSync(IExecutionContext executionContext) base.InvokeSync(executionContext); } -#if AWS_ASYNC_API /// /// Calls pre invoke logic before calling the next handler /// in the pipeline. @@ -40,7 +39,6 @@ public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext PreInvoke(executionContext); return base.InvokeAsync(executionContext); } -#endif /// /// Customize the QueueUrl diff --git a/sdk/src/Services/SQS/Custom/Internal/ValidationResponseHandler.cs b/sdk/src/Services/SQS/Custom/Internal/ValidationResponseHandler.cs index a5e8a225248c..292f43d8b80c 100644 --- a/sdk/src/Services/SQS/Custom/Internal/ValidationResponseHandler.cs +++ b/sdk/src/Services/SQS/Custom/Internal/ValidationResponseHandler.cs @@ -29,7 +29,6 @@ public override void InvokeSync(IExecutionContext executionContext) PostInvoke(executionContext); } -#if AWS_ASYNC_API /// /// Calls the and post invoke logic after calling the next handler /// in the pipeline. @@ -44,7 +43,6 @@ public override async System.Threading.Tasks.Task InvokeAsync(IExecutionCo PostInvoke(executionContext); return response; } -#endif /// /// Custom pipeline handler diff --git a/sdk/src/Services/SSO/Custom/Internal/_bcl+netstandard/CoreAmazonSSO.cs b/sdk/src/Services/SSO/Custom/Internal/_bcl+netstandard/CoreAmazonSSO.cs index 1bd036927464..57742a0a83dd 100644 --- a/sdk/src/Services/SSO/Custom/Internal/_bcl+netstandard/CoreAmazonSSO.cs +++ b/sdk/src/Services/SSO/Custom/Internal/_bcl+netstandard/CoreAmazonSSO.cs @@ -75,7 +75,6 @@ public static void Logout(IAmazonSSO client, string accessToken) } #endif -#if AWS_ASYNC_API /// /// Create credentials from SSO access token /// @@ -121,6 +120,5 @@ public static async Task LogoutAsync(IAmazonSSO client, string accessToken, Canc { await client.LogoutAsync(new LogoutRequest() { AccessToken = accessToken }, cancellationToken).ConfigureAwait(false); } -#endif } } \ No newline at end of file diff --git a/sdk/src/Services/SSO/Custom/_bcl+netstandard/AmazonSSOClient.Extension.cs b/sdk/src/Services/SSO/Custom/_bcl+netstandard/AmazonSSOClient.Extension.cs index 9d608879598e..c85dbd1f6c49 100644 --- a/sdk/src/Services/SSO/Custom/_bcl+netstandard/AmazonSSOClient.Extension.cs +++ b/sdk/src/Services/SSO/Custom/_bcl+netstandard/AmazonSSOClient.Extension.cs @@ -53,8 +53,6 @@ void ICoreAmazonSSO_Logout.Logout(string accessToken) } #endif -#if AWS_ASYNC_API - /// /// Create credentials from SSO access token /// @@ -80,6 +78,5 @@ Task ICoreAmazonSSO_Logout.LogoutAsync(string accessToken, CancellationToken can { return CoreAmazonSSO.LogoutAsync(this, accessToken, cancellationToken); } -#endif } } diff --git a/sdk/src/Services/SSOOIDC/Custom/_bcl+netstandard/AmazonSSOOIDCClient.Extension.cs b/sdk/src/Services/SSOOIDC/Custom/_bcl+netstandard/AmazonSSOOIDCClient.Extension.cs index bfb710f27a3a..6acceaac584e 100644 --- a/sdk/src/Services/SSOOIDC/Custom/_bcl+netstandard/AmazonSSOOIDCClient.Extension.cs +++ b/sdk/src/Services/SSOOIDC/Custom/_bcl+netstandard/AmazonSSOOIDCClient.Extension.cs @@ -30,7 +30,6 @@ GetSsoTokenResponse ICoreAmazonSSOOIDC.GetSsoToken(GetSsoTokenRequest request) } #endif -#if AWS_ASYNC_API async Task ICoreAmazonSSOOIDC.GetSsoTokenAsync(GetSsoTokenRequest request) { return await CoreAmazonSSOOIDC.GetSsoTokenAsync(this, request).ConfigureAwait(false); @@ -40,7 +39,6 @@ async Task ICoreAmazonSSOOIDC_V2.GetSsoTokenAsync(GetSsoTok { return await CoreAmazonSSOOIDC.GetSsoTokenAsync(this, request, cancellationToken).ConfigureAwait(false); } -#endif #if BCL GetSsoTokenResponse ICoreAmazonSSOOIDC.RefreshToken( @@ -50,12 +48,10 @@ GetSsoTokenResponse ICoreAmazonSSOOIDC.RefreshToken( } #endif -#if AWS_ASYNC_API async Task ICoreAmazonSSOOIDC.RefreshTokenAsync( GetSsoTokenResponse previousResponse) { return await CoreAmazonSSOOIDC.RefreshTokenAsync(this, previousResponse).ConfigureAwait(false); } -#endif } } diff --git a/sdk/src/Services/SecurityToken/Custom/SecurityTokenServiceRetryPolicy.cs b/sdk/src/Services/SecurityToken/Custom/SecurityTokenServiceRetryPolicy.cs index be071f21ab0e..1ad1e5b458de 100644 --- a/sdk/src/Services/SecurityToken/Custom/SecurityTokenServiceRetryPolicy.cs +++ b/sdk/src/Services/SecurityToken/Custom/SecurityTokenServiceRetryPolicy.cs @@ -14,9 +14,7 @@ */ using System; -#if AWS_ASYNC_API using System.Threading.Tasks; -#endif using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.SecurityToken.Model; @@ -49,7 +47,6 @@ public override bool RetryForException(IExecutionContext executionContext, Excep return base.RetryForException(executionContext, exception); } -#if AWS_ASYNC_API /// /// Returns true if the request should be retried. /// @@ -62,7 +59,6 @@ public override Task RetryForExceptionAsync(IExecutionContext executionCon return base.RetryForExceptionAsync(executionContext, exception); } -#endif } @@ -92,7 +88,6 @@ public override bool RetryForException(IExecutionContext executionContext, Excep return base.RetryForException(executionContext, exception); } -#if AWS_ASYNC_API /// /// Returns true if the request should be retried. /// @@ -105,7 +100,6 @@ public override Task RetryForExceptionAsync(IExecutionContext executionCon return base.RetryForExceptionAsync(executionContext, exception); } -#endif } @@ -135,7 +129,6 @@ public override bool RetryForException(IExecutionContext executionContext, Excep return base.RetryForException(executionContext, exception); } -#if AWS_ASYNC_API /// /// Returns true if the request should be retried. /// @@ -148,6 +141,5 @@ public override Task RetryForExceptionAsync(IExecutionContext executionCon return base.RetryForExceptionAsync(executionContext, exception); } -#endif } } diff --git a/sdk/src/Services/SimpleNotificationService/Custom/IAmazonSimpleNotificationService.Extensions.cs b/sdk/src/Services/SimpleNotificationService/Custom/IAmazonSimpleNotificationService.Extensions.cs index 8f17e897f5a4..54e47f053294 100644 --- a/sdk/src/Services/SimpleNotificationService/Custom/IAmazonSimpleNotificationService.Extensions.cs +++ b/sdk/src/Services/SimpleNotificationService/Custom/IAmazonSimpleNotificationService.Extensions.cs @@ -17,9 +17,7 @@ using System.Linq; using System.Text; -#if AWS_ASYNC_API using System.Threading.Tasks; -#endif using Amazon.Runtime.SharedInterfaces; using Amazon.SimpleNotificationService.Model; @@ -71,7 +69,7 @@ public partial interface IAmazonSimpleNotificationService : IDisposable /// successfully subscribed to the topic. string SubscribeQueue(string topicArn, ICoreAmazonSQS sqsClient, string sqsQueueUrl); #endif -#if AWS_ASYNC_API + /// /// Subscribes an existing Amazon SQS queue to an existing Amazon SNS topic asynchronously. /// @@ -111,7 +109,6 @@ public partial interface IAmazonSimpleNotificationService : IDisposable /// A Task containing the subscription ARN as returned by Amazon SNS when the queue is /// successfully subscribed to the topic. Task SubscribeQueueAsync(string topicArn, ICoreAmazonSQS sqsClient, string sqsQueueUrl); -#endif #if BCL /// @@ -152,7 +149,7 @@ public partial interface IAmazonSimpleNotificationService : IDisposable /// successfully subscribed to each topic. IDictionary SubscribeQueueToTopics(IList topicArns, ICoreAmazonSQS sqsClient, string sqsQueueUrl); #endif -#if AWS_ASYNC_API + /// /// Subscribes an existing Amazon SQS queue to existing Amazon SNS topics asynchronously. /// @@ -190,7 +187,7 @@ public partial interface IAmazonSimpleNotificationService : IDisposable /// A Task containing the mapping of topic ARNs to subscription ARNs as returned by Amazon SNS wrapped when the queue is /// successfully subscribed to each topic. Task> SubscribeQueueToTopicsAsync(IList topicArns, ICoreAmazonSQS sqsClient, string sqsQueueUrl); -#endif + #endregion @@ -207,7 +204,7 @@ public partial interface IAmazonSimpleNotificationService : IDisposable /// The matched SNS topic. Topic FindTopic(string topicName); #endif -#if AWS_ASYNC_API + /// /// Finds an existing Amazon SNS topic by iterating all SNS topics until a match is found asynchronously. /// @@ -218,7 +215,7 @@ public partial interface IAmazonSimpleNotificationService : IDisposable /// The name of the topic find /// A Task containing the matched SNS topic. Task FindTopicAsync(string topicName); -#endif + #endregion #region AuthorizeS3ToPublish @@ -231,7 +228,7 @@ public partial interface IAmazonSimpleNotificationService : IDisposable /// The bucket that will be given access to publish from. void AuthorizeS3ToPublish(string topicArn, string bucket); #endif -#if AWS_ASYNC_API + /// /// This is a utility method which updates the policy of a topic to allow the /// S3 bucket to publish events to it. @@ -240,7 +237,7 @@ public partial interface IAmazonSimpleNotificationService : IDisposable /// The bucket that will be given access to publish from. /// /// A Task Task AuthorizeS3ToPublishAsync(string topicArn, string bucket); -#endif + #endregion } } diff --git a/sdk/test/CSMTest/Tests/IntegrationTests/AWSSDK.CSM.IntegrationTests.NetFramework.csproj b/sdk/test/CSMTest/Tests/IntegrationTests/AWSSDK.CSM.IntegrationTests.NetFramework.csproj index e6f615cc1e28..20e2965ae94e 100644 --- a/sdk/test/CSMTest/Tests/IntegrationTests/AWSSDK.CSM.IntegrationTests.NetFramework.csproj +++ b/sdk/test/CSMTest/Tests/IntegrationTests/AWSSDK.CSM.IntegrationTests.NetFramework.csproj @@ -2,7 +2,7 @@ net472 portable - DEBUG;TRACE;BCL;AWS_ASYNC_API;CODE_ANALYSIS;LOCAL_FILE + DEBUG;TRACE;BCL;CODE_ANALYSIS;LOCAL_FILE true AWSSDK.CSM.IntegrationTests.NetFramework AWSSDK.CSM.IntegrationTests.NetFramework diff --git a/sdk/test/CSMTest/Tests/IntegrationTests/AWSSDK.CSM.IntegrationTests.NetStandard.csproj b/sdk/test/CSMTest/Tests/IntegrationTests/AWSSDK.CSM.IntegrationTests.NetStandard.csproj index 31176cd0e72d..e60c8025788e 100644 --- a/sdk/test/CSMTest/Tests/IntegrationTests/AWSSDK.CSM.IntegrationTests.NetStandard.csproj +++ b/sdk/test/CSMTest/Tests/IntegrationTests/AWSSDK.CSM.IntegrationTests.NetStandard.csproj @@ -2,7 +2,7 @@ netcoreapp3.1;net8.0 portable - $(DefineConstants);$(DefineConstants);NETSTANDARD;AWS_ASYNC_API + $(DefineConstants);$(DefineConstants);NETSTANDARD true AWSSDK.CSM.IntegrationTests.NetStandard AWSSDK.CSM.IntegrationTests.NetStandard diff --git a/sdk/test/NetStandard/UnitTests/AWSSDK.UnitTests.Custom.NetStandard.csproj b/sdk/test/NetStandard/UnitTests/AWSSDK.UnitTests.Custom.NetStandard.csproj index 39a8e34410a8..edbb3d5bc2fb 100644 --- a/sdk/test/NetStandard/UnitTests/AWSSDK.UnitTests.Custom.NetStandard.csproj +++ b/sdk/test/NetStandard/UnitTests/AWSSDK.UnitTests.Custom.NetStandard.csproj @@ -7,7 +7,7 @@ This project file should not be used as part of a release pipeline. netstandard2.0;netcoreapp3.1;net8.0 - $(DefineConstants);NETSTANDARD;AWS_ASYNC_API + $(DefineConstants);NETSTANDARD portable UnitTests $(DefineConstants) diff --git a/sdk/test/NetStandard/UnitTests/UnitTests.NetStandard.CoreOnly.csproj b/sdk/test/NetStandard/UnitTests/UnitTests.NetStandard.CoreOnly.csproj index 21201cf0ff5d..be5f3c5718b8 100644 --- a/sdk/test/NetStandard/UnitTests/UnitTests.NetStandard.CoreOnly.csproj +++ b/sdk/test/NetStandard/UnitTests/UnitTests.NetStandard.CoreOnly.csproj @@ -2,7 +2,7 @@ netstandard2.0;netcoreapp3.1;net8.0 - $(DefineConstants);NETSTANDARD;AWS_ASYNC_API + $(DefineConstants);NETSTANDARD portable UnitTests.NetStandard.CoreOnly UnitTests.NetStandard.CoreOnly diff --git a/sdk/test/NetStandard/UnitTests/UnitTests.NetStandard.csproj b/sdk/test/NetStandard/UnitTests/UnitTests.NetStandard.csproj index 6d5f79191292..11c08fd9f10f 100644 --- a/sdk/test/NetStandard/UnitTests/UnitTests.NetStandard.csproj +++ b/sdk/test/NetStandard/UnitTests/UnitTests.NetStandard.csproj @@ -2,7 +2,7 @@ netstandard2.0;netcoreapp3.1;net8.0 - $(DefineConstants);NETSTANDARD;AWS_ASYNC_API + $(DefineConstants);NETSTANDARD portable UnitTests UnitTests diff --git a/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetStandard.csproj b/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetStandard.csproj index 93c373076906..fdda136e02c7 100644 --- a/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetStandard.csproj +++ b/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetStandard.csproj @@ -2,7 +2,7 @@ true netstandard2.0;netcoreapp3.1;net8.0 - $(DefineConstants);NETSTANDARD;AWS_ASYNC_API + $(DefineConstants);NETSTANDARD portable true AWSSDK.ProtocolTests diff --git a/sdk/test/Services/BearerTokenAuthTest/BearerTokenAuthTest.sln b/sdk/test/Services/BearerTokenAuthTest/BearerTokenAuthTest.sln index b8fc1ec6074a..9547aa1dbb5b 100644 --- a/sdk/test/Services/BearerTokenAuthTest/BearerTokenAuthTest.sln +++ b/sdk/test/Services/BearerTokenAuthTest/BearerTokenAuthTest.sln @@ -2,15 +2,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.32112.339 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.BearerTokenAuthTest.Net35", "AWSSDK.BearerTokenAuthTest.Net35.csproj", "{A95FF2B5-29BA-47A9-A727-ED9EDE75A3A6}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.BearerTokenAuthTest.Net45", "AWSSDK.BearerTokenAuthTest.Net45.csproj", "{34C91FE0-65E3-4BFA-9A60-C16C9ED95661}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.BearerTokenAuthTest.NetFramework", "AWSSDK.BearerTokenAuthTest.NetFramework.csproj", "{34C91FE0-65E3-4BFA-9A60-C16C9ED95661}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.BearerTokenAuthTest.NetStandard", "AWSSDK.BearerTokenAuthTest.NetStandard.csproj", "{EDED5705-E83B-4218-8511-4496E421A16E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.UnitTests.BearerTokenAuthTest.Net35", "UnitTests\AWSSDK.UnitTests.BearerTokenAuthTest.Net35.csproj", "{85579F09-B8E3-467B-9687-D006CD51E21A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.UnitTests.BearerTokenAuthTest.Net45", "UnitTests\AWSSDK.UnitTests.BearerTokenAuthTest.Net45.csproj", "{B4101233-2606-4AC5-8381-C65C37062433}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.UnitTests.BearerTokenAuthTest.NetFramework", "UnitTests\AWSSDK.UnitTests.BearerTokenAuthTest.NetFramework.csproj", "{B4101233-2606-4AC5-8381-C65C37062433}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{EA8EC966-6E20-40F1-B2A8-6FA57FD09109}" EndProject @@ -22,23 +18,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BearerTokenAuthTest", "Bear EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.CommonTest", "..\..\Common\AWSSDK.CommonTest.csproj", "{CB154817-7EE6-44D4-8D2E-26ADEE1796B0}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.UnitTestUtilities.Net35", "..\..\UnitTests\Custom\AWSSDK.UnitTestUtilities.Net35.csproj", "{A18E6335-5F20-4895-9F0F-04E6E3126C31}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.UnitTestUtilities.Net45", "..\..\UnitTests\Custom\AWSSDK.UnitTestUtilities.Net45.csproj", "{F0607948-1B0C-4154-A69C-4265A777D68B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.UnitTestUtilities.NetFramework", "..\..\UnitTests\Custom\AWSSDK.UnitTestUtilities.NetFramework.csproj", "{F0607948-1B0C-4154-A69C-4265A777D68B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceClientGeneratorLib", "..\..\..\..\generator\ServiceClientGeneratorLib\ServiceClientGeneratorLib.csproj", "{68C67123-E660-424B-AA4E-AF4AD0511340}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.Core.Net35", "..\..\..\src\Core\AWSSDK.Core.Net35.csproj", "{6259E58B-C4F1-49EA-AC0F-B25DF62E1692}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.Core.Net45", "..\..\..\src\Core\AWSSDK.Core.Net45.csproj", "{F4EEAFD9-7272-41D3-AA40-6787FC567026}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.Core.NetFramework", "..\..\..\src\Core\AWSSDK.Core.NetFramework.csproj", "{F4EEAFD9-7272-41D3-AA40-6787FC567026}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.Core.NetStandard", "..\..\..\src\Core\AWSSDK.Core.NetStandard.csproj", "{822182F3-8B39-4FE4-8BFD-A34E0BB20CD7}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IntegrationTestDependencies", "IntegrationTestDependencies", "{705098E4-8A61-4E67-A10C-36B8BDCAA705}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.Extensions.CrtIntegration.Net35", "..\..\..\..\extensions\src\AWSSDK.Extensions.CrtIntegration\AWSSDK.Extensions.CrtIntegration.Net35.csproj", "{E5DC7254-6EB1-46C5-A89B-9C98E58AADE1}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.Extensions.CrtIntegration.Net45", "..\..\..\..\extensions\src\AWSSDK.Extensions.CrtIntegration\AWSSDK.Extensions.CrtIntegration.Net45.csproj", "{F8E79D9D-DB44-4EBF-BFBC-8946D0B5E9C3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.Extensions.CrtIntegration.NetFramework", "..\..\..\..\extensions\src\AWSSDK.Extensions.CrtIntegration\AWSSDK.Extensions.CrtIntegration.NetFramework.csproj", "{F8E79D9D-DB44-4EBF-BFBC-8946D0B5E9C3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -46,10 +36,6 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A95FF2B5-29BA-47A9-A727-ED9EDE75A3A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A95FF2B5-29BA-47A9-A727-ED9EDE75A3A6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A95FF2B5-29BA-47A9-A727-ED9EDE75A3A6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A95FF2B5-29BA-47A9-A727-ED9EDE75A3A6}.Release|Any CPU.Build.0 = Release|Any CPU {34C91FE0-65E3-4BFA-9A60-C16C9ED95661}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34C91FE0-65E3-4BFA-9A60-C16C9ED95661}.Debug|Any CPU.Build.0 = Debug|Any CPU {34C91FE0-65E3-4BFA-9A60-C16C9ED95661}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -58,10 +44,6 @@ Global {EDED5705-E83B-4218-8511-4496E421A16E}.Debug|Any CPU.Build.0 = Debug|Any CPU {EDED5705-E83B-4218-8511-4496E421A16E}.Release|Any CPU.ActiveCfg = Release|Any CPU {EDED5705-E83B-4218-8511-4496E421A16E}.Release|Any CPU.Build.0 = Release|Any CPU - {85579F09-B8E3-467B-9687-D006CD51E21A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {85579F09-B8E3-467B-9687-D006CD51E21A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {85579F09-B8E3-467B-9687-D006CD51E21A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {85579F09-B8E3-467B-9687-D006CD51E21A}.Release|Any CPU.Build.0 = Release|Any CPU {B4101233-2606-4AC5-8381-C65C37062433}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B4101233-2606-4AC5-8381-C65C37062433}.Debug|Any CPU.Build.0 = Debug|Any CPU {B4101233-2606-4AC5-8381-C65C37062433}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -70,10 +52,6 @@ Global {CB154817-7EE6-44D4-8D2E-26ADEE1796B0}.Debug|Any CPU.Build.0 = Debug|Any CPU {CB154817-7EE6-44D4-8D2E-26ADEE1796B0}.Release|Any CPU.ActiveCfg = Release|Any CPU {CB154817-7EE6-44D4-8D2E-26ADEE1796B0}.Release|Any CPU.Build.0 = Release|Any CPU - {A18E6335-5F20-4895-9F0F-04E6E3126C31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A18E6335-5F20-4895-9F0F-04E6E3126C31}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A18E6335-5F20-4895-9F0F-04E6E3126C31}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A18E6335-5F20-4895-9F0F-04E6E3126C31}.Release|Any CPU.Build.0 = Release|Any CPU {F0607948-1B0C-4154-A69C-4265A777D68B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F0607948-1B0C-4154-A69C-4265A777D68B}.Debug|Any CPU.Build.0 = Debug|Any CPU {F0607948-1B0C-4154-A69C-4265A777D68B}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -82,10 +60,6 @@ Global {68C67123-E660-424B-AA4E-AF4AD0511340}.Debug|Any CPU.Build.0 = Debug|Any CPU {68C67123-E660-424B-AA4E-AF4AD0511340}.Release|Any CPU.ActiveCfg = Release|Any CPU {68C67123-E660-424B-AA4E-AF4AD0511340}.Release|Any CPU.Build.0 = Release|Any CPU - {6259E58B-C4F1-49EA-AC0F-B25DF62E1692}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6259E58B-C4F1-49EA-AC0F-B25DF62E1692}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6259E58B-C4F1-49EA-AC0F-B25DF62E1692}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6259E58B-C4F1-49EA-AC0F-B25DF62E1692}.Release|Any CPU.Build.0 = Release|Any CPU {F4EEAFD9-7272-41D3-AA40-6787FC567026}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F4EEAFD9-7272-41D3-AA40-6787FC567026}.Debug|Any CPU.Build.0 = Debug|Any CPU {F4EEAFD9-7272-41D3-AA40-6787FC567026}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -94,10 +68,6 @@ Global {822182F3-8B39-4FE4-8BFD-A34E0BB20CD7}.Debug|Any CPU.Build.0 = Debug|Any CPU {822182F3-8B39-4FE4-8BFD-A34E0BB20CD7}.Release|Any CPU.ActiveCfg = Release|Any CPU {822182F3-8B39-4FE4-8BFD-A34E0BB20CD7}.Release|Any CPU.Build.0 = Release|Any CPU - {E5DC7254-6EB1-46C5-A89B-9C98E58AADE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E5DC7254-6EB1-46C5-A89B-9C98E58AADE1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E5DC7254-6EB1-46C5-A89B-9C98E58AADE1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E5DC7254-6EB1-46C5-A89B-9C98E58AADE1}.Release|Any CPU.Build.0 = Release|Any CPU {F8E79D9D-DB44-4EBF-BFBC-8946D0B5E9C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F8E79D9D-DB44-4EBF-BFBC-8946D0B5E9C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {F8E79D9D-DB44-4EBF-BFBC-8946D0B5E9C3}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -107,20 +77,15 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {A95FF2B5-29BA-47A9-A727-ED9EDE75A3A6} = {521B68F1-39A1-4A5D-BE8E-9B61ECCA63AA} {34C91FE0-65E3-4BFA-9A60-C16C9ED95661} = {521B68F1-39A1-4A5D-BE8E-9B61ECCA63AA} {EDED5705-E83B-4218-8511-4496E421A16E} = {521B68F1-39A1-4A5D-BE8E-9B61ECCA63AA} - {85579F09-B8E3-467B-9687-D006CD51E21A} = {EA8EC966-6E20-40F1-B2A8-6FA57FD09109} {B4101233-2606-4AC5-8381-C65C37062433} = {EA8EC966-6E20-40F1-B2A8-6FA57FD09109} {521B68F1-39A1-4A5D-BE8E-9B61ECCA63AA} = {5CE46581-63F5-4C41-844E-2913ED987A25} {CB154817-7EE6-44D4-8D2E-26ADEE1796B0} = {EA8EC966-6E20-40F1-B2A8-6FA57FD09109} - {A18E6335-5F20-4895-9F0F-04E6E3126C31} = {EA8EC966-6E20-40F1-B2A8-6FA57FD09109} {F0607948-1B0C-4154-A69C-4265A777D68B} = {EA8EC966-6E20-40F1-B2A8-6FA57FD09109} {68C67123-E660-424B-AA4E-AF4AD0511340} = {EA8EC966-6E20-40F1-B2A8-6FA57FD09109} - {6259E58B-C4F1-49EA-AC0F-B25DF62E1692} = {36AD9314-F760-4468-A6D5-BF3D8A785AFF} {F4EEAFD9-7272-41D3-AA40-6787FC567026} = {36AD9314-F760-4468-A6D5-BF3D8A785AFF} {822182F3-8B39-4FE4-8BFD-A34E0BB20CD7} = {36AD9314-F760-4468-A6D5-BF3D8A785AFF} - {E5DC7254-6EB1-46C5-A89B-9C98E58AADE1} = {705098E4-8A61-4E67-A10C-36B8BDCAA705} {F8E79D9D-DB44-4EBF-BFBC-8946D0B5E9C3} = {705098E4-8A61-4E67-A10C-36B8BDCAA705} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution diff --git a/sdk/test/Services/CognitoSync/IntegrationTests/AWSSDK.IntegrationTests.CognitoSync.NetFramework.csproj b/sdk/test/Services/CognitoSync/IntegrationTests/AWSSDK.IntegrationTests.CognitoSync.NetFramework.csproj index 845f5b57cf5f..192527e538cf 100644 --- a/sdk/test/Services/CognitoSync/IntegrationTests/AWSSDK.IntegrationTests.CognitoSync.NetFramework.csproj +++ b/sdk/test/Services/CognitoSync/IntegrationTests/AWSSDK.IntegrationTests.CognitoSync.NetFramework.csproj @@ -50,9 +50,4 @@ - - - - - \ No newline at end of file diff --git a/sdk/test/Services/ProtocolTestServices.NetFramework.sln b/sdk/test/Services/ProtocolTestServices.NetFramework.sln index d8a800325fbc..d1c41b201e23 100644 --- a/sdk/test/Services/ProtocolTestServices.NetFramework.sln +++ b/sdk/test/Services/ProtocolTestServices.NetFramework.sln @@ -3,21 +3,21 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.8.34511.84 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.Core.Net45", "..\..\src\Core\AWSSDK.Core.Net45.csproj", "{DEB7558F-8951-4798-8B43-0CBAE1578D61}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.Core.NetFramework", "..\..\src\Core\AWSSDK.Core.NetFramework.csproj", "{DEB7558F-8951-4798-8B43-0CBAE1578D61}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.EC2Protocol.Net45", "EC2Protocol\AWSSDK.EC2Protocol.Net45.csproj", "{7245C0FC-DC66-4FB0-B3A1-9F9F4655843F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.EC2Protocol.NetFramework", "EC2Protocol\AWSSDK.EC2Protocol.NetFramework.csproj", "{7245C0FC-DC66-4FB0-B3A1-9F9F4655843F}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.JsonProtocol.Net45", "JsonProtocol\AWSSDK.JsonProtocol.Net45.csproj", "{174FFB1B-BD05-468E-A878-4D032213CF14}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.JsonProtocol.NetFramework", "JsonProtocol\AWSSDK.JsonProtocol.NetFramework.csproj", "{174FFB1B-BD05-468E-A878-4D032213CF14}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.JSONRPC10.Net45", "JSONRPC10\AWSSDK.JSONRPC10.Net45.csproj", "{9031CD7F-05C9-409D-8F0A-D5912CF07274}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.JSONRPC10.NetFramework", "JSONRPC10\AWSSDK.JSONRPC10.NetFramework.csproj", "{9031CD7F-05C9-409D-8F0A-D5912CF07274}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.QueryProtocol.Net45", "QueryProtocol\AWSSDK.QueryProtocol.Net45.csproj", "{60B1700F-ABDD-4FA5-A933-59641EBDD4BF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.QueryProtocol.NetFramework", "QueryProtocol\AWSSDK.QueryProtocol.NetFramework.csproj", "{60B1700F-ABDD-4FA5-A933-59641EBDD4BF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.RestJsonProtocol.Net45", "RestJsonProtocol\AWSSDK.RestJsonProtocol.Net45.csproj", "{E286B6C2-35FB-4A2A-95DA-9CF6DB635212}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.RestJsonProtocol.NetFramework", "RestJsonProtocol\AWSSDK.RestJsonProtocol.NetFramework.csproj", "{E286B6C2-35FB-4A2A-95DA-9CF6DB635212}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.RestXmlProtocol.Net45", "RestXmlProtocol\AWSSDK.RestXmlProtocol.Net45.csproj", "{F2784555-5671-4298-8AA8-5B138E3F20E8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.RestXmlProtocol.NetFramework", "RestXmlProtocol\AWSSDK.RestXmlProtocol.NetFramework.csproj", "{F2784555-5671-4298-8AA8-5B138E3F20E8}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.RestXmlProtocolNamespace.Net45", "RestXmlProtocolNamespace\AWSSDK.RestXmlProtocolNamespace.Net45.csproj", "{EB946AFC-3C70-4962-86D5-1DE56106531F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.RestXmlProtocolNamespace.NetFramework", "RestXmlProtocolNamespace\AWSSDK.RestXmlProtocolNamespace.NetFramework.csproj", "{EB946AFC-3C70-4962-86D5-1DE56106531F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/sdk/test/Services/RestJsonTest/UnitTests/RestJsonTests.cs b/sdk/test/Services/RestJsonTest/UnitTests/RestJsonTests.cs index 906eb9ddc07b..a513284a1987 100644 --- a/sdk/test/Services/RestJsonTest/UnitTests/RestJsonTests.cs +++ b/sdk/test/Services/RestJsonTest/UnitTests/RestJsonTests.cs @@ -10,7 +10,7 @@ using System.IO; using System.Text; -namespace AWSSDK.UnitTests.RestJsonTest.Net35 +namespace AWSSDK.UnitTests.RestJsonTest { [TestClass] public class RestJsonTests diff --git a/sdk/test/Services/RestXMLTest/UnitTests/HeaderListMarshallingTests.cs b/sdk/test/Services/RestXMLTest/UnitTests/HeaderListMarshallingTests.cs index 319a263b731f..d2b857c72164 100644 --- a/sdk/test/Services/RestXMLTest/UnitTests/HeaderListMarshallingTests.cs +++ b/sdk/test/Services/RestXMLTest/UnitTests/HeaderListMarshallingTests.cs @@ -4,7 +4,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Collections.Generic; -namespace AWSSDK.UnitTests.RestJsonTest.Net35 +namespace AWSSDK.UnitTests.RestJsonTest { [TestClass] public class HeaderListMarshallingTests diff --git a/sdk/test/SmokeTests/AWSSDK.SmokeTests.NetStandard.csproj b/sdk/test/SmokeTests/AWSSDK.SmokeTests.NetStandard.csproj index a14175ae1999..1a3d1b80ac91 100644 --- a/sdk/test/SmokeTests/AWSSDK.SmokeTests.NetStandard.csproj +++ b/sdk/test/SmokeTests/AWSSDK.SmokeTests.NetStandard.csproj @@ -2,7 +2,7 @@ netstandard2.0;netcoreapp3.1;net8.0 - $(DefineConstants);NETSTANDARD;AWS_ASYNC_API + $(DefineConstants);NETSTANDARD portable AWSSDK.SmokeTests.NetStandard AWSSDK.SmokeTests.NetStandard diff --git a/sdk/test/UnitTests/AWSSDK.UnitTests.Custom.NetFramework.csproj b/sdk/test/UnitTests/AWSSDK.UnitTests.Custom.NetFramework.csproj index 6bb744c6b67a..8f73a432c911 100644 --- a/sdk/test/UnitTests/AWSSDK.UnitTests.Custom.NetFramework.csproj +++ b/sdk/test/UnitTests/AWSSDK.UnitTests.Custom.NetFramework.csproj @@ -7,7 +7,7 @@ This project file should not be used as part of a release pipeline. net472 - $(DefineConstants);TRACE;BCL;ASYNC_AWAIT;DEBUG;AWS_ASYNC_API + $(DefineConstants);TRACE;BCL;ASYNC_AWAIT;DEBUG portable true AWSSDK.UnitTests.NetFramework diff --git a/sdk/test/UnitTests/Custom/AWSSDK.UnitTestUtilities.NetStandard.csproj b/sdk/test/UnitTests/Custom/AWSSDK.UnitTestUtilities.NetStandard.csproj index 38d9395e8240..2feaf97db573 100644 --- a/sdk/test/UnitTests/Custom/AWSSDK.UnitTestUtilities.NetStandard.csproj +++ b/sdk/test/UnitTests/Custom/AWSSDK.UnitTestUtilities.NetStandard.csproj @@ -1,7 +1,7 @@  netstandard2.0;netcoreapp3.1;net8.0 - $(DefineConstants);NETSTANDARD;AWS_ASYNC_API + $(DefineConstants);NETSTANDARD $(DefineConstants);NETSTANDARD20;AWS_ASYNC_ENUMERABLES_API $(DefineConstants);AWS_ASYNC_ENUMERABLES_API $(DefineConstants);AWS_ASYNC_ENUMERABLES_API diff --git a/sdk/test/UnitTests/Custom/Runtime/BearerTokenSignerTests.cs b/sdk/test/UnitTests/Custom/Runtime/BearerTokenSignerTests.cs index c06447787f09..9acc97a8ffbf 100644 --- a/sdk/test/UnitTests/Custom/Runtime/BearerTokenSignerTests.cs +++ b/sdk/test/UnitTests/Custom/Runtime/BearerTokenSignerTests.cs @@ -63,8 +63,6 @@ public void SignThrowsExceptionIfSchemeIsHttp() Assert.IsTrue(exception.Message.Contains("Endpoint must not use 'http'")); } - -#if AWS_ASYNC_API [TestMethod] [TestCategory("UnitTest")] [TestCategory("Runtime")] @@ -95,7 +93,6 @@ await signer.SignAsync( Assert.IsNotNull(exception); Assert.IsTrue(exception.Message.Contains("Endpoint must not use 'http'")); } -#endif [TestMethod] [TestCategory("UnitTest")] @@ -116,7 +113,6 @@ public void MinimalBearerAuthCase() AssertAuthorizationHeaderIs(context, fakeAuthToken); } -#if AWS_ASYNC_API [TestMethod] [TestCategory("UnitTest")] [TestCategory("Runtime")] @@ -135,7 +131,6 @@ public async Task MinimalBearerAuthCaseAsync() AssertAuthorizationHeaderIs(context, fakeAuthToken); } -#endif [TestMethod] [TestCategory("UnitTest")] @@ -156,7 +151,6 @@ public void LongerTokenCase() AssertAuthorizationHeaderIs(context, fakeAuthToken); } -#if AWS_ASYNC_API [TestMethod] [TestCategory("UnitTest")] [TestCategory("Runtime")] @@ -175,7 +169,6 @@ public async Task LongerTokenCaseAsync() AssertAuthorizationHeaderIs(context, fakeAuthToken); } -#endif [TestMethod] [TestCategory("UnitTest")] @@ -200,7 +193,6 @@ public void SignerShouldOverrideExistingHeader() AssertAuthorizationHeaderIs(context, fakeAuthToken); } -#if AWS_ASYNC_API [TestMethod] [TestCategory("UnitTest")] [TestCategory("Runtime")] @@ -223,7 +215,6 @@ public async Task SignerShouldOverrideExistingHeaderAsync() AssertAuthorizationHeaderIs(context, fakeAuthToken); } -#endif [TestMethod] [TestCategory("UnitTest")] diff --git a/sdk/test/UnitTests/Custom/Runtime/TerminatePipeline.cs b/sdk/test/UnitTests/Custom/Runtime/TerminatePipeline.cs index df07fbf11204..5263448e4bb9 100644 --- a/sdk/test/UnitTests/Custom/Runtime/TerminatePipeline.cs +++ b/sdk/test/UnitTests/Custom/Runtime/TerminatePipeline.cs @@ -43,13 +43,11 @@ public override void InvokeSync(IExecutionContext executionContext) throw new Exception("Terminating Pipeline"); } -#if AWS_ASYNC_API public override System.Threading.Tasks.Task InvokeAsync(IExecutionContext executionContext) { CapturedContext = executionContext; throw new Exception("Terminating Pipeline"); } -#endif } } \ No newline at end of file