From 9522e1dd2e0c0a5b5bb2e9c4e37a31130a7940ff Mon Sep 17 00:00:00 2001 From: John Luo Date: Wed, 15 Jan 2020 12:08:17 -0800 Subject: [PATCH] Multi-target all shared framework projects with netcoreapp3.1 (#17998) - regen ref --- ...NetCore.DataProtection.Abstractions.csproj | 7 +++- ....DataProtection.Abstractions.netcoreapp.cs | 33 +++++++++++++++++++ ...NetCore.DataProtection.Abstractions.csproj | 2 +- ...ft.AspNetCore.Cryptography.Internal.csproj | 7 +++- ...etCore.Cryptography.Internal.netcoreapp.cs | 3 ++ ...ft.AspNetCore.Cryptography.Internal.csproj | 2 +- ...pNetCore.Cryptography.KeyDerivation.csproj | 9 ++++- ...pNetCore.Cryptography.KeyDerivation.csproj | 2 +- .../src/PBKDF2/NetCorePbkdf2Provider.cs | 2 +- .../src/PBKDF2/Pbkdf2Util.cs | 2 +- .../ref/Microsoft.AspNetCore.Metadata.csproj | 5 ++- ...icrosoft.AspNetCore.Metadata.netcoreapp.cs | 15 +++++++++ .../src/Microsoft.AspNetCore.Metadata.csproj | 2 +- 13 files changed, 81 insertions(+), 10 deletions(-) create mode 100644 src/DataProtection/Abstractions/ref/Microsoft.AspNetCore.DataProtection.Abstractions.netcoreapp.cs create mode 100644 src/DataProtection/Cryptography.Internal/ref/Microsoft.AspNetCore.Cryptography.Internal.netcoreapp.cs create mode 100644 src/Http/Metadata/ref/Microsoft.AspNetCore.Metadata.netcoreapp.cs diff --git a/src/DataProtection/Abstractions/ref/Microsoft.AspNetCore.DataProtection.Abstractions.csproj b/src/DataProtection/Abstractions/ref/Microsoft.AspNetCore.DataProtection.Abstractions.csproj index 6461cb0623..a42a893d8f 100644 --- a/src/DataProtection/Abstractions/ref/Microsoft.AspNetCore.DataProtection.Abstractions.csproj +++ b/src/DataProtection/Abstractions/ref/Microsoft.AspNetCore.DataProtection.Abstractions.csproj @@ -1,11 +1,16 @@ - netstandard2.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) + + + + + diff --git a/src/DataProtection/Abstractions/ref/Microsoft.AspNetCore.DataProtection.Abstractions.netcoreapp.cs b/src/DataProtection/Abstractions/ref/Microsoft.AspNetCore.DataProtection.Abstractions.netcoreapp.cs new file mode 100644 index 0000000000..fcd0fcb0b7 --- /dev/null +++ b/src/DataProtection/Abstractions/ref/Microsoft.AspNetCore.DataProtection.Abstractions.netcoreapp.cs @@ -0,0 +1,33 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +namespace Microsoft.AspNetCore.DataProtection +{ + public static partial class DataProtectionCommonExtensions + { + public static Microsoft.AspNetCore.DataProtection.IDataProtector CreateProtector(this Microsoft.AspNetCore.DataProtection.IDataProtectionProvider provider, System.Collections.Generic.IEnumerable purposes) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtector CreateProtector(this Microsoft.AspNetCore.DataProtection.IDataProtectionProvider provider, string purpose, params string[] subPurposes) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider GetDataProtectionProvider(this System.IServiceProvider services) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtector GetDataProtector(this System.IServiceProvider services, System.Collections.Generic.IEnumerable purposes) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtector GetDataProtector(this System.IServiceProvider services, string purpose, params string[] subPurposes) { throw null; } + public static string Protect(this Microsoft.AspNetCore.DataProtection.IDataProtector protector, string plaintext) { throw null; } + public static string Unprotect(this Microsoft.AspNetCore.DataProtection.IDataProtector protector, string protectedData) { throw null; } + } + public partial interface IDataProtectionProvider + { + Microsoft.AspNetCore.DataProtection.IDataProtector CreateProtector(string purpose); + } + public partial interface IDataProtector : Microsoft.AspNetCore.DataProtection.IDataProtectionProvider + { + byte[] Protect(byte[] plaintext); + byte[] Unprotect(byte[] protectedData); + } +} +namespace Microsoft.AspNetCore.DataProtection.Infrastructure +{ + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public partial interface IApplicationDiscriminator + { + string Discriminator { get; } + } +} diff --git a/src/DataProtection/Abstractions/src/Microsoft.AspNetCore.DataProtection.Abstractions.csproj b/src/DataProtection/Abstractions/src/Microsoft.AspNetCore.DataProtection.Abstractions.csproj index 8b7fb04cd7..03cf5d11e5 100644 --- a/src/DataProtection/Abstractions/src/Microsoft.AspNetCore.DataProtection.Abstractions.csproj +++ b/src/DataProtection/Abstractions/src/Microsoft.AspNetCore.DataProtection.Abstractions.csproj @@ -5,7 +5,7 @@ Commonly used types: Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Microsoft.AspNetCore.DataProtection.IDataProtector - netstandard2.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) true true true diff --git a/src/DataProtection/Cryptography.Internal/ref/Microsoft.AspNetCore.Cryptography.Internal.csproj b/src/DataProtection/Cryptography.Internal/ref/Microsoft.AspNetCore.Cryptography.Internal.csproj index 823b288f69..462f2dddf5 100644 --- a/src/DataProtection/Cryptography.Internal/ref/Microsoft.AspNetCore.Cryptography.Internal.csproj +++ b/src/DataProtection/Cryptography.Internal/ref/Microsoft.AspNetCore.Cryptography.Internal.csproj @@ -1,11 +1,16 @@ - netstandard2.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) + + + + + diff --git a/src/DataProtection/Cryptography.Internal/ref/Microsoft.AspNetCore.Cryptography.Internal.netcoreapp.cs b/src/DataProtection/Cryptography.Internal/ref/Microsoft.AspNetCore.Cryptography.Internal.netcoreapp.cs new file mode 100644 index 0000000000..618082bc4a --- /dev/null +++ b/src/DataProtection/Cryptography.Internal/ref/Microsoft.AspNetCore.Cryptography.Internal.netcoreapp.cs @@ -0,0 +1,3 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + diff --git a/src/DataProtection/Cryptography.Internal/src/Microsoft.AspNetCore.Cryptography.Internal.csproj b/src/DataProtection/Cryptography.Internal/src/Microsoft.AspNetCore.Cryptography.Internal.csproj index 9fbec5f398..1f340cfe15 100644 --- a/src/DataProtection/Cryptography.Internal/src/Microsoft.AspNetCore.Cryptography.Internal.csproj +++ b/src/DataProtection/Cryptography.Internal/src/Microsoft.AspNetCore.Cryptography.Internal.csproj @@ -2,7 +2,7 @@ Infrastructure for ASP.NET Core cryptographic packages. Applications and libraries should not reference this package directly. - netstandard2.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) true true $(NoWarn);CS1591 diff --git a/src/DataProtection/Cryptography.KeyDerivation/ref/Microsoft.AspNetCore.Cryptography.KeyDerivation.csproj b/src/DataProtection/Cryptography.KeyDerivation/ref/Microsoft.AspNetCore.Cryptography.KeyDerivation.csproj index c9850676ba..311b1a944c 100644 --- a/src/DataProtection/Cryptography.KeyDerivation/ref/Microsoft.AspNetCore.Cryptography.KeyDerivation.csproj +++ b/src/DataProtection/Cryptography.KeyDerivation/ref/Microsoft.AspNetCore.Cryptography.KeyDerivation.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netcoreapp2.0 + netstandard2.0;netcoreapp2.0;$(DefaultNetCoreTargetFramework) @@ -16,4 +16,11 @@ + + + + + + + diff --git a/src/DataProtection/Cryptography.KeyDerivation/src/Microsoft.AspNetCore.Cryptography.KeyDerivation.csproj b/src/DataProtection/Cryptography.KeyDerivation/src/Microsoft.AspNetCore.Cryptography.KeyDerivation.csproj index dea0ee73e2..9bd47ba7c3 100644 --- a/src/DataProtection/Cryptography.KeyDerivation/src/Microsoft.AspNetCore.Cryptography.KeyDerivation.csproj +++ b/src/DataProtection/Cryptography.KeyDerivation/src/Microsoft.AspNetCore.Cryptography.KeyDerivation.csproj @@ -2,7 +2,7 @@ ASP.NET Core utilities for key derivation. - netstandard2.0;netcoreapp2.0 + netstandard2.0;netcoreapp2.0;$(DefaultNetCoreTargetFramework) true true true diff --git a/src/DataProtection/Cryptography.KeyDerivation/src/PBKDF2/NetCorePbkdf2Provider.cs b/src/DataProtection/Cryptography.KeyDerivation/src/PBKDF2/NetCorePbkdf2Provider.cs index 11b8f481bb..d6bd494b1c 100644 --- a/src/DataProtection/Cryptography.KeyDerivation/src/PBKDF2/NetCorePbkdf2Provider.cs +++ b/src/DataProtection/Cryptography.KeyDerivation/src/PBKDF2/NetCorePbkdf2Provider.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -#if NETCOREAPP2_0 +#if NETCOREAPP using System; using System.Diagnostics; using System.Security.Cryptography; diff --git a/src/DataProtection/Cryptography.KeyDerivation/src/PBKDF2/Pbkdf2Util.cs b/src/DataProtection/Cryptography.KeyDerivation/src/PBKDF2/Pbkdf2Util.cs index 9b2ecf1008..a3340b13b2 100644 --- a/src/DataProtection/Cryptography.KeyDerivation/src/PBKDF2/Pbkdf2Util.cs +++ b/src/DataProtection/Cryptography.KeyDerivation/src/PBKDF2/Pbkdf2Util.cs @@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.Cryptography.KeyDerivation.PBKDF2 { #if NETSTANDARD2_0 return new ManagedPbkdf2Provider(); -#elif NETCOREAPP2_0 +#elif NETCOREAPP // fastest implementation on .NET Core for Linux/macOS. // Not supported on .NET Framework return new NetCorePbkdf2Provider(); diff --git a/src/Http/Metadata/ref/Microsoft.AspNetCore.Metadata.csproj b/src/Http/Metadata/ref/Microsoft.AspNetCore.Metadata.csproj index da5e9234e8..2661d12430 100644 --- a/src/Http/Metadata/ref/Microsoft.AspNetCore.Metadata.csproj +++ b/src/Http/Metadata/ref/Microsoft.AspNetCore.Metadata.csproj @@ -1,9 +1,12 @@ - netstandard2.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) + + + diff --git a/src/Http/Metadata/ref/Microsoft.AspNetCore.Metadata.netcoreapp.cs b/src/Http/Metadata/ref/Microsoft.AspNetCore.Metadata.netcoreapp.cs new file mode 100644 index 0000000000..effddb3203 --- /dev/null +++ b/src/Http/Metadata/ref/Microsoft.AspNetCore.Metadata.netcoreapp.cs @@ -0,0 +1,15 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +namespace Microsoft.AspNetCore.Authorization +{ + public partial interface IAllowAnonymous + { + } + public partial interface IAuthorizeData + { + string AuthenticationSchemes { get; set; } + string Policy { get; set; } + string Roles { get; set; } + } +} diff --git a/src/Http/Metadata/src/Microsoft.AspNetCore.Metadata.csproj b/src/Http/Metadata/src/Microsoft.AspNetCore.Metadata.csproj index 10a3baad25..235a0c98c3 100644 --- a/src/Http/Metadata/src/Microsoft.AspNetCore.Metadata.csproj +++ b/src/Http/Metadata/src/Microsoft.AspNetCore.Metadata.csproj @@ -2,7 +2,7 @@ ASP.NET Core metadata. - netstandard2.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) true true $(NoWarn);CS1591