From 7dfc2fe46bd3939161247df59da0fb7435449a2f Mon Sep 17 00:00:00 2001 From: Hisham Bin Ateya Date: Fri, 9 Aug 2019 00:32:48 +0300 Subject: [PATCH 01/22] Fix GetResourcePrefix() that causes an issue with using Rootnamespace (dotnet/extensions#2081) * Fix GetResourcePrefix() that causes an issue with using Rootnamespace Update GetResourcePrefix to use baseNamespace to calculate resource prefix rather than assembly name. Addresses issues aspnet/AspNetCoredotnet/extensions#10639\n\nCommit migrated from https://github.com/dotnet/extensions/commit/2303aa23ddf5a2ffff866911a55f4f88782a215b --- .../ResourceManagerStringLocalizerFactory.cs | 7 +- .../AssemblyInfo.cs | 5 + .../Controllers/ValuesController.cs | 9 ++ ...ns.Localization.RootNamespace.Tests.csproj | 26 ++++ .../Controllers/ValuesController.resx | 123 ++++++++++++++++++ .../StringLocalizerOfTRootNamespaceTest.cs | 26 ++++ ...lizationServiceCollectionExtensionsTest.cs | 0 ...osoft.Extensions.Localization.Tests.csproj | 0 .../Model.cs | 8 ++ ...sourceManagerStringLocalizerFactoryTest.cs | 15 ++- .../ResourceManagerStringLocalizerTest.cs | 0 .../StringLocalizerOfTTest.cs | 0 12 files changed, 209 insertions(+), 10 deletions(-) create mode 100644 src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/AssemblyInfo.cs create mode 100644 src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/Controllers/ValuesController.cs create mode 100644 src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/Microsoft.Extensions.Localization.RootNamespace.Tests.csproj create mode 100644 src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/Resources/Controllers/ValuesController.resx create mode 100644 src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/StringLocalizerOfTRootNamespaceTest.cs rename src/Localization/Localization/test/{ => Microsoft.Extensions.Localization.Tests}/LocalizationServiceCollectionExtensionsTest.cs (100%) rename src/Localization/Localization/test/{ => Microsoft.Extensions.Localization.Tests}/Microsoft.Extensions.Localization.Tests.csproj (100%) create mode 100644 src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/Model.cs rename src/Localization/Localization/test/{ => Microsoft.Extensions.Localization.Tests}/ResourceManagerStringLocalizerFactoryTest.cs (96%) rename src/Localization/Localization/test/{ => Microsoft.Extensions.Localization.Tests}/ResourceManagerStringLocalizerTest.cs (100%) rename src/Localization/Localization/test/{ => Microsoft.Extensions.Localization.Tests}/StringLocalizerOfTTest.cs (100%) diff --git a/src/Localization/Localization/src/ResourceManagerStringLocalizerFactory.cs b/src/Localization/Localization/src/ResourceManagerStringLocalizerFactory.cs index 2eb737eaa7..a525f72368 100644 --- a/src/Localization/Localization/src/ResourceManagerStringLocalizerFactory.cs +++ b/src/Localization/Localization/src/ResourceManagerStringLocalizerFactory.cs @@ -101,9 +101,8 @@ namespace Microsoft.Extensions.Localization else { // This expectation is defined by dotnet's automatic resource storage. - // We have to conform to "{RootNamespace}.{ResourceLocation}.{FullTypeName - AssemblyName}". - var assemblyName = new AssemblyName(typeInfo.Assembly.FullName).Name; - return baseNamespace + "." + resourcesRelativePath + TrimPrefix(typeInfo.FullName, assemblyName + "."); + // We have to conform to "{RootNamespace}.{ResourceLocation}.{FullTypeName - RootNamespace}". + return baseNamespace + "." + resourcesRelativePath + TrimPrefix(typeInfo.FullName, baseNamespace + "."); } } @@ -267,4 +266,4 @@ namespace Microsoft.Extensions.Localization return name; } } -} \ No newline at end of file +} diff --git a/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/AssemblyInfo.cs b/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/AssemblyInfo.cs new file mode 100644 index 0000000000..bc7d005571 --- /dev/null +++ b/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/AssemblyInfo.cs @@ -0,0 +1,5 @@ +using System.Reflection; +using Microsoft.Extensions.Localization; + +[assembly: ResourceLocation("Resources")] +[assembly: RootNamespace("LocalizationTest.Abc")] diff --git a/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/Controllers/ValuesController.cs b/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/Controllers/ValuesController.cs new file mode 100644 index 0000000000..93dad2460a --- /dev/null +++ b/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/Controllers/ValuesController.cs @@ -0,0 +1,9 @@ +// 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 LocalizationTest.Abc.Controllers +{ + public class ValuesController + { + } +} diff --git a/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/Microsoft.Extensions.Localization.RootNamespace.Tests.csproj b/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/Microsoft.Extensions.Localization.RootNamespace.Tests.csproj new file mode 100644 index 0000000000..d7a45a84ab --- /dev/null +++ b/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/Microsoft.Extensions.Localization.RootNamespace.Tests.csproj @@ -0,0 +1,26 @@ + + + netcoreapp3.0;net472 + LocalizationTest.Abc + + + + + + + + + + + + + + + + + + ResXFileCodeGenerator + ValuesController.Designer.cs + + + diff --git a/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/Resources/Controllers/ValuesController.resx b/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/Resources/Controllers/ValuesController.resx new file mode 100644 index 0000000000..9966ea419e --- /dev/null +++ b/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/Resources/Controllers/ValuesController.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ValFromResource + + \ No newline at end of file diff --git a/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/StringLocalizerOfTRootNamespaceTest.cs b/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/StringLocalizerOfTRootNamespaceTest.cs new file mode 100644 index 0000000000..7c892e65dd --- /dev/null +++ b/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/StringLocalizerOfTRootNamespaceTest.cs @@ -0,0 +1,26 @@ +// 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. + +using LocalizationTest.Abc.Controllers; +using Microsoft.Extensions.Logging.Abstractions; +using Microsoft.Extensions.Options; +using Moq; +using Xunit; + +namespace Microsoft.Extensions.Localization.RootNamespace.Tests +{ + public class StringLocalizerOfTRootNamespaceTest + { + [Fact] + public void RootNamespace() + { + var locOptions = new LocalizationOptions(); + var options = new Mock>(); + options.Setup(o => o.Value).Returns(locOptions); + var factory = new ResourceManagerStringLocalizerFactory(options.Object, NullLoggerFactory.Instance); + + var valuesLoc = factory.Create(typeof(ValuesController)); + Assert.Equal("ValFromResource", valuesLoc["String1"]); + } + } +} diff --git a/src/Localization/Localization/test/LocalizationServiceCollectionExtensionsTest.cs b/src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/LocalizationServiceCollectionExtensionsTest.cs similarity index 100% rename from src/Localization/Localization/test/LocalizationServiceCollectionExtensionsTest.cs rename to src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/LocalizationServiceCollectionExtensionsTest.cs diff --git a/src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests.csproj b/src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/Microsoft.Extensions.Localization.Tests.csproj similarity index 100% rename from src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests.csproj rename to src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/Microsoft.Extensions.Localization.Tests.csproj diff --git a/src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/Model.cs b/src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/Model.cs new file mode 100644 index 0000000000..9d95c370fd --- /dev/null +++ b/src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/Model.cs @@ -0,0 +1,8 @@ +// This namespace for test resources with alternative RootNamespace +namespace MyNamespace +{ + public class Model + { + + } +} \ No newline at end of file diff --git a/src/Localization/Localization/test/ResourceManagerStringLocalizerFactoryTest.cs b/src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/ResourceManagerStringLocalizerFactoryTest.cs similarity index 96% rename from src/Localization/Localization/test/ResourceManagerStringLocalizerFactoryTest.cs rename to src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/ResourceManagerStringLocalizerFactoryTest.cs index 7a18c0e4bd..86f6e15ccd 100644 --- a/src/Localization/Localization/test/ResourceManagerStringLocalizerFactoryTest.cs +++ b/src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/ResourceManagerStringLocalizerFactoryTest.cs @@ -7,6 +7,7 @@ using System.Reflection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; +using MyNamespace; using Moq; using Xunit; @@ -132,7 +133,7 @@ namespace Microsoft.Extensions.Localization.Tests var loggerFactory = NullLoggerFactory.Instance; var resourcePath = Path.Combine("My", "Resources"); - var rootNamespace = "MyNamespace"; + var rootNamespace = nameof(MyNamespace); var rootNamespaceAttribute = new RootNamespaceAttribute(rootNamespace); var typeFactory = new TestResourceManagerStringLocalizerFactory( @@ -141,12 +142,13 @@ namespace Microsoft.Extensions.Localization.Tests rootNamespaceAttribute: rootNamespaceAttribute, loggerFactory: loggerFactory); - var type = typeof(ResourceManagerStringLocalizerFactoryTest); + var type = typeof(Model); + // Act typeFactory.Create(type); // Assert - Assert.Equal($"Microsoft.Extensions.Localization.Tests.ResourceManagerStringLocalizerFactoryTest", typeFactory.BaseName); + Assert.Equal($"{rootNamespace}.{nameof(Model)}", typeFactory.BaseName); } [Fact] @@ -159,7 +161,7 @@ namespace Microsoft.Extensions.Localization.Tests var loggerFactory = NullLoggerFactory.Instance; var resourcePath = Path.Combine("My", "Resources"); - var rootNamespace = "MyNamespace"; + var rootNamespace = nameof(MyNamespace); var resourceLocationAttribute = new ResourceLocationAttribute(resourcePath); var rootNamespaceAttribute = new RootNamespaceAttribute(rootNamespace); @@ -169,12 +171,13 @@ namespace Microsoft.Extensions.Localization.Tests rootNamespaceAttribute, loggerFactory); - var type = typeof(ResourceManagerStringLocalizerFactoryTest); + var type = typeof(Model); + // Act typeFactory.Create(type); // Assert - Assert.Equal($"MyNamespace.My.Resources.ResourceManagerStringLocalizerFactoryTest", typeFactory.BaseName); + Assert.Equal($"{rootNamespace}.My.Resources.{nameof(Model)}", typeFactory.BaseName); } [Fact] diff --git a/src/Localization/Localization/test/ResourceManagerStringLocalizerTest.cs b/src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/ResourceManagerStringLocalizerTest.cs similarity index 100% rename from src/Localization/Localization/test/ResourceManagerStringLocalizerTest.cs rename to src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/ResourceManagerStringLocalizerTest.cs diff --git a/src/Localization/Localization/test/StringLocalizerOfTTest.cs b/src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/StringLocalizerOfTTest.cs similarity index 100% rename from src/Localization/Localization/test/StringLocalizerOfTTest.cs rename to src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/StringLocalizerOfTTest.cs From 6c66664ae688f4a7b5c3124cfc4a0e8c6646b8ae Mon Sep 17 00:00:00 2001 From: John Luo Date: Fri, 9 Aug 2019 14:57:35 -0700 Subject: [PATCH 02/22] Update tfm in master to netcoreap5.0 \n\nCommit migrated from https://github.com/dotnet/extensions/commit/3fa337f230eda6dc8b94a65e65343d777b294011 --- .../src/Microsoft.Extensions.Configuration.KeyPerFile.csproj | 4 ++-- ...ft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj | 4 ++-- .../src/Microsoft.Extensions.Diagnostics.HealthChecks.csproj | 4 ++-- .../Microsoft.JSInterop/src/Microsoft.JSInterop.csproj | 4 ++-- .../src/Microsoft.Extensions.Localization.Abstractions.csproj | 4 ++-- .../Localization/src/Microsoft.Extensions.Localization.csproj | 4 ++-- src/WebEncoders/src/Microsoft.Extensions.WebEncoders.csproj | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Configuration.KeyPerFile/src/Microsoft.Extensions.Configuration.KeyPerFile.csproj b/src/Configuration.KeyPerFile/src/Microsoft.Extensions.Configuration.KeyPerFile.csproj index 10f41fa9f4..77664416f9 100644 --- a/src/Configuration.KeyPerFile/src/Microsoft.Extensions.Configuration.KeyPerFile.csproj +++ b/src/Configuration.KeyPerFile/src/Microsoft.Extensions.Configuration.KeyPerFile.csproj @@ -2,8 +2,8 @@ Configuration provider that uses files in a directory for Microsoft.Extensions.Configuration. - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;netcoreapp5.0 + netcoreapp5.0 true true diff --git a/src/HealthChecks/Abstractions/src/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj b/src/HealthChecks/Abstractions/src/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj index f41b257c63..e5cf8c251a 100644 --- a/src/HealthChecks/Abstractions/src/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj +++ b/src/HealthChecks/Abstractions/src/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj @@ -7,8 +7,8 @@ Commonly Used Types Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck Microsoft.Extensions.Diagnostics.HealthChecks - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;netcoreapp5.0 + netcoreapp5.0 $(NoWarn);CS1591 true diagnostics;healthchecks diff --git a/src/HealthChecks/HealthChecks/src/Microsoft.Extensions.Diagnostics.HealthChecks.csproj b/src/HealthChecks/HealthChecks/src/Microsoft.Extensions.Diagnostics.HealthChecks.csproj index 4005685011..d3b3f82b0d 100644 --- a/src/HealthChecks/HealthChecks/src/Microsoft.Extensions.Diagnostics.HealthChecks.csproj +++ b/src/HealthChecks/HealthChecks/src/Microsoft.Extensions.Diagnostics.HealthChecks.csproj @@ -6,8 +6,8 @@ Commonly Used Types: Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckService Microsoft.Extensions.Diagnostics.HealthChecks.IHealthChecksBuilder - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;netcoreapp5.0 + netcoreapp5.0 $(NoWarn);CS1591 true diagnostics;healthchecks diff --git a/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.csproj b/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.csproj index 044c843b28..3021d18cc3 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.csproj +++ b/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.csproj @@ -1,8 +1,8 @@  - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;netcoreapp5.0 + netcoreapp5.0 Abstractions and features for interop between .NET and JavaScript code. javascript;interop true diff --git a/src/Localization/Abstractions/src/Microsoft.Extensions.Localization.Abstractions.csproj b/src/Localization/Abstractions/src/Microsoft.Extensions.Localization.Abstractions.csproj index 09b8bf65b7..919d4f3d28 100644 --- a/src/Localization/Abstractions/src/Microsoft.Extensions.Localization.Abstractions.csproj +++ b/src/Localization/Abstractions/src/Microsoft.Extensions.Localization.Abstractions.csproj @@ -6,8 +6,8 @@ Commonly used types: Microsoft.Extensions.Localization.IStringLocalizer Microsoft.Extensions.Localization.IStringLocalizer<T> - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;netcoreapp5.0 + netcoreapp5.0 $(NoWarn);CS1591 true localization diff --git a/src/Localization/Localization/src/Microsoft.Extensions.Localization.csproj b/src/Localization/Localization/src/Microsoft.Extensions.Localization.csproj index 86ebaf1970..1cfdc34dfb 100644 --- a/src/Localization/Localization/src/Microsoft.Extensions.Localization.csproj +++ b/src/Localization/Localization/src/Microsoft.Extensions.Localization.csproj @@ -3,8 +3,8 @@ Microsoft .NET Extensions Application localization services and default implementation based on ResourceManager to load localized assembly resources. - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;netcoreapp5.0 + netcoreapp5.0 $(NoWarn);CS1591 true localization diff --git a/src/WebEncoders/src/Microsoft.Extensions.WebEncoders.csproj b/src/WebEncoders/src/Microsoft.Extensions.WebEncoders.csproj index 2ed725eac7..f4c4294413 100644 --- a/src/WebEncoders/src/Microsoft.Extensions.WebEncoders.csproj +++ b/src/WebEncoders/src/Microsoft.Extensions.WebEncoders.csproj @@ -2,8 +2,8 @@ Contains registration and configuration APIs to add the core framework encoders to a dependency injection container. - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;netcoreapp5.0 + netcoreapp5.0 $(NoWarn);CS1591 true aspnetcore From 4e01ec63483e3cd35e35eeda1b4da43ef183e596 Mon Sep 17 00:00:00 2001 From: John Luo Date: Fri, 9 Aug 2019 15:17:50 -0700 Subject: [PATCH 03/22] Update ref assemblies and missed updates \n\nCommit migrated from https://github.com/dotnet/extensions/commit/6fc17ec76f56d377047e386ea253445fab3581c1 --- ...Extensions.Configuration.KeyPerFile.csproj | 6 +- ....Configuration.KeyPerFile.netcoreapp5.0.cs | 29 ++++++ ...t.Extensions.FileProviders.Embedded.csproj | 6 +- ...ns.FileProviders.Embedded.netcoreapp5.0.cs | 39 ++++++++ ...t.Extensions.FileProviders.Embedded.csproj | 6 +- ....FileProviders.Embedded.multitarget.nuspec | 2 +- ...leProviders.Embedded.netcoreapp5.0.nuspec} | 2 +- ...agnostics.HealthChecks.Abstractions.csproj | 6 +- ...HealthChecks.Abstractions.netcoreapp5.0.cs | 72 ++++++++++++++ ...Extensions.Diagnostics.HealthChecks.csproj | 6 +- ....Diagnostics.HealthChecks.netcoreapp5.0.cs | 59 ++++++++++++ .../ref/Microsoft.JSInterop.csproj | 6 +- .../ref/Microsoft.JSInterop.netcoreapp5.0.cs | 64 +++++++++++++ ...xtensions.Localization.Abstractions.csproj | 6 +- ...Localization.Abstractions.netcoreapp5.0.cs | 49 ++++++++++ .../Microsoft.Extensions.Localization.csproj | 6 +- ...t.Extensions.Localization.netcoreapp5.0.cs | 93 +++++++++++++++++++ .../Microsoft.Extensions.WebEncoders.csproj | 6 +- ...ft.Extensions.WebEncoders.netcoreapp5.0.cs | 55 +++++++++++ 19 files changed, 489 insertions(+), 29 deletions(-) create mode 100644 src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.netcoreapp5.0.cs create mode 100644 src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.netcoreapp5.0.cs rename src/FileProviders/Embedded/src/{Microsoft.Extensions.FileProviders.Embedded.netcoreapp3.0.nuspec => Microsoft.Extensions.FileProviders.Embedded.netcoreapp5.0.nuspec} (94%) create mode 100644 src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netcoreapp5.0.cs create mode 100644 src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.netcoreapp5.0.cs create mode 100644 src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netcoreapp5.0.cs create mode 100644 src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netcoreapp5.0.cs create mode 100644 src/Localization/Localization/ref/Microsoft.Extensions.Localization.netcoreapp5.0.cs create mode 100644 src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.netcoreapp5.0.cs diff --git a/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.csproj b/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.csproj index 4e074ab493..2ba44d34fa 100644 --- a/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.csproj +++ b/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.csproj @@ -1,15 +1,15 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 - - + + diff --git a/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.netcoreapp5.0.cs b/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.netcoreapp5.0.cs new file mode 100644 index 0000000000..e26ca1909d --- /dev/null +++ b/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.netcoreapp5.0.cs @@ -0,0 +1,29 @@ +// 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.Extensions.Configuration +{ + public static partial class KeyPerFileConfigurationBuilderExtensions + { + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddKeyPerFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, System.Action configureSource) { throw null; } + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddKeyPerFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string directoryPath, bool optional) { throw null; } + } +} +namespace Microsoft.Extensions.Configuration.KeyPerFile +{ + public partial class KeyPerFileConfigurationProvider : Microsoft.Extensions.Configuration.ConfigurationProvider + { + public KeyPerFileConfigurationProvider(Microsoft.Extensions.Configuration.KeyPerFile.KeyPerFileConfigurationSource source) { } + public override void Load() { } + public override string ToString() { throw null; } + } + public partial class KeyPerFileConfigurationSource : Microsoft.Extensions.Configuration.IConfigurationSource + { + public KeyPerFileConfigurationSource() { } + public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public System.Func IgnoreCondition { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string IgnorePrefix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool Optional { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder) { throw null; } + } +} diff --git a/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.csproj b/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.csproj index e9407f9164..98d071201c 100644 --- a/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.csproj +++ b/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.csproj @@ -1,14 +1,14 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 - - + + diff --git a/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.netcoreapp5.0.cs b/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.netcoreapp5.0.cs new file mode 100644 index 0000000000..1596f191fd --- /dev/null +++ b/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.netcoreapp5.0.cs @@ -0,0 +1,39 @@ +// 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.Extensions.FileProviders +{ + public partial class EmbeddedFileProvider : Microsoft.Extensions.FileProviders.IFileProvider + { + public EmbeddedFileProvider(System.Reflection.Assembly assembly) { } + public EmbeddedFileProvider(System.Reflection.Assembly assembly, string baseNamespace) { } + public Microsoft.Extensions.FileProviders.IDirectoryContents GetDirectoryContents(string subpath) { throw null; } + public Microsoft.Extensions.FileProviders.IFileInfo GetFileInfo(string subpath) { throw null; } + public Microsoft.Extensions.Primitives.IChangeToken Watch(string pattern) { throw null; } + } + public partial class ManifestEmbeddedFileProvider : Microsoft.Extensions.FileProviders.IFileProvider + { + public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly) { } + public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root) { } + public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root, System.DateTimeOffset lastModified) { } + public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root, string manifestName, System.DateTimeOffset lastModified) { } + public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public Microsoft.Extensions.FileProviders.IDirectoryContents GetDirectoryContents(string subpath) { throw null; } + public Microsoft.Extensions.FileProviders.IFileInfo GetFileInfo(string subpath) { throw null; } + public Microsoft.Extensions.Primitives.IChangeToken Watch(string filter) { throw null; } + } +} +namespace Microsoft.Extensions.FileProviders.Embedded +{ + public partial class EmbeddedResourceFileInfo : Microsoft.Extensions.FileProviders.IFileInfo + { + public EmbeddedResourceFileInfo(System.Reflection.Assembly assembly, string resourcePath, string name, System.DateTimeOffset lastModified) { } + public bool Exists { get { throw null; } } + public bool IsDirectory { get { throw null; } } + public System.DateTimeOffset LastModified { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public long Length { get { throw null; } } + public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string PhysicalPath { get { throw null; } } + public System.IO.Stream CreateReadStream() { throw null; } + } +} diff --git a/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj b/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj index 115d9affe1..3c99563949 100644 --- a/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj +++ b/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj @@ -3,10 +3,10 @@ Microsoft.Extensions.FileProviders File provider for files in embedded resources for Microsoft.Extensions.FileProviders. - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 $(MSBuildProjectName).multitarget.nuspec - netcoreapp3.0 - $(MSBuildProjectName).netcoreapp3.0.nuspec + netcoreapp5.0 + $(MSBuildProjectName).netcoreapp5.0.nuspec true true diff --git a/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.multitarget.nuspec b/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.multitarget.nuspec index 874c90c79d..3d693569e4 100644 --- a/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.multitarget.nuspec +++ b/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.multitarget.nuspec @@ -3,7 +3,7 @@ $CommonMetadataElements$ - + diff --git a/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.netcoreapp3.0.nuspec b/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.netcoreapp5.0.nuspec similarity index 94% rename from src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.netcoreapp3.0.nuspec rename to src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.netcoreapp5.0.nuspec index f98f0b4ad5..4bc62a0e6b 100644 --- a/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.netcoreapp3.0.nuspec +++ b/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.netcoreapp5.0.nuspec @@ -3,7 +3,7 @@ $CommonMetadataElements$ - + diff --git a/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj b/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj index f7514489fa..d202fe2d71 100644 --- a/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj +++ b/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj @@ -1,14 +1,14 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 - - + + diff --git a/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netcoreapp5.0.cs b/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netcoreapp5.0.cs new file mode 100644 index 0000000000..8c53adc275 --- /dev/null +++ b/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netcoreapp5.0.cs @@ -0,0 +1,72 @@ +// 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.Extensions.Diagnostics.HealthChecks +{ + public sealed partial class HealthCheckContext + { + public HealthCheckContext() { } + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration Registration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public sealed partial class HealthCheckRegistration + { + public HealthCheckRegistration(string name, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck instance, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags) { } + public HealthCheckRegistration(string name, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck instance, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags, System.TimeSpan? timeout) { } + public HealthCheckRegistration(string name, System.Func factory, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags) { } + public HealthCheckRegistration(string name, System.Func factory, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags, System.TimeSpan? timeout) { } + public System.Func Factory { get { throw null; } set { } } + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus FailureStatus { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.ISet Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.TimeSpan Timeout { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public partial struct HealthCheckResult + { + private object _dummy; + private int _dummyPrimitive; + public HealthCheckResult(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description = null, System.Exception exception = null, System.Collections.Generic.IReadOnlyDictionary data = null) { throw null; } + public System.Collections.Generic.IReadOnlyDictionary Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Degraded(string description = null, System.Exception exception = null, System.Collections.Generic.IReadOnlyDictionary data = null) { throw null; } + public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Healthy(string description = null, System.Collections.Generic.IReadOnlyDictionary data = null) { throw null; } + public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Unhealthy(string description = null, System.Exception exception = null, System.Collections.Generic.IReadOnlyDictionary data = null) { throw null; } + } + public sealed partial class HealthReport + { + public HealthReport(System.Collections.Generic.IReadOnlyDictionary entries, System.TimeSpan totalDuration) { } + public System.Collections.Generic.IReadOnlyDictionary Entries { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.TimeSpan TotalDuration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public partial struct HealthReportEntry + { + private object _dummy; + private int _dummyPrimitive; + public HealthReportEntry(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description, System.TimeSpan duration, System.Exception exception, System.Collections.Generic.IReadOnlyDictionary data) { throw null; } + public HealthReportEntry(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description, System.TimeSpan duration, System.Exception exception, System.Collections.Generic.IReadOnlyDictionary data, System.Collections.Generic.IEnumerable tags = null) { throw null; } + public System.Collections.Generic.IReadOnlyDictionary Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.TimeSpan Duration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.IEnumerable Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + public enum HealthStatus + { + Unhealthy = 0, + Degraded = 1, + Healthy = 2, + } + public partial interface IHealthCheck + { + System.Threading.Tasks.Task CheckHealthAsync(Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckContext context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + public partial interface IHealthCheckPublisher + { + System.Threading.Tasks.Task PublishAsync(Microsoft.Extensions.Diagnostics.HealthChecks.HealthReport report, System.Threading.CancellationToken cancellationToken); + } +} diff --git a/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.csproj b/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.csproj index 2286087bc7..07f63049eb 100644 --- a/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.csproj +++ b/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 @@ -9,8 +9,8 @@ - - + + diff --git a/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.netcoreapp5.0.cs b/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.netcoreapp5.0.cs new file mode 100644 index 0000000000..a23961efdd --- /dev/null +++ b/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.netcoreapp5.0.cs @@ -0,0 +1,59 @@ +// 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.Extensions.DependencyInjection +{ + public static partial class HealthChecksBuilderAddCheckExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck instance, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags) { throw null; } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck instance, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus?), System.Collections.Generic.IEnumerable tags = null, System.TimeSpan? timeout = default(System.TimeSpan?)) { throw null; } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags) where T : class, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck { throw null; } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus?), System.Collections.Generic.IEnumerable tags = null, System.TimeSpan? timeout = default(System.TimeSpan?)) where T : class, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck { throw null; } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddTypeActivatedCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags, params object[] args) where T : class, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck { throw null; } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddTypeActivatedCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags, System.TimeSpan timeout, params object[] args) where T : class, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck { throw null; } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddTypeActivatedCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, params object[] args) where T : class, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck { throw null; } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddTypeActivatedCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, params object[] args) where T : class, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck { throw null; } + } + public static partial class HealthChecksBuilderDelegateExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddAsyncCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, System.Func> check, System.Collections.Generic.IEnumerable tags) { throw null; } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddAsyncCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, System.Func> check, System.Collections.Generic.IEnumerable tags = null, System.TimeSpan? timeout = default(System.TimeSpan?)) { throw null; } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddAsyncCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, System.Func> check, System.Collections.Generic.IEnumerable tags) { throw null; } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddAsyncCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, System.Func> check, System.Collections.Generic.IEnumerable tags = null, System.TimeSpan? timeout = default(System.TimeSpan?)) { throw null; } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, System.Func check, System.Collections.Generic.IEnumerable tags) { throw null; } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, System.Func check, System.Collections.Generic.IEnumerable tags = null, System.TimeSpan? timeout = default(System.TimeSpan?)) { throw null; } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, System.Func check, System.Collections.Generic.IEnumerable tags) { throw null; } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, System.Func check, System.Collections.Generic.IEnumerable tags = null, System.TimeSpan? timeout = default(System.TimeSpan?)) { throw null; } + } + public static partial class HealthCheckServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddHealthChecks(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) { throw null; } + } + public partial interface IHealthChecksBuilder + { + Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; } + Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder Add(Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration registration); + } +} +namespace Microsoft.Extensions.Diagnostics.HealthChecks +{ + public sealed partial class HealthCheckPublisherOptions + { + public HealthCheckPublisherOptions() { } + public System.TimeSpan Delay { get { throw null; } set { } } + public System.TimeSpan Period { get { throw null; } set { } } + public System.Func Predicate { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public System.TimeSpan Timeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public abstract partial class HealthCheckService + { + protected HealthCheckService() { } + public abstract System.Threading.Tasks.Task CheckHealthAsync(System.Func predicate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public System.Threading.Tasks.Task CheckHealthAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public sealed partial class HealthCheckServiceOptions + { + public HealthCheckServiceOptions() { } + public System.Collections.Generic.ICollection Registrations { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } +} diff --git a/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.csproj b/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.csproj index 61980aa920..ae19552c6d 100644 --- a/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.csproj +++ b/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.csproj @@ -1,14 +1,14 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 - - + + diff --git a/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netcoreapp5.0.cs b/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netcoreapp5.0.cs new file mode 100644 index 0000000000..654ae9d617 --- /dev/null +++ b/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netcoreapp5.0.cs @@ -0,0 +1,64 @@ +// 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.JSInterop +{ + public static partial class DotNetDispatcher + { + public static void BeginInvoke(string callId, string assemblyName, string methodIdentifier, long dotNetObjectId, string argsJson) { } + public static void EndInvoke(string arguments) { } + public static string Invoke(string assemblyName, string methodIdentifier, long dotNetObjectId, string argsJson) { throw null; } + [Microsoft.JSInterop.JSInvokableAttribute("DotNetDispatcher.ReleaseDotNetObject")] + public static void ReleaseDotNetObject(long dotNetObjectId) { } + } + public static partial class DotNetObjectRef + { + public static Microsoft.JSInterop.DotNetObjectRef Create(TValue value) where TValue : class { throw null; } + } + public sealed partial class DotNetObjectRef : System.IDisposable where TValue : class + { + internal DotNetObjectRef() { } + public TValue Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public void Dispose() { } + } + public partial interface IJSInProcessRuntime : Microsoft.JSInterop.IJSRuntime + { + T Invoke(string identifier, params object[] args); + } + public partial interface IJSRuntime + { + System.Threading.Tasks.Task InvokeAsync(string identifier, System.Collections.Generic.IEnumerable args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task InvokeAsync(string identifier, params object[] args); + } + public partial class JSException : System.Exception + { + public JSException(string message) { } + public JSException(string message, System.Exception innerException) { } + } + public abstract partial class JSInProcessRuntimeBase : Microsoft.JSInterop.JSRuntimeBase, Microsoft.JSInterop.IJSInProcessRuntime, Microsoft.JSInterop.IJSRuntime + { + protected JSInProcessRuntimeBase() { } + protected abstract string InvokeJS(string identifier, string argsJson); + public TValue Invoke(string identifier, params object[] args) { throw null; } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Method, AllowMultiple=true)] + public partial class JSInvokableAttribute : System.Attribute + { + public JSInvokableAttribute() { } + public JSInvokableAttribute(string identifier) { } + public string Identifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + public static partial class JSRuntime + { + public static void SetCurrentJSRuntime(Microsoft.JSInterop.IJSRuntime instance) { } + } + public abstract partial class JSRuntimeBase : Microsoft.JSInterop.IJSRuntime + { + protected JSRuntimeBase() { } + protected System.TimeSpan? DefaultAsyncTimeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected abstract void BeginInvokeJS(long taskId, string identifier, string argsJson); + protected internal abstract void EndInvokeDotNet(string callId, bool success, object resultOrError, string assemblyName, string methodIdentifier, long dotNetObjectId); + public System.Threading.Tasks.Task InvokeAsync(string identifier, System.Collections.Generic.IEnumerable args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public System.Threading.Tasks.Task InvokeAsync(string identifier, params object[] args) { throw null; } + } +} diff --git a/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.csproj b/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.csproj index 6404d5ae8e..66e71c0554 100644 --- a/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.csproj +++ b/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.csproj @@ -1,14 +1,14 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 - - + + diff --git a/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netcoreapp5.0.cs b/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netcoreapp5.0.cs new file mode 100644 index 0000000000..174cac28e5 --- /dev/null +++ b/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netcoreapp5.0.cs @@ -0,0 +1,49 @@ +// 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.Extensions.Localization +{ + public partial interface IStringLocalizer + { + Microsoft.Extensions.Localization.LocalizedString this[string name] { get; } + Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get; } + System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures); + [System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] + Microsoft.Extensions.Localization.IStringLocalizer WithCulture(System.Globalization.CultureInfo culture); + } + public partial interface IStringLocalizerFactory + { + Microsoft.Extensions.Localization.IStringLocalizer Create(string baseName, string location); + Microsoft.Extensions.Localization.IStringLocalizer Create(System.Type resourceSource); + } + public partial interface IStringLocalizer : Microsoft.Extensions.Localization.IStringLocalizer + { + } + public partial class LocalizedString + { + public LocalizedString(string name, string value) { } + public LocalizedString(string name, string value, bool resourceNotFound) { } + public LocalizedString(string name, string value, bool resourceNotFound, string searchedLocation) { } + public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public bool ResourceNotFound { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string SearchedLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public static implicit operator string (Microsoft.Extensions.Localization.LocalizedString localizedString) { throw null; } + public override string ToString() { throw null; } + } + public static partial class StringLocalizerExtensions + { + public static System.Collections.Generic.IEnumerable GetAllStrings(this Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer) { throw null; } + public static Microsoft.Extensions.Localization.LocalizedString GetString(this Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer, string name) { throw null; } + public static Microsoft.Extensions.Localization.LocalizedString GetString(this Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer, string name, params object[] arguments) { throw null; } + } + public partial class StringLocalizer : Microsoft.Extensions.Localization.IStringLocalizer, Microsoft.Extensions.Localization.IStringLocalizer + { + public StringLocalizer(Microsoft.Extensions.Localization.IStringLocalizerFactory factory) { } + public virtual Microsoft.Extensions.Localization.LocalizedString this[string name] { get { throw null; } } + public virtual Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get { throw null; } } + public System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures) { throw null; } + [System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] + public virtual Microsoft.Extensions.Localization.IStringLocalizer WithCulture(System.Globalization.CultureInfo culture) { throw null; } + } +} diff --git a/src/Localization/Localization/ref/Microsoft.Extensions.Localization.csproj b/src/Localization/Localization/ref/Microsoft.Extensions.Localization.csproj index 735277e754..2a84077b06 100644 --- a/src/Localization/Localization/ref/Microsoft.Extensions.Localization.csproj +++ b/src/Localization/Localization/ref/Microsoft.Extensions.Localization.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 @@ -10,8 +10,8 @@ - - + + diff --git a/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netcoreapp5.0.cs b/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netcoreapp5.0.cs new file mode 100644 index 0000000000..80175da718 --- /dev/null +++ b/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netcoreapp5.0.cs @@ -0,0 +1,93 @@ +// 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.Extensions.DependencyInjection +{ + public static partial class LocalizationServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddLocalization(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) { throw null; } + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddLocalization(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action setupAction) { throw null; } + } +} +namespace Microsoft.Extensions.Localization +{ + public partial interface IResourceNamesCache + { + System.Collections.Generic.IList GetOrAdd(string name, System.Func> valueFactory); + } + public partial class LocalizationOptions + { + public LocalizationOptions() { } + public string ResourcesPath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)] + public partial class ResourceLocationAttribute : System.Attribute + { + public ResourceLocationAttribute(string resourceLocation) { } + public string ResourceLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + public partial class ResourceManagerStringLocalizer : Microsoft.Extensions.Localization.IStringLocalizer + { + public ResourceManagerStringLocalizer(System.Resources.ResourceManager resourceManager, Microsoft.Extensions.Localization.Internal.AssemblyWrapper resourceAssemblyWrapper, string baseName, Microsoft.Extensions.Localization.IResourceNamesCache resourceNamesCache, Microsoft.Extensions.Logging.ILogger logger) { } + public ResourceManagerStringLocalizer(System.Resources.ResourceManager resourceManager, Microsoft.Extensions.Localization.Internal.IResourceStringProvider resourceStringProvider, string baseName, Microsoft.Extensions.Localization.IResourceNamesCache resourceNamesCache, Microsoft.Extensions.Logging.ILogger logger) { } + public ResourceManagerStringLocalizer(System.Resources.ResourceManager resourceManager, System.Reflection.Assembly resourceAssembly, string baseName, Microsoft.Extensions.Localization.IResourceNamesCache resourceNamesCache, Microsoft.Extensions.Logging.ILogger logger) { } + public virtual Microsoft.Extensions.Localization.LocalizedString this[string name] { get { throw null; } } + public virtual Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get { throw null; } } + public virtual System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures) { throw null; } + protected System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures, System.Globalization.CultureInfo culture) { throw null; } + protected string GetStringSafely(string name, System.Globalization.CultureInfo culture) { throw null; } + [System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] + public Microsoft.Extensions.Localization.IStringLocalizer WithCulture(System.Globalization.CultureInfo culture) { throw null; } + } + public partial class ResourceManagerStringLocalizerFactory : Microsoft.Extensions.Localization.IStringLocalizerFactory + { + public ResourceManagerStringLocalizerFactory(Microsoft.Extensions.Options.IOptions localizationOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } + public Microsoft.Extensions.Localization.IStringLocalizer Create(string baseName, string location) { throw null; } + public Microsoft.Extensions.Localization.IStringLocalizer Create(System.Type resourceSource) { throw null; } + protected virtual Microsoft.Extensions.Localization.ResourceManagerStringLocalizer CreateResourceManagerStringLocalizer(System.Reflection.Assembly assembly, string baseName) { throw null; } + protected virtual Microsoft.Extensions.Localization.ResourceLocationAttribute GetResourceLocationAttribute(System.Reflection.Assembly assembly) { throw null; } + protected virtual string GetResourcePrefix(System.Reflection.TypeInfo typeInfo) { throw null; } + protected virtual string GetResourcePrefix(System.Reflection.TypeInfo typeInfo, string baseNamespace, string resourcesRelativePath) { throw null; } + protected virtual string GetResourcePrefix(string baseResourceName, string baseNamespace) { throw null; } + protected virtual string GetResourcePrefix(string location, string baseName, string resourceLocation) { throw null; } + protected virtual Microsoft.Extensions.Localization.RootNamespaceAttribute GetRootNamespaceAttribute(System.Reflection.Assembly assembly) { throw null; } + } + [System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] + public partial class ResourceManagerWithCultureStringLocalizer : Microsoft.Extensions.Localization.ResourceManagerStringLocalizer + { + public ResourceManagerWithCultureStringLocalizer(System.Resources.ResourceManager resourceManager, System.Reflection.Assembly resourceAssembly, string baseName, Microsoft.Extensions.Localization.IResourceNamesCache resourceNamesCache, System.Globalization.CultureInfo culture, Microsoft.Extensions.Logging.ILogger logger) : base (default(System.Resources.ResourceManager), default(System.Reflection.Assembly), default(string), default(Microsoft.Extensions.Localization.IResourceNamesCache), default(Microsoft.Extensions.Logging.ILogger)) { } + public override Microsoft.Extensions.Localization.LocalizedString this[string name] { get { throw null; } } + public override Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get { throw null; } } + public override System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures) { throw null; } + } + public partial class ResourceNamesCache : Microsoft.Extensions.Localization.IResourceNamesCache + { + public ResourceNamesCache() { } + public System.Collections.Generic.IList GetOrAdd(string name, System.Func> valueFactory) { throw null; } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)] + public partial class RootNamespaceAttribute : System.Attribute + { + public RootNamespaceAttribute(string rootNamespace) { } + public string RootNamespace { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } +} +namespace Microsoft.Extensions.Localization.Internal +{ + public partial class AssemblyWrapper + { + public AssemblyWrapper(System.Reflection.Assembly assembly) { } + public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public virtual string FullName { get { throw null; } } + public virtual System.IO.Stream GetManifestResourceStream(string name) { throw null; } + } + public partial interface IResourceStringProvider + { + System.Collections.Generic.IList GetAllResourceStrings(System.Globalization.CultureInfo culture, bool throwOnMissing); + } + public partial class ResourceManagerStringProvider : Microsoft.Extensions.Localization.Internal.IResourceStringProvider + { + public ResourceManagerStringProvider(Microsoft.Extensions.Localization.IResourceNamesCache resourceCache, System.Resources.ResourceManager resourceManager, System.Reflection.Assembly assembly, string baseName) { } + public System.Collections.Generic.IList GetAllResourceStrings(System.Globalization.CultureInfo culture, bool throwOnMissing) { throw null; } + } +} diff --git a/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.csproj b/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.csproj index 628691a220..3fa06a7280 100644 --- a/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.csproj +++ b/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 @@ -9,8 +9,8 @@ - - + + diff --git a/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.netcoreapp5.0.cs b/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.netcoreapp5.0.cs new file mode 100644 index 0000000000..18cdcbdfa3 --- /dev/null +++ b/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.netcoreapp5.0.cs @@ -0,0 +1,55 @@ +// 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.Extensions.DependencyInjection +{ + public static partial class EncoderServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddWebEncoders(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) { throw null; } + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddWebEncoders(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action setupAction) { throw null; } + } +} +namespace Microsoft.Extensions.WebEncoders +{ + public sealed partial class WebEncoderOptions + { + public WebEncoderOptions() { } + public System.Text.Encodings.Web.TextEncoderSettings TextEncoderSettings { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } +} +namespace Microsoft.Extensions.WebEncoders.Testing +{ + public sealed partial class HtmlTestEncoder : System.Text.Encodings.Web.HtmlEncoder + { + public HtmlTestEncoder() { } + public override int MaxOutputCharactersPerInputCharacter { get { throw null; } } + public override void Encode(System.IO.TextWriter output, char[] value, int startIndex, int characterCount) { } + public override void Encode(System.IO.TextWriter output, string value, int startIndex, int characterCount) { } + public override string Encode(string value) { throw null; } + public unsafe override int FindFirstCharacterToEncode(char* text, int textLength) { throw null; } + public unsafe override bool TryEncodeUnicodeScalar(int unicodeScalar, char* buffer, int bufferLength, out int numberOfCharactersWritten) { throw null; } + public override bool WillEncode(int unicodeScalar) { throw null; } + } + public partial class JavaScriptTestEncoder : System.Text.Encodings.Web.JavaScriptEncoder + { + public JavaScriptTestEncoder() { } + public override int MaxOutputCharactersPerInputCharacter { get { throw null; } } + public override void Encode(System.IO.TextWriter output, char[] value, int startIndex, int characterCount) { } + public override void Encode(System.IO.TextWriter output, string value, int startIndex, int characterCount) { } + public override string Encode(string value) { throw null; } + public unsafe override int FindFirstCharacterToEncode(char* text, int textLength) { throw null; } + public unsafe override bool TryEncodeUnicodeScalar(int unicodeScalar, char* buffer, int bufferLength, out int numberOfCharactersWritten) { throw null; } + public override bool WillEncode(int unicodeScalar) { throw null; } + } + public partial class UrlTestEncoder : System.Text.Encodings.Web.UrlEncoder + { + public UrlTestEncoder() { } + public override int MaxOutputCharactersPerInputCharacter { get { throw null; } } + public override void Encode(System.IO.TextWriter output, char[] value, int startIndex, int characterCount) { } + public override void Encode(System.IO.TextWriter output, string value, int startIndex, int characterCount) { } + public override string Encode(string value) { throw null; } + public unsafe override int FindFirstCharacterToEncode(char* text, int textLength) { throw null; } + public unsafe override bool TryEncodeUnicodeScalar(int unicodeScalar, char* buffer, int bufferLength, out int numberOfCharactersWritten) { throw null; } + public override bool WillEncode(int unicodeScalar) { throw null; } + } +} From 591d6c13ec665d9ac0ab71056c04841530804841 Mon Sep 17 00:00:00 2001 From: Brennan Date: Fri, 16 Aug 2019 13:47:32 -0700 Subject: [PATCH 04/22] Add support for netcoreapp5.0 to micro benchmarks (dotnet/extensions#2190) \n\nCommit migrated from https://github.com/dotnet/extensions/commit/72bcb43aee992f77287165de5b6140553c5750eb --- src/Shared/BenchmarkRunner/DefaultCoreConfig.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Shared/BenchmarkRunner/DefaultCoreConfig.cs b/src/Shared/BenchmarkRunner/DefaultCoreConfig.cs index a61833ab26..d24bb439a1 100644 --- a/src/Shared/BenchmarkRunner/DefaultCoreConfig.cs +++ b/src/Shared/BenchmarkRunner/DefaultCoreConfig.cs @@ -30,8 +30,12 @@ namespace BenchmarkDotNet.Attributes Add(Job.Core #if NETCOREAPP2_1 .With(CsProjCoreToolchain.From(NetCoreAppSettings.NetCoreApp21)) -#else +#elif NETCOREAPP3_0 .With(CsProjCoreToolchain.From(new NetCoreAppSettings("netcoreapp3.0", null, ".NET Core 3.0"))) +#elif NETCOREAPP5_0 + .With(CsProjCoreToolchain.From(new NetCoreAppSettings("netcoreapp5.0", null, ".NET Core 5.0"))) +#else +#error Target frameworks need to be updated. #endif .With(new GcMode { Server = true }) .With(RunStrategy.Throughput)); From 29e0146528d108c5a45aafb3485aeeb33efb67bd Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Sat, 17 Aug 2019 13:06:53 +1200 Subject: [PATCH 05/22] Update TypeNameHelper.cs (dotnet/extensions#2194) \n\nCommit migrated from https://github.com/dotnet/extensions/commit/204a4eef27df6ca694ae4f8b768b91a090786d5c --- src/Shared/TypeNameHelper/TypeNameHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Shared/TypeNameHelper/TypeNameHelper.cs b/src/Shared/TypeNameHelper/TypeNameHelper.cs index 3994a074b6..d08b9b0439 100644 --- a/src/Shared/TypeNameHelper/TypeNameHelper.cs +++ b/src/Shared/TypeNameHelper/TypeNameHelper.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; namespace Microsoft.Extensions.Internal { - internal class TypeNameHelper + internal static class TypeNameHelper { private const char DefaultNestedTypeDelimiter = '+'; From bd300b52204aa73283e9cdd081ee3c0a8c18a7bf Mon Sep 17 00:00:00 2001 From: Doug Bunting <6431421+dougbu@users.noreply.github.com> Date: Fri, 16 Aug 2019 18:28:51 -0700 Subject: [PATCH 06/22] Rebuilt ref/ code for Microsoft.JSInterop \n\nCommit migrated from https://github.com/dotnet/extensions/commit/b791bce755e554c0092fe0c7b39dc06289ad229a --- .../ref/Microsoft.JSInterop.netcoreapp5.0.cs | 92 +++++++++++++------ 1 file changed, 65 insertions(+), 27 deletions(-) diff --git a/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netcoreapp5.0.cs b/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netcoreapp5.0.cs index 654ae9d617..2d8c51caaf 100644 --- a/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netcoreapp5.0.cs +++ b/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netcoreapp5.0.cs @@ -3,22 +3,14 @@ namespace Microsoft.JSInterop { - public static partial class DotNetDispatcher + public static partial class DotNetObjectReference { - public static void BeginInvoke(string callId, string assemblyName, string methodIdentifier, long dotNetObjectId, string argsJson) { } - public static void EndInvoke(string arguments) { } - public static string Invoke(string assemblyName, string methodIdentifier, long dotNetObjectId, string argsJson) { throw null; } - [Microsoft.JSInterop.JSInvokableAttribute("DotNetDispatcher.ReleaseDotNetObject")] - public static void ReleaseDotNetObject(long dotNetObjectId) { } + public static Microsoft.JSInterop.DotNetObjectReference Create(TValue value) where TValue : class { throw null; } } - public static partial class DotNetObjectRef + public sealed partial class DotNetObjectReference : System.IDisposable where TValue : class { - public static Microsoft.JSInterop.DotNetObjectRef Create(TValue value) where TValue : class { throw null; } - } - public sealed partial class DotNetObjectRef : System.IDisposable where TValue : class - { - internal DotNetObjectRef() { } - public TValue Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + internal DotNetObjectReference() { } + public TValue Value { get { throw null; } } public void Dispose() { } } public partial interface IJSInProcessRuntime : Microsoft.JSInterop.IJSRuntime @@ -27,38 +19,84 @@ namespace Microsoft.JSInterop } public partial interface IJSRuntime { - System.Threading.Tasks.Task InvokeAsync(string identifier, System.Collections.Generic.IEnumerable args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - System.Threading.Tasks.Task InvokeAsync(string identifier, params object[] args); + System.Threading.Tasks.ValueTask InvokeAsync(string identifier, object[] args); + System.Threading.Tasks.ValueTask InvokeAsync(string identifier, System.Threading.CancellationToken cancellationToken, object[] args); } public partial class JSException : System.Exception { public JSException(string message) { } public JSException(string message, System.Exception innerException) { } } - public abstract partial class JSInProcessRuntimeBase : Microsoft.JSInterop.JSRuntimeBase, Microsoft.JSInterop.IJSInProcessRuntime, Microsoft.JSInterop.IJSRuntime + public abstract partial class JSInProcessRuntime : Microsoft.JSInterop.JSRuntime, Microsoft.JSInterop.IJSInProcessRuntime, Microsoft.JSInterop.IJSRuntime { - protected JSInProcessRuntimeBase() { } + protected JSInProcessRuntime() { } protected abstract string InvokeJS(string identifier, string argsJson); public TValue Invoke(string identifier, params object[] args) { throw null; } } + public static partial class JSInProcessRuntimeExtensions + { + public static void InvokeVoid(this Microsoft.JSInterop.IJSInProcessRuntime jsRuntime, string identifier, params object[] args) { } + } [System.AttributeUsageAttribute(System.AttributeTargets.Method, AllowMultiple=true)] - public partial class JSInvokableAttribute : System.Attribute + public sealed partial class JSInvokableAttribute : System.Attribute { public JSInvokableAttribute() { } public JSInvokableAttribute(string identifier) { } public string Identifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } - public static partial class JSRuntime + public abstract partial class JSRuntime : Microsoft.JSInterop.IJSRuntime { - public static void SetCurrentJSRuntime(Microsoft.JSInterop.IJSRuntime instance) { } - } - public abstract partial class JSRuntimeBase : Microsoft.JSInterop.IJSRuntime - { - protected JSRuntimeBase() { } + protected JSRuntime() { } protected System.TimeSpan? DefaultAsyncTimeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected internal System.Text.Json.JsonSerializerOptions JsonSerializerOptions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } protected abstract void BeginInvokeJS(long taskId, string identifier, string argsJson); - protected internal abstract void EndInvokeDotNet(string callId, bool success, object resultOrError, string assemblyName, string methodIdentifier, long dotNetObjectId); - public System.Threading.Tasks.Task InvokeAsync(string identifier, System.Collections.Generic.IEnumerable args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public System.Threading.Tasks.Task InvokeAsync(string identifier, params object[] args) { throw null; } + protected internal abstract void EndInvokeDotNet(Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo invocationInfo, in Microsoft.JSInterop.Infrastructure.DotNetInvocationResult invocationResult); + public System.Threading.Tasks.ValueTask InvokeAsync(string identifier, object[] args) { throw null; } + public System.Threading.Tasks.ValueTask InvokeAsync(string identifier, System.Threading.CancellationToken cancellationToken, object[] args) { throw null; } + } + public static partial class JSRuntimeExtensions + { + public static System.Threading.Tasks.ValueTask InvokeAsync(this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, params object[] args) { throw null; } + public static System.Threading.Tasks.ValueTask InvokeAsync(this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, System.Threading.CancellationToken cancellationToken, params object[] args) { throw null; } + [System.Diagnostics.DebuggerStepThroughAttribute] + public static System.Threading.Tasks.ValueTask InvokeAsync(this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, System.TimeSpan timeout, params object[] args) { throw null; } + [System.Diagnostics.DebuggerStepThroughAttribute] + public static System.Threading.Tasks.ValueTask InvokeVoidAsync(this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, params object[] args) { throw null; } + [System.Diagnostics.DebuggerStepThroughAttribute] + public static System.Threading.Tasks.ValueTask InvokeVoidAsync(this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, System.Threading.CancellationToken cancellationToken, params object[] args) { throw null; } + [System.Diagnostics.DebuggerStepThroughAttribute] + public static System.Threading.Tasks.ValueTask InvokeVoidAsync(this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, System.TimeSpan timeout, params object[] args) { throw null; } + } +} +namespace Microsoft.JSInterop.Infrastructure +{ + public static partial class DotNetDispatcher + { + public static void BeginInvokeDotNet(Microsoft.JSInterop.JSRuntime jsRuntime, Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo invocationInfo, string argsJson) { } + public static void EndInvokeJS(Microsoft.JSInterop.JSRuntime jsRuntime, string arguments) { } + public static string Invoke(Microsoft.JSInterop.JSRuntime jsRuntime, in Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo invocationInfo, string argsJson) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DotNetInvocationInfo + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DotNetInvocationInfo(string assemblyName, string methodIdentifier, long dotNetObjectId, string callId) { throw null; } + public string AssemblyName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string CallId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public long DotNetObjectId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string MethodIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DotNetInvocationResult + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DotNetInvocationResult(System.Exception exception, string errorKind) { throw null; } + public DotNetInvocationResult(object result) { throw null; } + public string ErrorKind { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public object Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public bool Success { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } } From b4304367f9d0536983df54e787880ef700234618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leandro=20L=C3=B3pez?= Date: Thu, 29 Aug 2019 10:22:41 -0300 Subject: [PATCH 07/22] Fix typo\n\nCommit migrated from https://github.com/dotnet/extensions/commit/6df967b79a6dec5c14b308b8b3de1996fd6b8018 --- src/HealthChecks/Abstractions/src/HealthReport.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HealthChecks/Abstractions/src/HealthReport.cs b/src/HealthChecks/Abstractions/src/HealthReport.cs index 91ed798811..1dacff45e3 100644 --- a/src/HealthChecks/Abstractions/src/HealthReport.cs +++ b/src/HealthChecks/Abstractions/src/HealthReport.cs @@ -34,7 +34,7 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks /// /// Gets a representing the aggregate status of all the health checks. The value of - /// will be the most servere status reported by a health check. If no checks were executed, the value is always . + /// will be the most severe status reported by a health check. If no checks were executed, the value is always . /// public HealthStatus Status { get; } From 99bf7f0b56dbc30842a083b1d931f2fa9df234fe Mon Sep 17 00:00:00 2001 From: John Luo Date: Tue, 17 Sep 2019 14:35:45 -0700 Subject: [PATCH 08/22] Update ref assembly generation to use DefaultNetCoreTargetFramework property (dotnet/extensions#2362) \n\nCommit migrated from https://github.com/dotnet/extensions/commit/d15c5687db29e4e1f31a302fe243226b0a3a17e3 --- .../Microsoft.Extensions.Configuration.KeyPerFile.csproj | 6 +++--- ...osoft.Extensions.Configuration.KeyPerFile.netcoreapp.cs} | 0 .../ref/Microsoft.Extensions.FileProviders.Embedded.csproj | 6 +++--- ...crosoft.Extensions.FileProviders.Embedded.netcoreapp.cs} | 0 ....Extensions.Diagnostics.HealthChecks.Abstractions.csproj | 6 +++--- ...ons.Diagnostics.HealthChecks.Abstractions.netcoreapp.cs} | 0 .../Microsoft.Extensions.Diagnostics.HealthChecks.csproj | 6 +++--- ...osoft.Extensions.Diagnostics.HealthChecks.netcoreapp.cs} | 0 .../Microsoft.JSInterop/ref/Microsoft.JSInterop.csproj | 6 +++--- ...p.netcoreapp5.0.cs => Microsoft.JSInterop.netcoreapp.cs} | 0 .../Microsoft.Extensions.Localization.Abstractions.csproj | 6 +++--- ...soft.Extensions.Localization.Abstractions.netcoreapp.cs} | 0 .../ref/Microsoft.Extensions.Localization.csproj | 6 +++--- ...0.cs => Microsoft.Extensions.Localization.netcoreapp.cs} | 0 src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.csproj | 6 +++--- ....0.cs => Microsoft.Extensions.WebEncoders.netcoreapp.cs} | 0 16 files changed, 24 insertions(+), 24 deletions(-) rename src/Configuration.KeyPerFile/ref/{Microsoft.Extensions.Configuration.KeyPerFile.netcoreapp5.0.cs => Microsoft.Extensions.Configuration.KeyPerFile.netcoreapp.cs} (100%) rename src/FileProviders/Embedded/ref/{Microsoft.Extensions.FileProviders.Embedded.netcoreapp5.0.cs => Microsoft.Extensions.FileProviders.Embedded.netcoreapp.cs} (100%) rename src/HealthChecks/Abstractions/ref/{Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netcoreapp5.0.cs => Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netcoreapp.cs} (100%) rename src/HealthChecks/HealthChecks/ref/{Microsoft.Extensions.Diagnostics.HealthChecks.netcoreapp5.0.cs => Microsoft.Extensions.Diagnostics.HealthChecks.netcoreapp.cs} (100%) rename src/JSInterop/Microsoft.JSInterop/ref/{Microsoft.JSInterop.netcoreapp5.0.cs => Microsoft.JSInterop.netcoreapp.cs} (100%) rename src/Localization/Abstractions/ref/{Microsoft.Extensions.Localization.Abstractions.netcoreapp5.0.cs => Microsoft.Extensions.Localization.Abstractions.netcoreapp.cs} (100%) rename src/Localization/Localization/ref/{Microsoft.Extensions.Localization.netcoreapp5.0.cs => Microsoft.Extensions.Localization.netcoreapp.cs} (100%) rename src/WebEncoders/ref/{Microsoft.Extensions.WebEncoders.netcoreapp5.0.cs => Microsoft.Extensions.WebEncoders.netcoreapp.cs} (100%) diff --git a/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.csproj b/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.csproj index 2ba44d34fa..8dbe6d3ba1 100644 --- a/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.csproj +++ b/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.csproj @@ -1,15 +1,15 @@ - netstandard2.0;netcoreapp5.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) - - + + diff --git a/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.netcoreapp5.0.cs b/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.netcoreapp.cs similarity index 100% rename from src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.netcoreapp5.0.cs rename to src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.netcoreapp.cs diff --git a/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.csproj b/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.csproj index 98d071201c..89cba5ba57 100644 --- a/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.csproj +++ b/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.csproj @@ -1,14 +1,14 @@ - netstandard2.0;netcoreapp5.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) - - + + diff --git a/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.netcoreapp5.0.cs b/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.netcoreapp.cs similarity index 100% rename from src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.netcoreapp5.0.cs rename to src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.netcoreapp.cs diff --git a/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj b/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj index d202fe2d71..6b67a08686 100644 --- a/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj +++ b/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj @@ -1,14 +1,14 @@ - netstandard2.0;netcoreapp5.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) - - + + diff --git a/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netcoreapp5.0.cs b/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netcoreapp.cs similarity index 100% rename from src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netcoreapp5.0.cs rename to src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netcoreapp.cs diff --git a/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.csproj b/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.csproj index 07f63049eb..83dae521fb 100644 --- a/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.csproj +++ b/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netcoreapp5.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) @@ -9,8 +9,8 @@ - - + + diff --git a/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.netcoreapp5.0.cs b/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.netcoreapp.cs similarity index 100% rename from src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.netcoreapp5.0.cs rename to src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.netcoreapp.cs diff --git a/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.csproj b/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.csproj index ae19552c6d..ceb24636ab 100644 --- a/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.csproj +++ b/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.csproj @@ -1,14 +1,14 @@ - netstandard2.0;netcoreapp5.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) - - + + diff --git a/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netcoreapp5.0.cs b/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netcoreapp.cs similarity index 100% rename from src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netcoreapp5.0.cs rename to src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netcoreapp.cs diff --git a/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.csproj b/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.csproj index 66e71c0554..af97cae594 100644 --- a/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.csproj +++ b/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.csproj @@ -1,14 +1,14 @@ - netstandard2.0;netcoreapp5.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) - - + + diff --git a/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netcoreapp5.0.cs b/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netcoreapp.cs similarity index 100% rename from src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netcoreapp5.0.cs rename to src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netcoreapp.cs diff --git a/src/Localization/Localization/ref/Microsoft.Extensions.Localization.csproj b/src/Localization/Localization/ref/Microsoft.Extensions.Localization.csproj index 2a84077b06..67e8f38f89 100644 --- a/src/Localization/Localization/ref/Microsoft.Extensions.Localization.csproj +++ b/src/Localization/Localization/ref/Microsoft.Extensions.Localization.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netcoreapp5.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) @@ -10,8 +10,8 @@ - - + + diff --git a/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netcoreapp5.0.cs b/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netcoreapp.cs similarity index 100% rename from src/Localization/Localization/ref/Microsoft.Extensions.Localization.netcoreapp5.0.cs rename to src/Localization/Localization/ref/Microsoft.Extensions.Localization.netcoreapp.cs diff --git a/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.csproj b/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.csproj index 3fa06a7280..5beee97dd6 100644 --- a/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.csproj +++ b/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netcoreapp5.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) @@ -9,8 +9,8 @@ - - + + diff --git a/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.netcoreapp5.0.cs b/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.netcoreapp.cs similarity index 100% rename from src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.netcoreapp5.0.cs rename to src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.netcoreapp.cs From 3ef03bf8dceb917248b59f5fb95ab9c2b70324b3 Mon Sep 17 00:00:00 2001 From: John Luo Date: Tue, 17 Sep 2019 20:52:34 -0700 Subject: [PATCH 09/22] Fix tests and tools \n\nCommit migrated from https://github.com/dotnet/extensions/commit/4bc42dae9c186b53f23c5291ca2ba5f4349a73a0 --- ...Microsoft.Extensions.Localization.RootNamespace.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/Microsoft.Extensions.Localization.RootNamespace.Tests.csproj b/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/Microsoft.Extensions.Localization.RootNamespace.Tests.csproj index d7a45a84ab..3d9153ef33 100644 --- a/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/Microsoft.Extensions.Localization.RootNamespace.Tests.csproj +++ b/src/Localization/Localization/test/Microsoft.Extensions.Localization.RootNamespace.Tests/Microsoft.Extensions.Localization.RootNamespace.Tests.csproj @@ -1,6 +1,6 @@ - netcoreapp3.0;net472 + $(DefaultNetCoreTargetFramework);net472 LocalizationTest.Abc From 29d2fd4576675f4595937c7d98ca001a906ccffb Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 31 Oct 2019 22:47:08 +0000 Subject: [PATCH 10/22] [master] Update dependencies from dotnet/core-setup dotnet/arcade (dotnet/extensions#2559) * Update dependencies from https://github.com/dotnet/arcade build 20191023.3 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19523.3 - Microsoft.DotNet.GenAPI - 5.0.0-beta.19523.3 - Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.19523.3 * Updated ref asssemblies * Update dependencies from https://github.com/dotnet/core-setup build 20191024.4 - Microsoft.NETCore.App.Ref - 5.0.0-alpha1.19524.4 - NETStandard.Library.Ref - 2.1.0-alpha1.19524.4 - Microsoft.NETCore.App.Runtime.win-x64 - 5.0.0-alpha1.19524.4 Dependency coherency updates - Microsoft.Win32.Registry - 5.0.0-alpha.1.19524.14 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ComponentModel.Annotations - 5.0.0-alpha.1.19524.14 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.DiagnosticSource - 5.0.0-alpha.1.19524.14 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.EventLog - 5.0.0-alpha.1.19524.14 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.IO.Pipelines - 5.0.0-alpha.1.19524.14 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Reflection.Metadata - 5.0.0-alpha.1.19524.14 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Runtime.CompilerServices.Unsafe - 5.0.0-alpha.1.19524.14 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Cng - 5.0.0-alpha.1.19524.14 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Xml - 5.0.0-alpha.1.19524.14 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ServiceProcess.ServiceController - 5.0.0-alpha.1.19524.14 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Encodings.Web - 5.0.0-alpha.1.19524.14 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Json - 5.0.0-alpha.1.19524.14 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.NETCore.Platforms - 5.0.0-alpha.1.19524.14 (parent: Microsoft.NETCore.App.Runtime.win-x64) * Update dependencies from https://github.com/dotnet/core-setup build 20191025.8 - Microsoft.NETCore.App.Ref - 5.0.0-alpha1.19525.8 - NETStandard.Library.Ref - 2.1.0-alpha1.19525.8 - Microsoft.NETCore.App.Runtime.win-x64 - 5.0.0-alpha1.19525.8 Dependency coherency updates - Microsoft.Win32.Registry - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ComponentModel.Annotations - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.DiagnosticSource - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.EventLog - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.IO.Pipelines - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Reflection.Metadata - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Runtime.CompilerServices.Unsafe - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Cng - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Xml - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ServiceProcess.ServiceController - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Encodings.Web - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Json - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.NETCore.Platforms - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) * Update dependencies from https://github.com/dotnet/core-setup build 20191026.2 - Microsoft.NETCore.App.Ref - 5.0.0-alpha1.19526.2 - NETStandard.Library.Ref - 2.1.0-alpha1.19526.2 - Microsoft.NETCore.App.Runtime.win-x64 - 5.0.0-alpha1.19526.2 Dependency coherency updates - Microsoft.Win32.Registry - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ComponentModel.Annotations - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.DiagnosticSource - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.EventLog - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.IO.Pipelines - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Reflection.Metadata - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Runtime.CompilerServices.Unsafe - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Cng - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Xml - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ServiceProcess.ServiceController - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Encodings.Web - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Json - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.NETCore.Platforms - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) * Update dependencies from https://github.com/dotnet/arcade build 20191027.3 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19527.3 - Microsoft.DotNet.GenAPI - 5.0.0-beta.19527.3 - Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.19527.3 * Update dependencies from https://github.com/dotnet/core-setup build 20191027.2 - Microsoft.NETCore.App.Ref - 5.0.0-alpha1.19527.2 - NETStandard.Library.Ref - 2.1.0-alpha1.19527.2 - Microsoft.NETCore.App.Runtime.win-x64 - 5.0.0-alpha1.19527.2 Dependency coherency updates - Microsoft.Win32.Registry - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ComponentModel.Annotations - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.DiagnosticSource - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.EventLog - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.IO.Pipelines - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Reflection.Metadata - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Runtime.CompilerServices.Unsafe - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Cng - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Xml - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ServiceProcess.ServiceController - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Encodings.Web - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Json - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.NETCore.Platforms - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) * Update dependencies from https://github.com/dotnet/core-setup build 20191028.5 - Microsoft.NETCore.App.Ref - 5.0.0-alpha.1.19528.5 - NETStandard.Library.Ref - 2.1.0-alpha.1.19528.5 - Microsoft.NETCore.App.Runtime.win-x64 - 5.0.0-alpha.1.19528.5 Dependency coherency updates - Microsoft.Win32.Registry - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ComponentModel.Annotations - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.DiagnosticSource - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.EventLog - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.IO.Pipelines - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Reflection.Metadata - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Runtime.CompilerServices.Unsafe - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Cng - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Xml - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ServiceProcess.ServiceController - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Encodings.Web - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Json - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.NETCore.Platforms - 5.0.0-alpha.1.19525.3 (parent: Microsoft.NETCore.App.Runtime.win-x64) * Update dependencies from https://github.com/dotnet/core-setup build 20191030.10 - Microsoft.NETCore.App.Ref - 5.0.0-alpha.1.19530.10 - NETStandard.Library.Ref - 2.1.0-alpha.1.19530.10 - Microsoft.NETCore.App.Runtime.win-x64 - 5.0.0-alpha.1.19530.10 Dependency coherency updates - Microsoft.Win32.Registry - 5.0.0-alpha.1.19530.13 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ComponentModel.Annotations - 5.0.0-alpha.1.19530.13 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.DiagnosticSource - 5.0.0-alpha.1.19530.13 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.EventLog - 5.0.0-alpha.1.19530.13 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.IO.Pipelines - 5.0.0-alpha.1.19530.13 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Reflection.Metadata - 5.0.0-alpha.1.19530.13 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Runtime.CompilerServices.Unsafe - 5.0.0-alpha.1.19530.13 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Cng - 5.0.0-alpha.1.19530.13 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Xml - 5.0.0-alpha.1.19530.13 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ServiceProcess.ServiceController - 5.0.0-alpha.1.19530.13 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Encodings.Web - 5.0.0-alpha.1.19530.13 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Json - 5.0.0-alpha.1.19530.13 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.NETCore.Platforms - 5.0.0-alpha.1.19530.13 (parent: Microsoft.NETCore.App.Runtime.win-x64) * Update dependencies from https://github.com/dotnet/arcade build 20191031.8 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19531.8 - Microsoft.DotNet.GenAPI - 5.0.0-beta.19531.8 - Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.19531.8 \n\nCommit migrated from https://github.com/dotnet/extensions/commit/fc2a7eadfedd88f951eaecd45ecac6989b0f897f --- ...ons.Configuration.KeyPerFile.netcoreapp.cs | 8 +-- ...Configuration.KeyPerFile.netstandard2.0.cs | 8 +-- ...sions.FileProviders.Embedded.netcoreapp.cs | 6 +- ...s.FileProviders.Embedded.netstandard2.0.cs | 6 +- ...cs.HealthChecks.Abstractions.netcoreapp.cs | 32 +++++----- ...ealthChecks.Abstractions.netstandard2.0.cs | 32 +++++----- ...ons.Diagnostics.HealthChecks.netcoreapp.cs | 6 +- ...Diagnostics.HealthChecks.netstandard2.0.cs | 6 +- .../ref/Microsoft.JSInterop.netcoreapp.cs | 22 +++---- .../ref/Microsoft.JSInterop.netstandard2.0.cs | 22 +++---- ...ns.Localization.Abstractions.netcoreapp.cs | 8 +-- ...ocalization.Abstractions.netstandard2.0.cs | 8 +-- ...soft.Extensions.Localization.netcoreapp.cs | 8 +-- ....Extensions.Localization.netstandard2.0.cs | 8 +-- ...ft.Extensions.ObjectPool.netstandard2.0.cs | 6 +- .../ref/Microsoft.AspNetCore.Testing.net46.cs | 58 +++++++++---------- ...osoft.AspNetCore.Testing.netstandard2.0.cs | 58 +++++++++---------- ...osoft.Extensions.WebEncoders.netcoreapp.cs | 2 +- ...t.Extensions.WebEncoders.netstandard2.0.cs | 2 +- 19 files changed, 153 insertions(+), 153 deletions(-) diff --git a/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.netcoreapp.cs b/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.netcoreapp.cs index e26ca1909d..37cefae6cb 100644 --- a/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.netcoreapp.cs +++ b/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.netcoreapp.cs @@ -20,10 +20,10 @@ namespace Microsoft.Extensions.Configuration.KeyPerFile public partial class KeyPerFileConfigurationSource : Microsoft.Extensions.Configuration.IConfigurationSource { public KeyPerFileConfigurationSource() { } - public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.Func IgnoreCondition { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string IgnorePrefix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool Optional { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public System.Func IgnoreCondition { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public string IgnorePrefix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public bool Optional { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder) { throw null; } } } diff --git a/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.netstandard2.0.cs b/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.netstandard2.0.cs index e26ca1909d..37cefae6cb 100644 --- a/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.netstandard2.0.cs +++ b/src/Configuration.KeyPerFile/ref/Microsoft.Extensions.Configuration.KeyPerFile.netstandard2.0.cs @@ -20,10 +20,10 @@ namespace Microsoft.Extensions.Configuration.KeyPerFile public partial class KeyPerFileConfigurationSource : Microsoft.Extensions.Configuration.IConfigurationSource { public KeyPerFileConfigurationSource() { } - public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.Func IgnoreCondition { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string IgnorePrefix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool Optional { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public System.Func IgnoreCondition { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public string IgnorePrefix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public bool Optional { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder) { throw null; } } } diff --git a/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.netcoreapp.cs b/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.netcoreapp.cs index 1596f191fd..033174efc0 100644 --- a/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.netcoreapp.cs +++ b/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.netcoreapp.cs @@ -17,7 +17,7 @@ namespace Microsoft.Extensions.FileProviders public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root) { } public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root, System.DateTimeOffset lastModified) { } public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root, string manifestName, System.DateTimeOffset lastModified) { } - public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public Microsoft.Extensions.FileProviders.IDirectoryContents GetDirectoryContents(string subpath) { throw null; } public Microsoft.Extensions.FileProviders.IFileInfo GetFileInfo(string subpath) { throw null; } public Microsoft.Extensions.Primitives.IChangeToken Watch(string filter) { throw null; } @@ -30,9 +30,9 @@ namespace Microsoft.Extensions.FileProviders.Embedded public EmbeddedResourceFileInfo(System.Reflection.Assembly assembly, string resourcePath, string name, System.DateTimeOffset lastModified) { } public bool Exists { get { throw null; } } public bool IsDirectory { get { throw null; } } - public System.DateTimeOffset LastModified { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.DateTimeOffset LastModified { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public long Length { get { throw null; } } - public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public string PhysicalPath { get { throw null; } } public System.IO.Stream CreateReadStream() { throw null; } } diff --git a/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.netstandard2.0.cs b/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.netstandard2.0.cs index 1596f191fd..033174efc0 100644 --- a/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.netstandard2.0.cs +++ b/src/FileProviders/Embedded/ref/Microsoft.Extensions.FileProviders.Embedded.netstandard2.0.cs @@ -17,7 +17,7 @@ namespace Microsoft.Extensions.FileProviders public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root) { } public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root, System.DateTimeOffset lastModified) { } public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root, string manifestName, System.DateTimeOffset lastModified) { } - public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public Microsoft.Extensions.FileProviders.IDirectoryContents GetDirectoryContents(string subpath) { throw null; } public Microsoft.Extensions.FileProviders.IFileInfo GetFileInfo(string subpath) { throw null; } public Microsoft.Extensions.Primitives.IChangeToken Watch(string filter) { throw null; } @@ -30,9 +30,9 @@ namespace Microsoft.Extensions.FileProviders.Embedded public EmbeddedResourceFileInfo(System.Reflection.Assembly assembly, string resourcePath, string name, System.DateTimeOffset lastModified) { } public bool Exists { get { throw null; } } public bool IsDirectory { get { throw null; } } - public System.DateTimeOffset LastModified { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.DateTimeOffset LastModified { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public long Length { get { throw null; } } - public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public string PhysicalPath { get { throw null; } } public System.IO.Stream CreateReadStream() { throw null; } } diff --git a/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netcoreapp.cs b/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netcoreapp.cs index 8c53adc275..6166362745 100644 --- a/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netcoreapp.cs +++ b/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netcoreapp.cs @@ -6,7 +6,7 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks public sealed partial class HealthCheckContext { public HealthCheckContext() { } - public Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration Registration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration Registration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } } public sealed partial class HealthCheckRegistration { @@ -15,9 +15,9 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks public HealthCheckRegistration(string name, System.Func factory, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags) { } public HealthCheckRegistration(string name, System.Func factory, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags, System.TimeSpan? timeout) { } public System.Func Factory { get { throw null; } set { } } - public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus FailureStatus { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus FailureStatus { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string Name { get { throw null; } set { } } - public System.Collections.Generic.ISet Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.ISet Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public System.TimeSpan Timeout { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -26,10 +26,10 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks private object _dummy; private int _dummyPrimitive; public HealthCheckResult(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description = null, System.Exception exception = null, System.Collections.Generic.IReadOnlyDictionary data = null) { throw null; } - public System.Collections.Generic.IReadOnlyDictionary Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Degraded(string description = null, System.Exception exception = null, System.Collections.Generic.IReadOnlyDictionary data = null) { throw null; } public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Healthy(string description = null, System.Collections.Generic.IReadOnlyDictionary data = null) { throw null; } public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Unhealthy(string description = null, System.Exception exception = null, System.Collections.Generic.IReadOnlyDictionary data = null) { throw null; } @@ -37,9 +37,9 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks public sealed partial class HealthReport { public HealthReport(System.Collections.Generic.IReadOnlyDictionary entries, System.TimeSpan totalDuration) { } - public System.Collections.Generic.IReadOnlyDictionary Entries { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.TimeSpan TotalDuration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Entries { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.TimeSpan TotalDuration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public partial struct HealthReportEntry @@ -48,12 +48,12 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks private int _dummyPrimitive; public HealthReportEntry(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description, System.TimeSpan duration, System.Exception exception, System.Collections.Generic.IReadOnlyDictionary data) { throw null; } public HealthReportEntry(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description, System.TimeSpan duration, System.Exception exception, System.Collections.Generic.IReadOnlyDictionary data, System.Collections.Generic.IEnumerable tags = null) { throw null; } - public System.Collections.Generic.IReadOnlyDictionary Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.TimeSpan Duration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Collections.Generic.IEnumerable Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.TimeSpan Duration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.Collections.Generic.IEnumerable Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } public enum HealthStatus { diff --git a/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netstandard2.0.cs b/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netstandard2.0.cs index 8c53adc275..6166362745 100644 --- a/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netstandard2.0.cs +++ b/src/HealthChecks/Abstractions/ref/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.netstandard2.0.cs @@ -6,7 +6,7 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks public sealed partial class HealthCheckContext { public HealthCheckContext() { } - public Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration Registration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration Registration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } } public sealed partial class HealthCheckRegistration { @@ -15,9 +15,9 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks public HealthCheckRegistration(string name, System.Func factory, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags) { } public HealthCheckRegistration(string name, System.Func factory, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags, System.TimeSpan? timeout) { } public System.Func Factory { get { throw null; } set { } } - public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus FailureStatus { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus FailureStatus { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string Name { get { throw null; } set { } } - public System.Collections.Generic.ISet Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.ISet Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public System.TimeSpan Timeout { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -26,10 +26,10 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks private object _dummy; private int _dummyPrimitive; public HealthCheckResult(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description = null, System.Exception exception = null, System.Collections.Generic.IReadOnlyDictionary data = null) { throw null; } - public System.Collections.Generic.IReadOnlyDictionary Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Degraded(string description = null, System.Exception exception = null, System.Collections.Generic.IReadOnlyDictionary data = null) { throw null; } public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Healthy(string description = null, System.Collections.Generic.IReadOnlyDictionary data = null) { throw null; } public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Unhealthy(string description = null, System.Exception exception = null, System.Collections.Generic.IReadOnlyDictionary data = null) { throw null; } @@ -37,9 +37,9 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks public sealed partial class HealthReport { public HealthReport(System.Collections.Generic.IReadOnlyDictionary entries, System.TimeSpan totalDuration) { } - public System.Collections.Generic.IReadOnlyDictionary Entries { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.TimeSpan TotalDuration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Entries { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.TimeSpan TotalDuration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public partial struct HealthReportEntry @@ -48,12 +48,12 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks private int _dummyPrimitive; public HealthReportEntry(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description, System.TimeSpan duration, System.Exception exception, System.Collections.Generic.IReadOnlyDictionary data) { throw null; } public HealthReportEntry(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description, System.TimeSpan duration, System.Exception exception, System.Collections.Generic.IReadOnlyDictionary data, System.Collections.Generic.IEnumerable tags = null) { throw null; } - public System.Collections.Generic.IReadOnlyDictionary Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.TimeSpan Duration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Collections.Generic.IEnumerable Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.TimeSpan Duration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.Collections.Generic.IEnumerable Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } public enum HealthStatus { diff --git a/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.netcoreapp.cs b/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.netcoreapp.cs index a23961efdd..cee2d1420e 100644 --- a/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.netcoreapp.cs +++ b/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.netcoreapp.cs @@ -42,8 +42,8 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks public HealthCheckPublisherOptions() { } public System.TimeSpan Delay { get { throw null; } set { } } public System.TimeSpan Period { get { throw null; } set { } } - public System.Func Predicate { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.TimeSpan Timeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public System.Func Predicate { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public System.TimeSpan Timeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } } public abstract partial class HealthCheckService { @@ -54,6 +54,6 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks public sealed partial class HealthCheckServiceOptions { public HealthCheckServiceOptions() { } - public System.Collections.Generic.ICollection Registrations { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.ICollection Registrations { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } } diff --git a/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.netstandard2.0.cs b/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.netstandard2.0.cs index a23961efdd..cee2d1420e 100644 --- a/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.netstandard2.0.cs +++ b/src/HealthChecks/HealthChecks/ref/Microsoft.Extensions.Diagnostics.HealthChecks.netstandard2.0.cs @@ -42,8 +42,8 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks public HealthCheckPublisherOptions() { } public System.TimeSpan Delay { get { throw null; } set { } } public System.TimeSpan Period { get { throw null; } set { } } - public System.Func Predicate { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.TimeSpan Timeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public System.Func Predicate { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public System.TimeSpan Timeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } } public abstract partial class HealthCheckService { @@ -54,6 +54,6 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks public sealed partial class HealthCheckServiceOptions { public HealthCheckServiceOptions() { } - public System.Collections.Generic.ICollection Registrations { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.ICollection Registrations { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } } diff --git a/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netcoreapp.cs b/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netcoreapp.cs index 2d8c51caaf..3abe22eea0 100644 --- a/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netcoreapp.cs +++ b/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netcoreapp.cs @@ -42,13 +42,13 @@ namespace Microsoft.JSInterop { public JSInvokableAttribute() { } public JSInvokableAttribute(string identifier) { } - public string Identifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Identifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } public abstract partial class JSRuntime : Microsoft.JSInterop.IJSRuntime { protected JSRuntime() { } - protected System.TimeSpan? DefaultAsyncTimeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected internal System.Text.Json.JsonSerializerOptions JsonSerializerOptions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected System.TimeSpan? DefaultAsyncTimeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + protected internal System.Text.Json.JsonSerializerOptions JsonSerializerOptions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } protected abstract void BeginInvokeJS(long taskId, string identifier, string argsJson); protected internal abstract void EndInvokeDotNet(Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo invocationInfo, in Microsoft.JSInterop.Infrastructure.DotNetInvocationResult invocationResult); public System.Threading.Tasks.ValueTask InvokeAsync(string identifier, object[] args) { throw null; } @@ -82,10 +82,10 @@ namespace Microsoft.JSInterop.Infrastructure private readonly object _dummy; private readonly int _dummyPrimitive; public DotNetInvocationInfo(string assemblyName, string methodIdentifier, long dotNetObjectId, string callId) { throw null; } - public string AssemblyName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string CallId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public long DotNetObjectId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string MethodIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string AssemblyName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string CallId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public long DotNetObjectId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string MethodIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DotNetInvocationResult @@ -94,9 +94,9 @@ namespace Microsoft.JSInterop.Infrastructure private readonly int _dummyPrimitive; public DotNetInvocationResult(System.Exception exception, string errorKind) { throw null; } public DotNetInvocationResult(object result) { throw null; } - public string ErrorKind { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public object Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public bool Success { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string ErrorKind { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public object Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public bool Success { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } } diff --git a/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netstandard2.0.cs b/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netstandard2.0.cs index 2d8c51caaf..3abe22eea0 100644 --- a/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netstandard2.0.cs +++ b/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netstandard2.0.cs @@ -42,13 +42,13 @@ namespace Microsoft.JSInterop { public JSInvokableAttribute() { } public JSInvokableAttribute(string identifier) { } - public string Identifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Identifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } public abstract partial class JSRuntime : Microsoft.JSInterop.IJSRuntime { protected JSRuntime() { } - protected System.TimeSpan? DefaultAsyncTimeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected internal System.Text.Json.JsonSerializerOptions JsonSerializerOptions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected System.TimeSpan? DefaultAsyncTimeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + protected internal System.Text.Json.JsonSerializerOptions JsonSerializerOptions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } protected abstract void BeginInvokeJS(long taskId, string identifier, string argsJson); protected internal abstract void EndInvokeDotNet(Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo invocationInfo, in Microsoft.JSInterop.Infrastructure.DotNetInvocationResult invocationResult); public System.Threading.Tasks.ValueTask InvokeAsync(string identifier, object[] args) { throw null; } @@ -82,10 +82,10 @@ namespace Microsoft.JSInterop.Infrastructure private readonly object _dummy; private readonly int _dummyPrimitive; public DotNetInvocationInfo(string assemblyName, string methodIdentifier, long dotNetObjectId, string callId) { throw null; } - public string AssemblyName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string CallId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public long DotNetObjectId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string MethodIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string AssemblyName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string CallId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public long DotNetObjectId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string MethodIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DotNetInvocationResult @@ -94,9 +94,9 @@ namespace Microsoft.JSInterop.Infrastructure private readonly int _dummyPrimitive; public DotNetInvocationResult(System.Exception exception, string errorKind) { throw null; } public DotNetInvocationResult(object result) { throw null; } - public string ErrorKind { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public object Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public bool Success { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string ErrorKind { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public object Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public bool Success { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } } diff --git a/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netcoreapp.cs b/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netcoreapp.cs index 174cac28e5..8a5f5baa08 100644 --- a/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netcoreapp.cs +++ b/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netcoreapp.cs @@ -24,10 +24,10 @@ namespace Microsoft.Extensions.Localization public LocalizedString(string name, string value) { } public LocalizedString(string name, string value, bool resourceNotFound) { } public LocalizedString(string name, string value, bool resourceNotFound, string searchedLocation) { } - public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public bool ResourceNotFound { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string SearchedLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public bool ResourceNotFound { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string SearchedLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public static implicit operator string (Microsoft.Extensions.Localization.LocalizedString localizedString) { throw null; } public override string ToString() { throw null; } } diff --git a/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netstandard2.0.cs b/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netstandard2.0.cs index 174cac28e5..8a5f5baa08 100644 --- a/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netstandard2.0.cs +++ b/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netstandard2.0.cs @@ -24,10 +24,10 @@ namespace Microsoft.Extensions.Localization public LocalizedString(string name, string value) { } public LocalizedString(string name, string value, bool resourceNotFound) { } public LocalizedString(string name, string value, bool resourceNotFound, string searchedLocation) { } - public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public bool ResourceNotFound { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string SearchedLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public bool ResourceNotFound { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string SearchedLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public static implicit operator string (Microsoft.Extensions.Localization.LocalizedString localizedString) { throw null; } public override string ToString() { throw null; } } diff --git a/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netcoreapp.cs b/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netcoreapp.cs index 80175da718..741e1ce106 100644 --- a/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netcoreapp.cs +++ b/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netcoreapp.cs @@ -18,13 +18,13 @@ namespace Microsoft.Extensions.Localization public partial class LocalizationOptions { public LocalizationOptions() { } - public string ResourcesPath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string ResourcesPath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)] public partial class ResourceLocationAttribute : System.Attribute { public ResourceLocationAttribute(string resourceLocation) { } - public string ResourceLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string ResourceLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } public partial class ResourceManagerStringLocalizer : Microsoft.Extensions.Localization.IStringLocalizer { @@ -69,7 +69,7 @@ namespace Microsoft.Extensions.Localization public partial class RootNamespaceAttribute : System.Attribute { public RootNamespaceAttribute(string rootNamespace) { } - public string RootNamespace { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string RootNamespace { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } } namespace Microsoft.Extensions.Localization.Internal @@ -77,7 +77,7 @@ namespace Microsoft.Extensions.Localization.Internal public partial class AssemblyWrapper { public AssemblyWrapper(System.Reflection.Assembly assembly) { } - public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public virtual string FullName { get { throw null; } } public virtual System.IO.Stream GetManifestResourceStream(string name) { throw null; } } diff --git a/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netstandard2.0.cs b/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netstandard2.0.cs index 80175da718..741e1ce106 100644 --- a/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netstandard2.0.cs +++ b/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netstandard2.0.cs @@ -18,13 +18,13 @@ namespace Microsoft.Extensions.Localization public partial class LocalizationOptions { public LocalizationOptions() { } - public string ResourcesPath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string ResourcesPath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)] public partial class ResourceLocationAttribute : System.Attribute { public ResourceLocationAttribute(string resourceLocation) { } - public string ResourceLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string ResourceLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } public partial class ResourceManagerStringLocalizer : Microsoft.Extensions.Localization.IStringLocalizer { @@ -69,7 +69,7 @@ namespace Microsoft.Extensions.Localization public partial class RootNamespaceAttribute : System.Attribute { public RootNamespaceAttribute(string rootNamespace) { } - public string RootNamespace { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string RootNamespace { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } } namespace Microsoft.Extensions.Localization.Internal @@ -77,7 +77,7 @@ namespace Microsoft.Extensions.Localization.Internal public partial class AssemblyWrapper { public AssemblyWrapper(System.Reflection.Assembly assembly) { } - public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public virtual string FullName { get { throw null; } } public virtual System.IO.Stream GetManifestResourceStream(string name) { throw null; } } diff --git a/src/ObjectPool/ref/Microsoft.Extensions.ObjectPool.netstandard2.0.cs b/src/ObjectPool/ref/Microsoft.Extensions.ObjectPool.netstandard2.0.cs index 083aaf14ef..b3b72bec86 100644 --- a/src/ObjectPool/ref/Microsoft.Extensions.ObjectPool.netstandard2.0.cs +++ b/src/ObjectPool/ref/Microsoft.Extensions.ObjectPool.netstandard2.0.cs @@ -6,7 +6,7 @@ namespace Microsoft.Extensions.ObjectPool public partial class DefaultObjectPoolProvider : Microsoft.Extensions.ObjectPool.ObjectPoolProvider { public DefaultObjectPoolProvider() { } - public int MaximumRetained { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public int MaximumRetained { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public override Microsoft.Extensions.ObjectPool.ObjectPool Create(Microsoft.Extensions.ObjectPool.IPooledObjectPolicy policy) { throw null; } } public partial class DefaultObjectPool : Microsoft.Extensions.ObjectPool.ObjectPool where T : class @@ -68,8 +68,8 @@ namespace Microsoft.Extensions.ObjectPool public partial class StringBuilderPooledObjectPolicy : Microsoft.Extensions.ObjectPool.PooledObjectPolicy { public StringBuilderPooledObjectPolicy() { } - public int InitialCapacity { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public int MaximumRetainedCapacity { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public int InitialCapacity { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public int MaximumRetainedCapacity { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public override System.Text.StringBuilder Create() { throw null; } public override bool Return(System.Text.StringBuilder obj) { throw null; } } diff --git a/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs b/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs index a7b9c07a99..5fa7e9422e 100644 --- a/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs +++ b/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs @@ -34,7 +34,7 @@ namespace Microsoft.AspNetCore.Testing public partial class AssemblyFixtureAttribute : System.Attribute { public AssemblyFixtureAttribute(System.Type fixtureType) { } - public System.Type FixtureType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Type FixtureType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } [System.AttributeUsageAttribute(System.AttributeTargets.Method, AllowMultiple=false)] [Xunit.Sdk.XunitTestCaseDiscovererAttribute("Microsoft.AspNetCore.Testing.ConditionalFactDiscoverer", "Microsoft.AspNetCore.Testing")] @@ -62,14 +62,14 @@ namespace Microsoft.AspNetCore.Testing { public DockerOnlyAttribute() { } public bool IsMet { get { throw null; } } - public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)] public partial class EnvironmentVariableSkipConditionAttribute : System.Attribute, Microsoft.AspNetCore.Testing.ITestCondition { public EnvironmentVariableSkipConditionAttribute(string variableName, params string[] values) { } public bool IsMet { get { throw null; } } - public bool RunOnMatch { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool RunOnMatch { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string SkipReason { get { throw null; } } } public static partial class ExceptionAssert @@ -93,8 +93,8 @@ namespace Microsoft.AspNetCore.Testing public sealed partial class FlakyAttribute : System.Attribute, Xunit.Sdk.ITraitAttribute { public FlakyAttribute(string gitHubIssueUrl, string firstFilter, params string[] additionalFilters) { } - public System.Collections.Generic.IReadOnlyList Filters { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string GitHubIssueUrl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.IReadOnlyList Filters { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string GitHubIssueUrl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } public static partial class FlakyOn { @@ -131,7 +131,7 @@ namespace Microsoft.AspNetCore.Testing { public FrameworkSkipConditionAttribute(Microsoft.AspNetCore.Testing.RuntimeFrameworks excludedFrameworks) { } public bool IsMet { get { throw null; } } - public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } } public static partial class HelixQueues { @@ -174,7 +174,7 @@ namespace Microsoft.AspNetCore.Testing { public MinimumOSVersionAttribute(Microsoft.AspNetCore.Testing.OperatingSystems operatingSystem, string minVersion) { } public bool IsMet { get { throw null; } } - public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } } [System.FlagsAttribute] public enum OperatingSystems @@ -188,29 +188,29 @@ namespace Microsoft.AspNetCore.Testing { public OSSkipConditionAttribute(Microsoft.AspNetCore.Testing.OperatingSystems operatingSystem, params string[] versions) { } public bool IsMet { get { throw null; } } - public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false)] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class RepeatAttribute : System.Attribute { public RepeatAttribute(int runCount = 10) { } - public int RunCount { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public int RunCount { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } public partial class RepeatContext { public RepeatContext(int limit) { } public static Microsoft.AspNetCore.Testing.RepeatContext Current { get { throw null; } } - public int CurrentIteration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public int Limit { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public int CurrentIteration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public int Limit { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } [System.AttributeUsageAttribute(System.AttributeTargets.Method)] public partial class ReplaceCultureAttribute : Xunit.Sdk.BeforeAfterTestAttribute { public ReplaceCultureAttribute() { } public ReplaceCultureAttribute(string currentCulture, string currentUICulture) { } - public System.Globalization.CultureInfo Culture { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Globalization.CultureInfo UICulture { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Globalization.CultureInfo Culture { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.Globalization.CultureInfo UICulture { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public override void After(System.Reflection.MethodInfo methodUnderTest) { } public override void Before(System.Reflection.MethodInfo methodUnderTest) { } } @@ -232,7 +232,7 @@ namespace Microsoft.AspNetCore.Testing { public SkipOnCIAttribute(string issueUrl = "") { } public bool IsMet { get { throw null; } } - public string IssueUrl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string IssueUrl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public string SkipReason { get { throw null; } } public static string GetIfOnAzdo() { throw null; } public static string GetTargetHelixQueue() { throw null; } @@ -245,8 +245,8 @@ namespace Microsoft.AspNetCore.Testing { public SkipOnHelixAttribute(string issueUrl) { } public bool IsMet { get { throw null; } } - public string IssueUrl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Queues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string IssueUrl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string Queues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string SkipReason { get { throw null; } } public static string GetTargetHelixQueue() { throw null; } public static bool OnHelix() { throw null; } @@ -263,27 +263,27 @@ namespace Microsoft.AspNetCore.Testing public static partial class TaskExtensions { [System.Diagnostics.DebuggerStepThroughAttribute] - public static System.Threading.Tasks.Task TimeoutAfter(this System.Threading.Tasks.Task task, System.TimeSpan timeout, [System.Runtime.CompilerServices.CallerFilePathAttribute]string filePath = null, [System.Runtime.CompilerServices.CallerLineNumberAttribute]int lineNumber = 0) { throw null; } + public static System.Threading.Tasks.Task TimeoutAfter(this System.Threading.Tasks.Task task, System.TimeSpan timeout, [System.Runtime.CompilerServices.CallerFilePathAttribute] string filePath = null, [System.Runtime.CompilerServices.CallerLineNumberAttribute] int lineNumber = 0) { throw null; } [System.Diagnostics.DebuggerStepThroughAttribute] - public static System.Threading.Tasks.Task TimeoutAfter(this System.Threading.Tasks.Task task, System.TimeSpan timeout, [System.Runtime.CompilerServices.CallerFilePathAttribute]string filePath = null, [System.Runtime.CompilerServices.CallerLineNumberAttribute]int lineNumber = 0) { throw null; } + public static System.Threading.Tasks.Task TimeoutAfter(this System.Threading.Tasks.Task task, System.TimeSpan timeout, [System.Runtime.CompilerServices.CallerFilePathAttribute] string filePath = null, [System.Runtime.CompilerServices.CallerLineNumberAttribute] int lineNumber = 0) { throw null; } } public sealed partial class TestContext { public TestContext(System.Type testClass, object[] constructorArguments, System.Reflection.MethodInfo testMethod, object[] methodArguments, Xunit.Abstractions.ITestOutputHelper output) { } - public object[] ConstructorArguments { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public object[] ConstructorArguments { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public Microsoft.AspNetCore.Testing.TestFileOutputContext FileOutput { get { throw null; } } - public object[] MethodArguments { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Xunit.Abstractions.ITestOutputHelper Output { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Type TestClass { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Reflection.MethodInfo TestMethod { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public object[] MethodArguments { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public Xunit.Abstractions.ITestOutputHelper Output { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.Type TestClass { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.Reflection.MethodInfo TestMethod { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } public sealed partial class TestFileOutputContext { public TestFileOutputContext(Microsoft.AspNetCore.Testing.TestContext parent) { } - public string AssemblyOutputDirectory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string TestClassName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string TestClassOutputDirectory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string TestName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string AssemblyOutputDirectory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string TestClassName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string TestClassOutputDirectory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string TestName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public static string GetAssemblyBaseDirectory(System.Reflection.Assembly assembly, string baseDirectory = null) { throw null; } public static string GetOutputDirectory(System.Reflection.Assembly assembly) { throw null; } public static string GetTestClassName(System.Type type) { throw null; } @@ -299,8 +299,8 @@ namespace Microsoft.AspNetCore.Testing public partial class TestOutputDirectoryAttribute : System.Attribute { public TestOutputDirectoryAttribute(string targetFramework, string baseDirectory = null) { } - public string BaseDirectory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string TargetFramework { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string BaseDirectory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string TargetFramework { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } [System.ObsoleteAttribute("This API is obsolete and the pattern its usage encouraged should not be used anymore. See https://github.com/aspnet/Extensions/issues/1697 for details.")] public partial class TestPathUtilities diff --git a/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs b/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs index a7b9c07a99..5fa7e9422e 100644 --- a/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs +++ b/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs @@ -34,7 +34,7 @@ namespace Microsoft.AspNetCore.Testing public partial class AssemblyFixtureAttribute : System.Attribute { public AssemblyFixtureAttribute(System.Type fixtureType) { } - public System.Type FixtureType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Type FixtureType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } [System.AttributeUsageAttribute(System.AttributeTargets.Method, AllowMultiple=false)] [Xunit.Sdk.XunitTestCaseDiscovererAttribute("Microsoft.AspNetCore.Testing.ConditionalFactDiscoverer", "Microsoft.AspNetCore.Testing")] @@ -62,14 +62,14 @@ namespace Microsoft.AspNetCore.Testing { public DockerOnlyAttribute() { } public bool IsMet { get { throw null; } } - public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)] public partial class EnvironmentVariableSkipConditionAttribute : System.Attribute, Microsoft.AspNetCore.Testing.ITestCondition { public EnvironmentVariableSkipConditionAttribute(string variableName, params string[] values) { } public bool IsMet { get { throw null; } } - public bool RunOnMatch { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool RunOnMatch { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string SkipReason { get { throw null; } } } public static partial class ExceptionAssert @@ -93,8 +93,8 @@ namespace Microsoft.AspNetCore.Testing public sealed partial class FlakyAttribute : System.Attribute, Xunit.Sdk.ITraitAttribute { public FlakyAttribute(string gitHubIssueUrl, string firstFilter, params string[] additionalFilters) { } - public System.Collections.Generic.IReadOnlyList Filters { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string GitHubIssueUrl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.IReadOnlyList Filters { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string GitHubIssueUrl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } public static partial class FlakyOn { @@ -131,7 +131,7 @@ namespace Microsoft.AspNetCore.Testing { public FrameworkSkipConditionAttribute(Microsoft.AspNetCore.Testing.RuntimeFrameworks excludedFrameworks) { } public bool IsMet { get { throw null; } } - public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } } public static partial class HelixQueues { @@ -174,7 +174,7 @@ namespace Microsoft.AspNetCore.Testing { public MinimumOSVersionAttribute(Microsoft.AspNetCore.Testing.OperatingSystems operatingSystem, string minVersion) { } public bool IsMet { get { throw null; } } - public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } } [System.FlagsAttribute] public enum OperatingSystems @@ -188,29 +188,29 @@ namespace Microsoft.AspNetCore.Testing { public OSSkipConditionAttribute(Microsoft.AspNetCore.Testing.OperatingSystems operatingSystem, params string[] versions) { } public bool IsMet { get { throw null; } } - public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false)] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class RepeatAttribute : System.Attribute { public RepeatAttribute(int runCount = 10) { } - public int RunCount { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public int RunCount { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } public partial class RepeatContext { public RepeatContext(int limit) { } public static Microsoft.AspNetCore.Testing.RepeatContext Current { get { throw null; } } - public int CurrentIteration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public int Limit { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public int CurrentIteration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public int Limit { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } [System.AttributeUsageAttribute(System.AttributeTargets.Method)] public partial class ReplaceCultureAttribute : Xunit.Sdk.BeforeAfterTestAttribute { public ReplaceCultureAttribute() { } public ReplaceCultureAttribute(string currentCulture, string currentUICulture) { } - public System.Globalization.CultureInfo Culture { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Globalization.CultureInfo UICulture { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Globalization.CultureInfo Culture { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.Globalization.CultureInfo UICulture { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public override void After(System.Reflection.MethodInfo methodUnderTest) { } public override void Before(System.Reflection.MethodInfo methodUnderTest) { } } @@ -232,7 +232,7 @@ namespace Microsoft.AspNetCore.Testing { public SkipOnCIAttribute(string issueUrl = "") { } public bool IsMet { get { throw null; } } - public string IssueUrl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string IssueUrl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public string SkipReason { get { throw null; } } public static string GetIfOnAzdo() { throw null; } public static string GetTargetHelixQueue() { throw null; } @@ -245,8 +245,8 @@ namespace Microsoft.AspNetCore.Testing { public SkipOnHelixAttribute(string issueUrl) { } public bool IsMet { get { throw null; } } - public string IssueUrl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Queues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string IssueUrl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string Queues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string SkipReason { get { throw null; } } public static string GetTargetHelixQueue() { throw null; } public static bool OnHelix() { throw null; } @@ -263,27 +263,27 @@ namespace Microsoft.AspNetCore.Testing public static partial class TaskExtensions { [System.Diagnostics.DebuggerStepThroughAttribute] - public static System.Threading.Tasks.Task TimeoutAfter(this System.Threading.Tasks.Task task, System.TimeSpan timeout, [System.Runtime.CompilerServices.CallerFilePathAttribute]string filePath = null, [System.Runtime.CompilerServices.CallerLineNumberAttribute]int lineNumber = 0) { throw null; } + public static System.Threading.Tasks.Task TimeoutAfter(this System.Threading.Tasks.Task task, System.TimeSpan timeout, [System.Runtime.CompilerServices.CallerFilePathAttribute] string filePath = null, [System.Runtime.CompilerServices.CallerLineNumberAttribute] int lineNumber = 0) { throw null; } [System.Diagnostics.DebuggerStepThroughAttribute] - public static System.Threading.Tasks.Task TimeoutAfter(this System.Threading.Tasks.Task task, System.TimeSpan timeout, [System.Runtime.CompilerServices.CallerFilePathAttribute]string filePath = null, [System.Runtime.CompilerServices.CallerLineNumberAttribute]int lineNumber = 0) { throw null; } + public static System.Threading.Tasks.Task TimeoutAfter(this System.Threading.Tasks.Task task, System.TimeSpan timeout, [System.Runtime.CompilerServices.CallerFilePathAttribute] string filePath = null, [System.Runtime.CompilerServices.CallerLineNumberAttribute] int lineNumber = 0) { throw null; } } public sealed partial class TestContext { public TestContext(System.Type testClass, object[] constructorArguments, System.Reflection.MethodInfo testMethod, object[] methodArguments, Xunit.Abstractions.ITestOutputHelper output) { } - public object[] ConstructorArguments { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public object[] ConstructorArguments { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public Microsoft.AspNetCore.Testing.TestFileOutputContext FileOutput { get { throw null; } } - public object[] MethodArguments { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Xunit.Abstractions.ITestOutputHelper Output { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Type TestClass { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Reflection.MethodInfo TestMethod { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public object[] MethodArguments { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public Xunit.Abstractions.ITestOutputHelper Output { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.Type TestClass { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public System.Reflection.MethodInfo TestMethod { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } public sealed partial class TestFileOutputContext { public TestFileOutputContext(Microsoft.AspNetCore.Testing.TestContext parent) { } - public string AssemblyOutputDirectory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string TestClassName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string TestClassOutputDirectory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string TestName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string AssemblyOutputDirectory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string TestClassName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string TestClassOutputDirectory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string TestName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public static string GetAssemblyBaseDirectory(System.Reflection.Assembly assembly, string baseDirectory = null) { throw null; } public static string GetOutputDirectory(System.Reflection.Assembly assembly) { throw null; } public static string GetTestClassName(System.Type type) { throw null; } @@ -299,8 +299,8 @@ namespace Microsoft.AspNetCore.Testing public partial class TestOutputDirectoryAttribute : System.Attribute { public TestOutputDirectoryAttribute(string targetFramework, string baseDirectory = null) { } - public string BaseDirectory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string TargetFramework { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string BaseDirectory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public string TargetFramework { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } [System.ObsoleteAttribute("This API is obsolete and the pattern its usage encouraged should not be used anymore. See https://github.com/aspnet/Extensions/issues/1697 for details.")] public partial class TestPathUtilities diff --git a/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.netcoreapp.cs b/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.netcoreapp.cs index 18cdcbdfa3..ad8e11a40e 100644 --- a/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.netcoreapp.cs +++ b/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.netcoreapp.cs @@ -14,7 +14,7 @@ namespace Microsoft.Extensions.WebEncoders public sealed partial class WebEncoderOptions { public WebEncoderOptions() { } - public System.Text.Encodings.Web.TextEncoderSettings TextEncoderSettings { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public System.Text.Encodings.Web.TextEncoderSettings TextEncoderSettings { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } } } namespace Microsoft.Extensions.WebEncoders.Testing diff --git a/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.netstandard2.0.cs b/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.netstandard2.0.cs index 18cdcbdfa3..ad8e11a40e 100644 --- a/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.netstandard2.0.cs +++ b/src/WebEncoders/ref/Microsoft.Extensions.WebEncoders.netstandard2.0.cs @@ -14,7 +14,7 @@ namespace Microsoft.Extensions.WebEncoders public sealed partial class WebEncoderOptions { public WebEncoderOptions() { } - public System.Text.Encodings.Web.TextEncoderSettings TextEncoderSettings { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public System.Text.Encodings.Web.TextEncoderSettings TextEncoderSettings { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } } } namespace Microsoft.Extensions.WebEncoders.Testing From d39613077947d504f27b290e4e0d3091cdc4e27d Mon Sep 17 00:00:00 2001 From: Kahbazi Date: Mon, 11 Nov 2019 21:23:28 +0330 Subject: [PATCH 11/22] Add startvs for each solution (dotnet/extensions#2630) \n\nCommit migrated from https://github.com/dotnet/extensions/commit/e41d90f66109f3387063f412a0ec61c85f8ecbdb --- src/JSInterop/startvs.cmd | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/JSInterop/startvs.cmd diff --git a/src/JSInterop/startvs.cmd b/src/JSInterop/startvs.cmd new file mode 100644 index 0000000000..9812a275be --- /dev/null +++ b/src/JSInterop/startvs.cmd @@ -0,0 +1,3 @@ +@ECHO OFF + +%~dp0..\..\startvs.cmd %~dp0JSInterop.slnf \ No newline at end of file From 3f6d4d569ba32da4f002595d3f48a7bc5a4f29a9 Mon Sep 17 00:00:00 2001 From: Andrew Stanton-Nurse Date: Fri, 22 Nov 2019 10:25:07 -0800 Subject: [PATCH 12/22] update jsinterop NPM package ID for 5.0 (dotnet/extensions#2634) \n\nCommit migrated from https://github.com/dotnet/extensions/commit/41c727faa604f1b418356dceb437e86c22f17bd8 --- .../src/Microsoft.JSInterop.JS.npmproj | 24 +- .../src/package-lock.json | 696 +++++++++--------- .../Microsoft.JSInterop.JS/src/package.json | 4 +- 3 files changed, 362 insertions(+), 362 deletions(-) diff --git a/src/JSInterop/Microsoft.JSInterop.JS/src/Microsoft.JSInterop.JS.npmproj b/src/JSInterop/Microsoft.JSInterop.JS/src/Microsoft.JSInterop.JS.npmproj index e8d0554ff7..589b7e1c5a 100644 --- a/src/JSInterop/Microsoft.JSInterop.JS/src/Microsoft.JSInterop.JS.npmproj +++ b/src/JSInterop/Microsoft.JSInterop.JS/src/Microsoft.JSInterop.JS.npmproj @@ -1,12 +1,12 @@ - - - - - @dotnet/jsinterop - true - false - true - - - - + + + + + @microsoft/dotnet-js-interop + true + false + true + + + + diff --git a/src/JSInterop/Microsoft.JSInterop.JS/src/package-lock.json b/src/JSInterop/Microsoft.JSInterop.JS/src/package-lock.json index 4c82321255..d2d9c46b2a 100644 --- a/src/JSInterop/Microsoft.JSInterop.JS/src/package-lock.json +++ b/src/JSInterop/Microsoft.JSInterop.JS/src/package-lock.json @@ -1,348 +1,348 @@ -{ - "name": "@dotnet/jsinterop", - "version": "3.0.0-dev", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - } - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "js-yaml": { - "version": "3.12.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz", - "integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "resolve": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", - "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "dev": true - }, - "tslint": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.12.1.tgz", - "integrity": "sha512-sfodBHOucFg6egff8d1BvuofoOQ/nOeYNfbp7LDlKBcLNrL3lmS5zoiDGyOMdT7YsEXAwWpTdAHwOGOc8eRZAw==", - "dev": true, - "requires": { - "babel-code-frame": "^6.22.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^3.2.0", - "glob": "^7.1.1", - "js-yaml": "^3.7.0", - "minimatch": "^3.0.4", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.27.2" - } - }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "typescript": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", - "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", - "dev": true - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - } - } -} +{ + "name": "@microsoft/dotnet-js-interop", + "version": "5.0.0-dev", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + } + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz", + "integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "resolve": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, + "tslint": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.12.1.tgz", + "integrity": "sha512-sfodBHOucFg6egff8d1BvuofoOQ/nOeYNfbp7LDlKBcLNrL3lmS5zoiDGyOMdT7YsEXAwWpTdAHwOGOc8eRZAw==", + "dev": true, + "requires": { + "babel-code-frame": "^6.22.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^3.2.0", + "glob": "^7.1.1", + "js-yaml": "^3.7.0", + "minimatch": "^3.0.4", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.27.2" + } + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "typescript": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", + "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + } + } +} diff --git a/src/JSInterop/Microsoft.JSInterop.JS/src/package.json b/src/JSInterop/Microsoft.JSInterop.JS/src/package.json index 803e02a35b..8f04908e78 100644 --- a/src/JSInterop/Microsoft.JSInterop.JS/src/package.json +++ b/src/JSInterop/Microsoft.JSInterop.JS/src/package.json @@ -1,6 +1,6 @@ { - "name": "@dotnet/jsinterop", - "version": "3.0.0-dev", + "name": "@microsoft/dotnet-js-interop", + "version": "5.0.0-dev", "description": "Provides abstractions and features for interop between .NET and JavaScript code.", "main": "dist/Microsoft.JSInterop.js", "types": "dist/Microsoft.JSInterop.d.js", From 6a1b15596723633b77b1bfb156e58880624bf014 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Mon, 25 Nov 2019 21:23:57 -0800 Subject: [PATCH 13/22] Adding MaximumOSVersionAttribute (dotnet/extensions#2715) \n\nCommit migrated from https://github.com/dotnet/extensions/commit/9f29643656b25b53221de8d11c4b98c7b118f3e1 --- .../ref/Microsoft.AspNetCore.Testing.net46.cs | 7 ++ ...osoft.AspNetCore.Testing.netstandard2.0.cs | 7 ++ .../src/xunit/MaximumOSVersionAttribute.cs | 79 +++++++++++++++++++ .../test/MaximumOSVersionAttributeTest.cs | 77 ++++++++++++++++++ src/Testing/test/MaximumOSVersionTest.cs | 75 ++++++++++++++++++ 5 files changed, 245 insertions(+) create mode 100644 src/Testing/src/xunit/MaximumOSVersionAttribute.cs create mode 100644 src/Testing/test/MaximumOSVersionAttributeTest.cs create mode 100644 src/Testing/test/MaximumOSVersionTest.cs diff --git a/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs b/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs index 5fa7e9422e..a7191eb156 100644 --- a/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs +++ b/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs @@ -170,6 +170,13 @@ namespace Microsoft.AspNetCore.Testing System.Threading.Tasks.Task OnTestStartAsync(Microsoft.AspNetCore.Testing.TestContext context, System.Threading.CancellationToken cancellationToken); } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)] + public partial class MaximumOSVersionAttribute : System.Attribute, Microsoft.AspNetCore.Testing.ITestCondition + { + public MaximumOSVersionAttribute(Microsoft.AspNetCore.Testing.OperatingSystems operatingSystem, string maxVersion) { } + public bool IsMet { get { throw null; } } + public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)] public partial class MinimumOSVersionAttribute : System.Attribute, Microsoft.AspNetCore.Testing.ITestCondition { public MinimumOSVersionAttribute(Microsoft.AspNetCore.Testing.OperatingSystems operatingSystem, string minVersion) { } diff --git a/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs b/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs index 5fa7e9422e..a7191eb156 100644 --- a/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs +++ b/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs @@ -170,6 +170,13 @@ namespace Microsoft.AspNetCore.Testing System.Threading.Tasks.Task OnTestStartAsync(Microsoft.AspNetCore.Testing.TestContext context, System.Threading.CancellationToken cancellationToken); } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)] + public partial class MaximumOSVersionAttribute : System.Attribute, Microsoft.AspNetCore.Testing.ITestCondition + { + public MaximumOSVersionAttribute(Microsoft.AspNetCore.Testing.OperatingSystems operatingSystem, string maxVersion) { } + public bool IsMet { get { throw null; } } + public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)] public partial class MinimumOSVersionAttribute : System.Attribute, Microsoft.AspNetCore.Testing.ITestCondition { public MinimumOSVersionAttribute(Microsoft.AspNetCore.Testing.OperatingSystems operatingSystem, string minVersion) { } diff --git a/src/Testing/src/xunit/MaximumOSVersionAttribute.cs b/src/Testing/src/xunit/MaximumOSVersionAttribute.cs new file mode 100644 index 0000000000..82d59910be --- /dev/null +++ b/src/Testing/src/xunit/MaximumOSVersionAttribute.cs @@ -0,0 +1,79 @@ +// 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. + +using System; +using System.Runtime.InteropServices; + +namespace Microsoft.AspNetCore.Testing +{ + /// + /// Skips a test if the OS is the given type (Windows) and the OS version is greater than specified. + /// E.g. Specifying Window 8 skips on Win 10, but not on Linux. Combine with OSSkipConditionAttribute as needed. + /// + [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly, AllowMultiple = true)] + public class MaximumOSVersionAttribute : Attribute, ITestCondition + { + private readonly OperatingSystems _targetOS; + private readonly Version _maxVersion; + private readonly OperatingSystems _currentOS; + private readonly Version _currentVersion; + private readonly bool _skip; + + public MaximumOSVersionAttribute(OperatingSystems operatingSystem, string maxVersion) : + this(operatingSystem, Version.Parse(maxVersion), GetCurrentOS(), GetCurrentOSVersion()) + { + } + + // to enable unit testing + internal MaximumOSVersionAttribute(OperatingSystems targetOS, Version maxVersion, OperatingSystems currentOS, Version currentVersion) + { + if (targetOS != OperatingSystems.Windows) + { + throw new NotImplementedException("Max version support is only implemented for Windows."); + } + _targetOS = targetOS; + _maxVersion = maxVersion; + _currentOS = currentOS; + _currentVersion = currentVersion; + + // Do not skip other OS's, Use OSSkipConditionAttribute or a separate MaximumOsVersionAttribute for that. + _skip = _targetOS == _currentOS && _maxVersion < _currentVersion; + SkipReason = $"This test requires {_targetOS} {_maxVersion} or earlier."; + } + + // Since a test would be executed only if 'IsMet' is true, return false if we want to skip + public bool IsMet => !_skip; + + public string SkipReason { get; set; } + + private static OperatingSystems GetCurrentOS() + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + return OperatingSystems.Windows; + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + return OperatingSystems.Linux; + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + return OperatingSystems.MacOSX; + } + throw new PlatformNotSupportedException(); + } + + static private Version GetCurrentOSVersion() + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + return Environment.OSVersion.Version; + } + else + { + // Not implemented, but this will still be called before the OS check happens so don't throw. + return new Version(0, 0); + } + } + } +} diff --git a/src/Testing/test/MaximumOSVersionAttributeTest.cs b/src/Testing/test/MaximumOSVersionAttributeTest.cs new file mode 100644 index 0000000000..ca2faa76e5 --- /dev/null +++ b/src/Testing/test/MaximumOSVersionAttributeTest.cs @@ -0,0 +1,77 @@ +// 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. + +using System; +using Xunit; + +namespace Microsoft.AspNetCore.Testing +{ + public class MaximumOSVersionAttributeTest + { + [Fact] + public void Linux_ThrowsNotImplemeneted() + { + Assert.Throws(() => new MaximumOSVersionAttribute(OperatingSystems.Linux, "2.5")); + } + + [Fact] + public void Mac_ThrowsNotImplemeneted() + { + Assert.Throws(() => new MaximumOSVersionAttribute(OperatingSystems.MacOSX, "2.5")); + } + + [Fact] + public void WindowsOrLinux_ThrowsNotImplemeneted() + { + Assert.Throws(() => new MaximumOSVersionAttribute(OperatingSystems.Linux | OperatingSystems.Windows, "2.5")); + } + + [Fact] + public void DoesNotSkip_EarlierVersions() + { + var osSkipAttribute = new MaximumOSVersionAttribute( + OperatingSystems.Windows, + new Version("2.5"), + OperatingSystems.Windows, + new Version("2.0")); + + Assert.True(osSkipAttribute.IsMet); + } + + [Fact] + public void DoesNotSkip_SameVersion() + { + var osSkipAttribute = new MaximumOSVersionAttribute( + OperatingSystems.Windows, + new Version("2.5"), + OperatingSystems.Windows, + new Version("2.5")); + + Assert.True(osSkipAttribute.IsMet); + } + + [Fact] + public void Skip_LaterVersion() + { + var osSkipAttribute = new MaximumOSVersionAttribute( + OperatingSystems.Windows, + new Version("2.5"), + OperatingSystems.Windows, + new Version("3.0")); + + Assert.False(osSkipAttribute.IsMet); + } + + [Fact] + public void DoesNotSkip_WhenOnlyVersionsMatch() + { + var osSkipAttribute = new MaximumOSVersionAttribute( + OperatingSystems.Windows, + new Version("2.5"), + OperatingSystems.Linux, + new Version("2.5")); + + Assert.True(osSkipAttribute.IsMet); + } + } +} diff --git a/src/Testing/test/MaximumOSVersionTest.cs b/src/Testing/test/MaximumOSVersionTest.cs new file mode 100644 index 0000000000..e9a0b08d99 --- /dev/null +++ b/src/Testing/test/MaximumOSVersionTest.cs @@ -0,0 +1,75 @@ +// 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. + +using System; +using System.Runtime.InteropServices; +using Microsoft.Win32; +using Xunit; + +namespace Microsoft.AspNetCore.Testing +{ + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + public class MaximumOSVersionTest + { + [ConditionalFact] + [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win7)] + public void RunTest_Win7DoesRunOnWin7() + { + Assert.True( + RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && + Environment.OSVersion.Version.ToString().StartsWith("6.1"), + "Test should only be running on Win7 or Win2008R2."); + } + + [ConditionalTheory] + [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win7)] + [InlineData(1)] + public void RunTheory_Win7DoesRunOnWin7(int arg) + { + Assert.True( + RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && + Environment.OSVersion.Version.ToString().StartsWith("6.1"), + "Test should only be running on Win7 or Win2008R2."); + } + + [ConditionalFact] + [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10_RS4)] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + public void RunTest_Win10_RS4() + { + Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); + var versionKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion"); + Assert.NotNull(versionKey); + var currentVersion = (string)versionKey.GetValue("CurrentBuildNumber"); + Assert.NotNull(currentVersion); + Assert.True(17134 >= int.Parse(currentVersion)); + } + + [ConditionalFact] + [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10_19H2)] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + public void RunTest_Win10_19H2() + { + Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); + var versionKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion"); + Assert.NotNull(versionKey); + var currentVersion = (string)versionKey.GetValue("CurrentBuildNumber"); + Assert.NotNull(currentVersion); + Assert.True(18363 >= int.Parse(currentVersion)); + } + } + + [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win7)] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + public class OSMaxVersionClassTest + { + [ConditionalFact] + public void TestSkipClass_Win7DoesRunOnWin7() + { + Assert.True( + RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && + Environment.OSVersion.Version.ToString().StartsWith("6.1"), + "Test should only be running on Win7 or Win2008R2."); + } + } +} From 4d04c24f5bf33b12d534e0caf5f99b7f52ab9a49 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Wed, 27 Nov 2019 22:10:34 -0800 Subject: [PATCH 14/22] Better MaxOsVersion tests, more WindowsVersions (dotnet/extensions#2728) \n\nCommit migrated from https://github.com/dotnet/extensions/commit/ec155951d69dc8ef620bbf9bae723cda6f98b5fc --- .../ref/Microsoft.AspNetCore.Testing.net46.cs | 4 +++- ...icrosoft.AspNetCore.Testing.netstandard2.0.cs | 4 +++- .../src/xunit/MaximumOSVersionAttribute.cs | 3 ++- src/Testing/src/xunit/WindowsVersions.cs | 14 ++++++++++++-- .../test/MaximumOSVersionAttributeTest.cs | 16 ++++++++-------- 5 files changed, 28 insertions(+), 13 deletions(-) diff --git a/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs b/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs index a7191eb156..eb901008cc 100644 --- a/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs +++ b/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs @@ -326,9 +326,11 @@ namespace Microsoft.AspNetCore.Testing public static partial class WindowsVersions { public const string Win10 = "10.0"; + public const string Win10_19H1 = "10.0.18362"; public const string Win10_19H2 = "10.0.18363"; - public const string Win10_20H1 = "10.0.18990"; + public const string Win10_20H1 = "10.0.19033"; public const string Win10_RS4 = "10.0.17134"; + public const string Win10_RS5 = "10.0.17763"; public const string Win2008R2 = "6.1"; public const string Win7 = "6.1"; public const string Win8 = "6.2"; diff --git a/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs b/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs index a7191eb156..eb901008cc 100644 --- a/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs +++ b/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs @@ -326,9 +326,11 @@ namespace Microsoft.AspNetCore.Testing public static partial class WindowsVersions { public const string Win10 = "10.0"; + public const string Win10_19H1 = "10.0.18362"; public const string Win10_19H2 = "10.0.18363"; - public const string Win10_20H1 = "10.0.18990"; + public const string Win10_20H1 = "10.0.19033"; public const string Win10_RS4 = "10.0.17134"; + public const string Win10_RS5 = "10.0.17763"; public const string Win2008R2 = "6.1"; public const string Win7 = "6.1"; public const string Win8 = "6.2"; diff --git a/src/Testing/src/xunit/MaximumOSVersionAttribute.cs b/src/Testing/src/xunit/MaximumOSVersionAttribute.cs index 82d59910be..439ba4c229 100644 --- a/src/Testing/src/xunit/MaximumOSVersionAttribute.cs +++ b/src/Testing/src/xunit/MaximumOSVersionAttribute.cs @@ -34,7 +34,8 @@ namespace Microsoft.AspNetCore.Testing _targetOS = targetOS; _maxVersion = maxVersion; _currentOS = currentOS; - _currentVersion = currentVersion; + // We drop the 4th field because it is not significant and it messes up the comparisons. + _currentVersion = new Version(currentVersion.Major, currentVersion.Minor, currentVersion.Build); // Do not skip other OS's, Use OSSkipConditionAttribute or a separate MaximumOsVersionAttribute for that. _skip = _targetOS == _currentOS && _maxVersion < _currentVersion; diff --git a/src/Testing/src/xunit/WindowsVersions.cs b/src/Testing/src/xunit/WindowsVersions.cs index d0ef86d1a8..a8c2b43048 100644 --- a/src/Testing/src/xunit/WindowsVersions.cs +++ b/src/Testing/src/xunit/WindowsVersions.cs @@ -23,14 +23,24 @@ namespace Microsoft.AspNetCore.Testing /// public const string Win10_RS4 = "10.0.17134"; + /// + /// 1809, RS5, 17763 + /// + public const string Win10_RS5 = "10.0.17763"; + + /// + /// 1903, 19H1, 18362 + /// + public const string Win10_19H1 = "10.0.18362"; + /// /// 1909, 19H2, 18363 /// public const string Win10_19H2 = "10.0.18363"; /// - /// _, 20H2, 18990 + /// 2004, 20H1, 19033 /// - public const string Win10_20H1 = "10.0.18990"; + public const string Win10_20H1 = "10.0.19033"; } } diff --git a/src/Testing/test/MaximumOSVersionAttributeTest.cs b/src/Testing/test/MaximumOSVersionAttributeTest.cs index ca2faa76e5..a830af19bb 100644 --- a/src/Testing/test/MaximumOSVersionAttributeTest.cs +++ b/src/Testing/test/MaximumOSVersionAttributeTest.cs @@ -31,9 +31,9 @@ namespace Microsoft.AspNetCore.Testing { var osSkipAttribute = new MaximumOSVersionAttribute( OperatingSystems.Windows, - new Version("2.5"), + new Version("2.5.9"), OperatingSystems.Windows, - new Version("2.0")); + new Version("2.0.10.12")); Assert.True(osSkipAttribute.IsMet); } @@ -43,9 +43,9 @@ namespace Microsoft.AspNetCore.Testing { var osSkipAttribute = new MaximumOSVersionAttribute( OperatingSystems.Windows, - new Version("2.5"), + new Version("2.5.10"), OperatingSystems.Windows, - new Version("2.5")); + new Version("2.5.10.12")); Assert.True(osSkipAttribute.IsMet); } @@ -55,9 +55,9 @@ namespace Microsoft.AspNetCore.Testing { var osSkipAttribute = new MaximumOSVersionAttribute( OperatingSystems.Windows, - new Version("2.5"), + new Version("2.5.11"), OperatingSystems.Windows, - new Version("3.0")); + new Version("3.0.10.12")); Assert.False(osSkipAttribute.IsMet); } @@ -67,9 +67,9 @@ namespace Microsoft.AspNetCore.Testing { var osSkipAttribute = new MaximumOSVersionAttribute( OperatingSystems.Windows, - new Version("2.5"), + new Version("2.5.10.12"), OperatingSystems.Linux, - new Version("2.5")); + new Version("2.5.10.12")); Assert.True(osSkipAttribute.IsMet); } From 73da7ca7140bc9be91175645928bf7eb5da78ba8 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Mon, 2 Dec 2019 14:21:43 -0800 Subject: [PATCH 15/22] Fix MaxOsVersion on Ubuntu (dotnet/extensions#2738) \n\nCommit migrated from https://github.com/dotnet/extensions/commit/e8491a2488c4ef514294ca9c8467f9f3e5157f54 --- .../src/xunit/MaximumOSVersionAttribute.cs | 5 ++++- src/Testing/test/MaximumOSVersionAttributeTest.cs | 12 ++++++++++++ src/Testing/test/MaximumOSVersionTest.cs | 15 +++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/Testing/src/xunit/MaximumOSVersionAttribute.cs b/src/Testing/src/xunit/MaximumOSVersionAttribute.cs index 439ba4c229..19ee1098d2 100644 --- a/src/Testing/src/xunit/MaximumOSVersionAttribute.cs +++ b/src/Testing/src/xunit/MaximumOSVersionAttribute.cs @@ -35,7 +35,10 @@ namespace Microsoft.AspNetCore.Testing _maxVersion = maxVersion; _currentOS = currentOS; // We drop the 4th field because it is not significant and it messes up the comparisons. - _currentVersion = new Version(currentVersion.Major, currentVersion.Minor, currentVersion.Build); + _currentVersion = new Version(currentVersion.Major, currentVersion.Minor, + // Major and Minor are required by the parser, but if Build isn't specified then it returns -1 + // which the constructor rejects. + currentVersion.Build == -1 ? 0 : currentVersion.Build); // Do not skip other OS's, Use OSSkipConditionAttribute or a separate MaximumOsVersionAttribute for that. _skip = _targetOS == _currentOS && _maxVersion < _currentVersion; diff --git a/src/Testing/test/MaximumOSVersionAttributeTest.cs b/src/Testing/test/MaximumOSVersionAttributeTest.cs index a830af19bb..ca71d7063b 100644 --- a/src/Testing/test/MaximumOSVersionAttributeTest.cs +++ b/src/Testing/test/MaximumOSVersionAttributeTest.cs @@ -26,6 +26,18 @@ namespace Microsoft.AspNetCore.Testing Assert.Throws(() => new MaximumOSVersionAttribute(OperatingSystems.Linux | OperatingSystems.Windows, "2.5")); } + [Fact] + public void DoesNotSkip_ShortVersions() + { + var osSkipAttribute = new MaximumOSVersionAttribute( + OperatingSystems.Windows, + new Version("2.5"), + OperatingSystems.Windows, + new Version("2.0")); + + Assert.True(osSkipAttribute.IsMet); + } + [Fact] public void DoesNotSkip_EarlierVersions() { diff --git a/src/Testing/test/MaximumOSVersionTest.cs b/src/Testing/test/MaximumOSVersionTest.cs index e9a0b08d99..e18d828fbf 100644 --- a/src/Testing/test/MaximumOSVersionTest.cs +++ b/src/Testing/test/MaximumOSVersionTest.cs @@ -72,4 +72,19 @@ namespace Microsoft.AspNetCore.Testing "Test should only be running on Win7 or Win2008R2."); } } + + // Let this one run cross plat just to check the constructor logic. + [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win7)] + public class OSMaxVersionCrossPlatTest + { + [ConditionalFact] + public void TestSkipClass_Win7DoesRunOnWin7() + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + Assert.True(Environment.OSVersion.Version.ToString().StartsWith("6.1"), + "Test should only be running on Win7 or Win2008R2."); + } + } + } } From ee8715254db898065696de558650d2bfa488a900 Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Thu, 5 Dec 2019 08:07:00 -0300 Subject: [PATCH 16/22] updating inline to \n\nCommit migrated from https://github.com/dotnet/extensions/commit/e9515b009649cad0b76243b031137b3aa010a3ef --- .../Microsoft.JSInterop/src/IJSInProcessRuntime.cs | 2 +- src/JSInterop/Microsoft.JSInterop/src/IJSRuntime.cs | 4 ++-- .../Microsoft.JSInterop/src/JSInProcessRuntime.cs | 2 +- .../src/JSInProcessRuntimeExtensions.cs | 2 +- src/JSInterop/Microsoft.JSInterop/src/JSRuntime.cs | 4 ++-- .../Microsoft.JSInterop/src/JSRuntimeExtensions.cs | 12 ++++++------ src/ObjectPool/src/IPooledObjectPolicy.cs | 4 ++-- src/Testing/src/xunit/FlakyAttribute.cs | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/JSInterop/Microsoft.JSInterop/src/IJSInProcessRuntime.cs b/src/JSInterop/Microsoft.JSInterop/src/IJSInProcessRuntime.cs index cae5126db2..6da8d7f3a7 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/IJSInProcessRuntime.cs +++ b/src/JSInterop/Microsoft.JSInterop/src/IJSInProcessRuntime.cs @@ -12,7 +12,7 @@ namespace Microsoft.JSInterop /// Invokes the specified JavaScript function synchronously. /// /// The JSON-serializable return type. - /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. + /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. /// JSON-serializable arguments. /// An instance of obtained by JSON-deserializing the return value. T Invoke(string identifier, params object[] args); diff --git a/src/JSInterop/Microsoft.JSInterop/src/IJSRuntime.cs b/src/JSInterop/Microsoft.JSInterop/src/IJSRuntime.cs index 6edc725177..26a7be400f 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/IJSRuntime.cs +++ b/src/JSInterop/Microsoft.JSInterop/src/IJSRuntime.cs @@ -19,7 +19,7 @@ namespace Microsoft.JSInterop /// /// /// The JSON-serializable return type. - /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. + /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. /// JSON-serializable arguments. /// An instance of obtained by JSON-deserializing the return value. ValueTask InvokeAsync(string identifier, object[] args); @@ -28,7 +28,7 @@ namespace Microsoft.JSInterop /// Invokes the specified JavaScript function asynchronously. /// /// The JSON-serializable return type. - /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. + /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. /// /// A cancellation token to signal the cancellation of the operation. Specifying this parameter will override any default cancellations such as due to timeouts /// () from being applied. diff --git a/src/JSInterop/Microsoft.JSInterop/src/JSInProcessRuntime.cs b/src/JSInterop/Microsoft.JSInterop/src/JSInProcessRuntime.cs index 2b96bbbbb5..e84ab1b631 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/JSInProcessRuntime.cs +++ b/src/JSInterop/Microsoft.JSInterop/src/JSInProcessRuntime.cs @@ -14,7 +14,7 @@ namespace Microsoft.JSInterop /// Invokes the specified JavaScript function synchronously. /// /// The JSON-serializable return type. - /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. + /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. /// JSON-serializable arguments. /// An instance of obtained by JSON-deserializing the return value. public TValue Invoke(string identifier, params object[] args) diff --git a/src/JSInterop/Microsoft.JSInterop/src/JSInProcessRuntimeExtensions.cs b/src/JSInterop/Microsoft.JSInterop/src/JSInProcessRuntimeExtensions.cs index 73bc247848..5a040d9b78 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/JSInProcessRuntimeExtensions.cs +++ b/src/JSInterop/Microsoft.JSInterop/src/JSInProcessRuntimeExtensions.cs @@ -14,7 +14,7 @@ namespace Microsoft.JSInterop /// Invokes the specified JavaScript function synchronously. /// /// The . - /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. + /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. /// JSON-serializable arguments. public static void InvokeVoid(this IJSInProcessRuntime jsRuntime, string identifier, params object[] args) { diff --git a/src/JSInterop/Microsoft.JSInterop/src/JSRuntime.cs b/src/JSInterop/Microsoft.JSInterop/src/JSRuntime.cs index 4dca7a5db3..8a97ada859 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/JSRuntime.cs +++ b/src/JSInterop/Microsoft.JSInterop/src/JSRuntime.cs @@ -59,7 +59,7 @@ namespace Microsoft.JSInterop /// /// /// The JSON-serializable return type. - /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. + /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. /// JSON-serializable arguments. /// An instance of obtained by JSON-deserializing the return value. public ValueTask InvokeAsync(string identifier, object[] args) @@ -76,7 +76,7 @@ namespace Microsoft.JSInterop /// Invokes the specified JavaScript function asynchronously. /// /// The JSON-serializable return type. - /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. + /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. /// /// A cancellation token to signal the cancellation of the operation. Specifying this parameter will override any default cancellations such as due to timeouts /// () from being applied. diff --git a/src/JSInterop/Microsoft.JSInterop/src/JSRuntimeExtensions.cs b/src/JSInterop/Microsoft.JSInterop/src/JSRuntimeExtensions.cs index ff4d3fd152..354eddbbf6 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/JSRuntimeExtensions.cs +++ b/src/JSInterop/Microsoft.JSInterop/src/JSRuntimeExtensions.cs @@ -16,7 +16,7 @@ namespace Microsoft.JSInterop /// Invokes the specified JavaScript function asynchronously. /// /// The . - /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. + /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. /// JSON-serializable arguments. /// A that represents the asynchronous invocation operation. public static async ValueTask InvokeVoidAsync(this IJSRuntime jsRuntime, string identifier, params object[] args) @@ -38,7 +38,7 @@ namespace Microsoft.JSInterop /// /// The . /// The JSON-serializable return type. - /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. + /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. /// JSON-serializable arguments. /// An instance of obtained by JSON-deserializing the return value. public static ValueTask InvokeAsync(this IJSRuntime jsRuntime, string identifier, params object[] args) @@ -56,7 +56,7 @@ namespace Microsoft.JSInterop /// /// The JSON-serializable return type. /// The . - /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. + /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. /// /// A cancellation token to signal the cancellation of the operation. Specifying this parameter will override any default cancellations such as due to timeouts /// () from being applied. @@ -77,7 +77,7 @@ namespace Microsoft.JSInterop /// Invokes the specified JavaScript function asynchronously. /// /// The . - /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. + /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. /// /// A cancellation token to signal the cancellation of the operation. Specifying this parameter will override any default cancellations such as due to timeouts /// () from being applied. @@ -98,7 +98,7 @@ namespace Microsoft.JSInterop /// Invokes the specified JavaScript function asynchronously. /// /// The . - /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. + /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. /// The duration after which to cancel the async operation. Overrides default timeouts (). /// JSON-serializable arguments. /// A that represents the asynchronous invocation operation. @@ -120,7 +120,7 @@ namespace Microsoft.JSInterop /// Invokes the specified JavaScript function asynchronously. /// /// The . - /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. + /// An identifier for the function to invoke. For example, the value "someScope.someFunction" will invoke the function window.someScope.someFunction. /// The duration after which to cancel the async operation. Overrides default timeouts (). /// JSON-serializable arguments. /// A that represents the asynchronous invocation operation. diff --git a/src/ObjectPool/src/IPooledObjectPolicy.cs b/src/ObjectPool/src/IPooledObjectPolicy.cs index 7519398030..638fec2c81 100644 --- a/src/ObjectPool/src/IPooledObjectPolicy.cs +++ b/src/ObjectPool/src/IPooledObjectPolicy.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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.Extensions.ObjectPool @@ -19,7 +19,7 @@ namespace Microsoft.Extensions.ObjectPool /// Runs some processing when an object was returned to the pool. Can be used to reset the state of an object and indicate if the object should be returned to the pool. /// /// The object to return to the pool. - /// true if the object should be returned to the pool. false if it's not possible/desirable for the pool to keep the object. + /// true if the object should be returned to the pool. false if it's not possible/desirable for the pool to keep the object. bool Return(T obj); } } diff --git a/src/Testing/src/xunit/FlakyAttribute.cs b/src/Testing/src/xunit/FlakyAttribute.cs index daceb964fd..f77c56dfc0 100644 --- a/src/Testing/src/xunit/FlakyAttribute.cs +++ b/src/Testing/src/xunit/FlakyAttribute.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Testing /// properties. Once these traits are applied, build scripts can include/exclude tests based on them. /// /// - /// All flakiness-related traits start with Flaky: and are grouped first by the process running the tests: Azure Pipelines (AzP) or Helix. + /// All flakiness-related traits start with Flaky: and are grouped first by the process running the tests: Azure Pipelines (AzP) or Helix. /// Then there is a segment specifying the "selector" which indicates where the test is flaky. Finally a segment specifying the value of that selector. /// The value of these traits is always either "true" or the trait is not present. We encode the entire selector in the name of the trait because xUnit.net only /// provides "==" and "!=" operators for traits, there is no way to check if a trait "contains" or "does not contain" a value. VSTest does support "contains" checks From e8c39310746887942cea0aae6d9f71648faaf515 Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Thu, 5 Dec 2019 13:55:58 -0300 Subject: [PATCH 17/22] Apply suggestions from code review Co-Authored-By: Andrew Stanton-Nurse \n\nCommit migrated from https://github.com/dotnet/extensions/commit/c79268ee19fd3d81d312822d4abc8574a1629f9b --- src/ObjectPool/src/IPooledObjectPolicy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ObjectPool/src/IPooledObjectPolicy.cs b/src/ObjectPool/src/IPooledObjectPolicy.cs index 638fec2c81..458131e824 100644 --- a/src/ObjectPool/src/IPooledObjectPolicy.cs +++ b/src/ObjectPool/src/IPooledObjectPolicy.cs @@ -19,7 +19,7 @@ namespace Microsoft.Extensions.ObjectPool /// Runs some processing when an object was returned to the pool. Can be used to reset the state of an object and indicate if the object should be returned to the pool. /// /// The object to return to the pool. - /// true if the object should be returned to the pool. false if it's not possible/desirable for the pool to keep the object. + /// if the object should be returned to the pool. if it's not possible/desirable for the pool to keep the object. bool Return(T obj); } } From e467364175acbdda3e5affa81d802d71b37589c8 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Thu, 5 Dec 2019 10:58:15 -0800 Subject: [PATCH 18/22] Remove version checks from OSSkipCondition (dotnet/extensions#2755) \n\nCommit migrated from https://github.com/dotnet/extensions/commit/0aa6213e1c4abd0cf45189e93751bf38b9f8c07c --- .../ref/Microsoft.AspNetCore.Testing.net46.cs | 3 + ...osoft.AspNetCore.Testing.netstandard2.0.cs | 3 + .../src/xunit/OSSkipConditionAttribute.cs | 57 +++----------- src/Testing/src/xunit/WindowsVersions.cs | 3 + .../test/OSSkipConditionAttributeTest.cs | 78 +++---------------- src/Testing/test/OSSkipConditionTest.cs | 11 --- 6 files changed, 28 insertions(+), 127 deletions(-) diff --git a/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs b/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs index eb901008cc..af28ec60e0 100644 --- a/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs +++ b/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs @@ -193,6 +193,8 @@ namespace Microsoft.AspNetCore.Testing [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)] public partial class OSSkipConditionAttribute : System.Attribute, Microsoft.AspNetCore.Testing.ITestCondition { + public OSSkipConditionAttribute(Microsoft.AspNetCore.Testing.OperatingSystems operatingSystem) { } + [System.ObsoleteAttribute("Use the Minimum/MaximumOSVersionAttribute for version checks.", true)] public OSSkipConditionAttribute(Microsoft.AspNetCore.Testing.OperatingSystems operatingSystem, params string[] versions) { } public bool IsMet { get { throw null; } } public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } @@ -331,6 +333,7 @@ namespace Microsoft.AspNetCore.Testing public const string Win10_20H1 = "10.0.19033"; public const string Win10_RS4 = "10.0.17134"; public const string Win10_RS5 = "10.0.17763"; + [System.ObsoleteAttribute("Use Win7 instead.", true)] public const string Win2008R2 = "6.1"; public const string Win7 = "6.1"; public const string Win8 = "6.2"; diff --git a/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs b/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs index eb901008cc..af28ec60e0 100644 --- a/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs +++ b/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs @@ -193,6 +193,8 @@ namespace Microsoft.AspNetCore.Testing [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)] public partial class OSSkipConditionAttribute : System.Attribute, Microsoft.AspNetCore.Testing.ITestCondition { + public OSSkipConditionAttribute(Microsoft.AspNetCore.Testing.OperatingSystems operatingSystem) { } + [System.ObsoleteAttribute("Use the Minimum/MaximumOSVersionAttribute for version checks.", true)] public OSSkipConditionAttribute(Microsoft.AspNetCore.Testing.OperatingSystems operatingSystem, params string[] versions) { } public bool IsMet { get { throw null; } } public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } @@ -331,6 +333,7 @@ namespace Microsoft.AspNetCore.Testing public const string Win10_20H1 = "10.0.19033"; public const string Win10_RS4 = "10.0.17134"; public const string Win10_RS5 = "10.0.17763"; + [System.ObsoleteAttribute("Use Win7 instead.", true)] public const string Win2008R2 = "6.1"; public const string Win7 = "6.1"; public const string Win8 = "6.2"; diff --git a/src/Testing/src/xunit/OSSkipConditionAttribute.cs b/src/Testing/src/xunit/OSSkipConditionAttribute.cs index 7655a3b45a..50e3cae192 100644 --- a/src/Testing/src/xunit/OSSkipConditionAttribute.cs +++ b/src/Testing/src/xunit/OSSkipConditionAttribute.cs @@ -2,8 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using System.Collections.Generic; -using System.Linq; using System.Runtime.InteropServices; namespace Microsoft.AspNetCore.Testing @@ -12,46 +10,31 @@ namespace Microsoft.AspNetCore.Testing public class OSSkipConditionAttribute : Attribute, ITestCondition { private readonly OperatingSystems _excludedOperatingSystem; - private readonly IEnumerable _excludedVersions; private readonly OperatingSystems _osPlatform; - private readonly string _osVersion; - public OSSkipConditionAttribute(OperatingSystems operatingSystem, params string[] versions) : - this( - operatingSystem, - GetCurrentOS(), - GetCurrentOSVersion(), - versions) + public OSSkipConditionAttribute(OperatingSystems operatingSystem) : + this(operatingSystem, GetCurrentOS()) + { + } + + [Obsolete("Use the Minimum/MaximumOSVersionAttribute for version checks.", error: true)] + public OSSkipConditionAttribute(OperatingSystems operatingSystem, params string[] versions) : + this(operatingSystem, GetCurrentOS()) { } // to enable unit testing - internal OSSkipConditionAttribute( - OperatingSystems operatingSystem, OperatingSystems osPlatform, string osVersion, params string[] versions) + internal OSSkipConditionAttribute(OperatingSystems operatingSystem, OperatingSystems osPlatform) { _excludedOperatingSystem = operatingSystem; - _excludedVersions = versions ?? Enumerable.Empty(); _osPlatform = osPlatform; - _osVersion = osVersion; } public bool IsMet { get { - var currentOSInfo = new OSInfo() - { - OperatingSystem = _osPlatform, - Version = _osVersion, - }; - - var skip = (_excludedOperatingSystem & currentOSInfo.OperatingSystem) == currentOSInfo.OperatingSystem; - if (_excludedVersions.Any()) - { - skip = skip - && _excludedVersions.Any(ex => _osVersion.StartsWith(ex, StringComparison.OrdinalIgnoreCase)); - } - + var skip = (_excludedOperatingSystem & _osPlatform) == _osPlatform; // Since a test would be excuted only if 'IsMet' is true, return false if we want to skip return !skip; } @@ -75,25 +58,5 @@ namespace Microsoft.AspNetCore.Testing } throw new PlatformNotSupportedException(); } - - static private string GetCurrentOSVersion() - { - // currently not used on other OS's - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - return Environment.OSVersion.Version.ToString(); - } - else - { - return string.Empty; - } - } - - private class OSInfo - { - public OperatingSystems OperatingSystem { get; set; } - - public string Version { get; set; } - } } } diff --git a/src/Testing/src/xunit/WindowsVersions.cs b/src/Testing/src/xunit/WindowsVersions.cs index a8c2b43048..44448c74d1 100644 --- a/src/Testing/src/xunit/WindowsVersions.cs +++ b/src/Testing/src/xunit/WindowsVersions.cs @@ -1,6 +1,8 @@ // 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. +using System; + namespace Microsoft.AspNetCore.Testing { /// @@ -10,6 +12,7 @@ namespace Microsoft.AspNetCore.Testing { public const string Win7 = "6.1"; + [Obsolete("Use Win7 instead.", error: true)] public const string Win2008R2 = Win7; public const string Win8 = "6.2"; diff --git a/src/Testing/test/OSSkipConditionAttributeTest.cs b/src/Testing/test/OSSkipConditionAttributeTest.cs index 199af3ab6e..d4bc4f2b74 100644 --- a/src/Testing/test/OSSkipConditionAttributeTest.cs +++ b/src/Testing/test/OSSkipConditionAttributeTest.cs @@ -10,13 +10,12 @@ namespace Microsoft.AspNetCore.Testing public class OSSkipConditionAttributeTest { [Fact] - public void Skips_WhenOnlyOperatingSystemIsSupplied() + public void Skips_WhenOperatingSystemMatches() { // Act var osSkipAttribute = new OSSkipConditionAttribute( OperatingSystems.Windows, - OperatingSystems.Windows, - "2.5"); + OperatingSystems.Windows); // Assert Assert.False(osSkipAttribute.IsMet); @@ -28,77 +27,18 @@ namespace Microsoft.AspNetCore.Testing // Act var osSkipAttribute = new OSSkipConditionAttribute( OperatingSystems.Linux, - OperatingSystems.Windows, - "2.5"); + OperatingSystems.Windows); // Assert Assert.True(osSkipAttribute.IsMet); } - [Fact] - public void DoesNotSkip_WhenVersionsDoNotMatch() - { - // Act - var osSkipAttribute = new OSSkipConditionAttribute( - OperatingSystems.Windows, - OperatingSystems.Windows, - "2.5", - "10.0"); - - // Assert - Assert.True(osSkipAttribute.IsMet); - } - - [Fact] - public void DoesNotSkip_WhenOnlyVersionsMatch() - { - // Act - var osSkipAttribute = new OSSkipConditionAttribute( - OperatingSystems.Linux, - OperatingSystems.Windows, - "2.5", - "2.5"); - - // Assert - Assert.True(osSkipAttribute.IsMet); - } - - [Theory] - [InlineData("2.5", "2.5")] - [InlineData("blue", "Blue")] - public void Skips_WhenVersionsMatches(string currentOSVersion, string skipVersion) - { - // Act - var osSkipAttribute = new OSSkipConditionAttribute( - OperatingSystems.Windows, - OperatingSystems.Windows, - currentOSVersion, - skipVersion); - - // Assert - Assert.False(osSkipAttribute.IsMet); - } - - [Fact] - public void Skips_WhenVersionsMatchesOutOfMultiple() - { - // Act - var osSkipAttribute = new OSSkipConditionAttribute( - OperatingSystems.Windows, - OperatingSystems.Windows, - "2.5", - "10.0", "3.4", "2.5"); - - // Assert - Assert.False(osSkipAttribute.IsMet); - } - [Fact] public void Skips_BothMacOSXAndLinux() { // Act - var osSkipAttributeLinux = new OSSkipConditionAttribute(OperatingSystems.Linux | OperatingSystems.MacOSX, OperatingSystems.Linux, string.Empty); - var osSkipAttributeMacOSX = new OSSkipConditionAttribute(OperatingSystems.Linux | OperatingSystems.MacOSX, OperatingSystems.MacOSX, string.Empty); + var osSkipAttributeLinux = new OSSkipConditionAttribute(OperatingSystems.Linux | OperatingSystems.MacOSX, OperatingSystems.Linux); + var osSkipAttributeMacOSX = new OSSkipConditionAttribute(OperatingSystems.Linux | OperatingSystems.MacOSX, OperatingSystems.MacOSX); // Assert Assert.False(osSkipAttributeLinux.IsMet); @@ -109,8 +49,8 @@ namespace Microsoft.AspNetCore.Testing public void Skips_BothMacOSXAndWindows() { // Act - var osSkipAttribute = new OSSkipConditionAttribute(OperatingSystems.Windows | OperatingSystems.MacOSX, OperatingSystems.Windows, string.Empty); - var osSkipAttributeMacOSX = new OSSkipConditionAttribute(OperatingSystems.Windows | OperatingSystems.MacOSX, OperatingSystems.MacOSX, string.Empty); + var osSkipAttribute = new OSSkipConditionAttribute(OperatingSystems.Windows | OperatingSystems.MacOSX, OperatingSystems.Windows); + var osSkipAttributeMacOSX = new OSSkipConditionAttribute(OperatingSystems.Windows | OperatingSystems.MacOSX, OperatingSystems.MacOSX); // Assert Assert.False(osSkipAttribute.IsMet); @@ -121,8 +61,8 @@ namespace Microsoft.AspNetCore.Testing public void Skips_BothWindowsAndLinux() { // Act - var osSkipAttribute = new OSSkipConditionAttribute(OperatingSystems.Linux | OperatingSystems.Windows, OperatingSystems.Windows, string.Empty); - var osSkipAttributeLinux = new OSSkipConditionAttribute(OperatingSystems.Linux | OperatingSystems.Windows, OperatingSystems.Linux, string.Empty); + var osSkipAttribute = new OSSkipConditionAttribute(OperatingSystems.Linux | OperatingSystems.Windows, OperatingSystems.Windows); + var osSkipAttributeLinux = new OSSkipConditionAttribute(OperatingSystems.Linux | OperatingSystems.Windows, OperatingSystems.Linux); // Assert Assert.False(osSkipAttribute.IsMet); diff --git a/src/Testing/test/OSSkipConditionTest.cs b/src/Testing/test/OSSkipConditionTest.cs index a7904b1730..6aeecaddcc 100644 --- a/src/Testing/test/OSSkipConditionTest.cs +++ b/src/Testing/test/OSSkipConditionTest.cs @@ -1,7 +1,6 @@ // 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. -using System; using System.Runtime.InteropServices; using Xunit; @@ -27,16 +26,6 @@ namespace Microsoft.AspNetCore.Testing "Test should not be running on MacOSX."); } - [ConditionalFact] - [OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, WindowsVersions.Win2008R2)] - public void RunTest_DoesNotRunOnWin7OrWin2008R2() - { - Assert.False( - RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && - Environment.OSVersion.Version.ToString().StartsWith("6.1"), - "Test should not be running on Win7 or Win2008R2."); - } - [ConditionalFact] [OSSkipCondition(OperatingSystems.Windows)] public void TestSkipWindows() From 3ab9051a117c0728412c8d63138c4699cc7df476 Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Fri, 3 Jan 2020 09:34:44 -0800 Subject: [PATCH 19/22] Remove Obsoleted methods for 5.0 (dotnet/extensions#2562) Remove Obsoleted methods for 5.0 \n\nCommit migrated from https://github.com/dotnet/extensions/commit/582427c350fe8842553a8c33b4015662f95c1c78 --- ...ns.Localization.Abstractions.netcoreapp.cs | 4 - ...ocalization.Abstractions.netstandard2.0.cs | 4 - .../Abstractions/src/IStringLocalizer.cs | 8 - .../Abstractions/src/StringLocalizerOfT.cs | 4 - ...soft.Extensions.Localization.netcoreapp.cs | 10 -- ....Extensions.Localization.netstandard2.0.cs | 10 -- .../src/ResourceManagerStringLocalizer.cs | 24 --- ...sourceManagerWithCultureStringLocalizer.cs | 165 ------------------ .../StringLocalizerOfTTest.cs | 22 --- 9 files changed, 251 deletions(-) delete mode 100644 src/Localization/Localization/src/ResourceManagerWithCultureStringLocalizer.cs diff --git a/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netcoreapp.cs b/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netcoreapp.cs index 8a5f5baa08..3b6186e98f 100644 --- a/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netcoreapp.cs +++ b/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netcoreapp.cs @@ -8,8 +8,6 @@ namespace Microsoft.Extensions.Localization Microsoft.Extensions.Localization.LocalizedString this[string name] { get; } Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get; } System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures); - [System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] - Microsoft.Extensions.Localization.IStringLocalizer WithCulture(System.Globalization.CultureInfo culture); } public partial interface IStringLocalizerFactory { @@ -43,7 +41,5 @@ namespace Microsoft.Extensions.Localization public virtual Microsoft.Extensions.Localization.LocalizedString this[string name] { get { throw null; } } public virtual Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get { throw null; } } public System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures) { throw null; } - [System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] - public virtual Microsoft.Extensions.Localization.IStringLocalizer WithCulture(System.Globalization.CultureInfo culture) { throw null; } } } diff --git a/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netstandard2.0.cs b/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netstandard2.0.cs index 8a5f5baa08..3b6186e98f 100644 --- a/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netstandard2.0.cs +++ b/src/Localization/Abstractions/ref/Microsoft.Extensions.Localization.Abstractions.netstandard2.0.cs @@ -8,8 +8,6 @@ namespace Microsoft.Extensions.Localization Microsoft.Extensions.Localization.LocalizedString this[string name] { get; } Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get; } System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures); - [System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] - Microsoft.Extensions.Localization.IStringLocalizer WithCulture(System.Globalization.CultureInfo culture); } public partial interface IStringLocalizerFactory { @@ -43,7 +41,5 @@ namespace Microsoft.Extensions.Localization public virtual Microsoft.Extensions.Localization.LocalizedString this[string name] { get { throw null; } } public virtual Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get { throw null; } } public System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures) { throw null; } - [System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] - public virtual Microsoft.Extensions.Localization.IStringLocalizer WithCulture(System.Globalization.CultureInfo culture) { throw null; } } } diff --git a/src/Localization/Abstractions/src/IStringLocalizer.cs b/src/Localization/Abstractions/src/IStringLocalizer.cs index cabdf434ac..206092cd2d 100644 --- a/src/Localization/Abstractions/src/IStringLocalizer.cs +++ b/src/Localization/Abstractions/src/IStringLocalizer.cs @@ -35,13 +35,5 @@ namespace Microsoft.Extensions.Localization /// /// The strings. IEnumerable GetAllStrings(bool includeParentCultures); - - /// - /// Creates a new for a specific . - /// - /// The to use. - /// A culture-specific . - [Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] - IStringLocalizer WithCulture(CultureInfo culture); } } diff --git a/src/Localization/Abstractions/src/StringLocalizerOfT.cs b/src/Localization/Abstractions/src/StringLocalizerOfT.cs index 4190ca14ff..0f30ca6c87 100644 --- a/src/Localization/Abstractions/src/StringLocalizerOfT.cs +++ b/src/Localization/Abstractions/src/StringLocalizerOfT.cs @@ -29,10 +29,6 @@ namespace Microsoft.Extensions.Localization _localizer = factory.Create(typeof(TResourceSource)); } - /// - [Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] - public virtual IStringLocalizer WithCulture(CultureInfo culture) => _localizer.WithCulture(culture); - /// public virtual LocalizedString this[string name] { diff --git a/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netcoreapp.cs b/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netcoreapp.cs index 741e1ce106..dea13ee364 100644 --- a/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netcoreapp.cs +++ b/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netcoreapp.cs @@ -36,8 +36,6 @@ namespace Microsoft.Extensions.Localization public virtual System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures) { throw null; } protected System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures, System.Globalization.CultureInfo culture) { throw null; } protected string GetStringSafely(string name, System.Globalization.CultureInfo culture) { throw null; } - [System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] - public Microsoft.Extensions.Localization.IStringLocalizer WithCulture(System.Globalization.CultureInfo culture) { throw null; } } public partial class ResourceManagerStringLocalizerFactory : Microsoft.Extensions.Localization.IStringLocalizerFactory { @@ -52,14 +50,6 @@ namespace Microsoft.Extensions.Localization protected virtual string GetResourcePrefix(string location, string baseName, string resourceLocation) { throw null; } protected virtual Microsoft.Extensions.Localization.RootNamespaceAttribute GetRootNamespaceAttribute(System.Reflection.Assembly assembly) { throw null; } } - [System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] - public partial class ResourceManagerWithCultureStringLocalizer : Microsoft.Extensions.Localization.ResourceManagerStringLocalizer - { - public ResourceManagerWithCultureStringLocalizer(System.Resources.ResourceManager resourceManager, System.Reflection.Assembly resourceAssembly, string baseName, Microsoft.Extensions.Localization.IResourceNamesCache resourceNamesCache, System.Globalization.CultureInfo culture, Microsoft.Extensions.Logging.ILogger logger) : base (default(System.Resources.ResourceManager), default(System.Reflection.Assembly), default(string), default(Microsoft.Extensions.Localization.IResourceNamesCache), default(Microsoft.Extensions.Logging.ILogger)) { } - public override Microsoft.Extensions.Localization.LocalizedString this[string name] { get { throw null; } } - public override Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get { throw null; } } - public override System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures) { throw null; } - } public partial class ResourceNamesCache : Microsoft.Extensions.Localization.IResourceNamesCache { public ResourceNamesCache() { } diff --git a/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netstandard2.0.cs b/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netstandard2.0.cs index 741e1ce106..dea13ee364 100644 --- a/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netstandard2.0.cs +++ b/src/Localization/Localization/ref/Microsoft.Extensions.Localization.netstandard2.0.cs @@ -36,8 +36,6 @@ namespace Microsoft.Extensions.Localization public virtual System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures) { throw null; } protected System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures, System.Globalization.CultureInfo culture) { throw null; } protected string GetStringSafely(string name, System.Globalization.CultureInfo culture) { throw null; } - [System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] - public Microsoft.Extensions.Localization.IStringLocalizer WithCulture(System.Globalization.CultureInfo culture) { throw null; } } public partial class ResourceManagerStringLocalizerFactory : Microsoft.Extensions.Localization.IStringLocalizerFactory { @@ -52,14 +50,6 @@ namespace Microsoft.Extensions.Localization protected virtual string GetResourcePrefix(string location, string baseName, string resourceLocation) { throw null; } protected virtual Microsoft.Extensions.Localization.RootNamespaceAttribute GetRootNamespaceAttribute(System.Reflection.Assembly assembly) { throw null; } } - [System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] - public partial class ResourceManagerWithCultureStringLocalizer : Microsoft.Extensions.Localization.ResourceManagerStringLocalizer - { - public ResourceManagerWithCultureStringLocalizer(System.Resources.ResourceManager resourceManager, System.Reflection.Assembly resourceAssembly, string baseName, Microsoft.Extensions.Localization.IResourceNamesCache resourceNamesCache, System.Globalization.CultureInfo culture, Microsoft.Extensions.Logging.ILogger logger) : base (default(System.Resources.ResourceManager), default(System.Reflection.Assembly), default(string), default(Microsoft.Extensions.Localization.IResourceNamesCache), default(Microsoft.Extensions.Logging.ILogger)) { } - public override Microsoft.Extensions.Localization.LocalizedString this[string name] { get { throw null; } } - public override Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get { throw null; } } - public override System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures) { throw null; } - } public partial class ResourceNamesCache : Microsoft.Extensions.Localization.IResourceNamesCache { public ResourceNamesCache() { } diff --git a/src/Localization/Localization/src/ResourceManagerStringLocalizer.cs b/src/Localization/Localization/src/ResourceManagerStringLocalizer.cs index a8321fca0a..4f13611a47 100644 --- a/src/Localization/Localization/src/ResourceManagerStringLocalizer.cs +++ b/src/Localization/Localization/src/ResourceManagerStringLocalizer.cs @@ -146,30 +146,6 @@ namespace Microsoft.Extensions.Localization } } - /// - /// Creates a new for a specific . - /// - /// The to use. - /// A culture-specific . - [Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] - public IStringLocalizer WithCulture(CultureInfo culture) - { - return culture == null - ? new ResourceManagerStringLocalizer( - _resourceManager, - _resourceStringProvider, - _resourceBaseName, - _resourceNamesCache, - _logger) - : new ResourceManagerWithCultureStringLocalizer( - _resourceManager, - _resourceStringProvider, - _resourceBaseName, - _resourceNamesCache, - culture, - _logger); - } - /// public virtual IEnumerable GetAllStrings(bool includeParentCultures) => GetAllStrings(includeParentCultures, CultureInfo.CurrentUICulture); diff --git a/src/Localization/Localization/src/ResourceManagerWithCultureStringLocalizer.cs b/src/Localization/Localization/src/ResourceManagerWithCultureStringLocalizer.cs deleted file mode 100644 index 2bc51289da..0000000000 --- a/src/Localization/Localization/src/ResourceManagerWithCultureStringLocalizer.cs +++ /dev/null @@ -1,165 +0,0 @@ -// 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. - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Reflection; -using System.Resources; -using Microsoft.Extensions.Localization.Internal; -using Microsoft.Extensions.Logging; - -namespace Microsoft.Extensions.Localization -{ - /// - /// An that uses the and - /// to provide localized strings for a specific . - /// - [Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] - public class ResourceManagerWithCultureStringLocalizer : ResourceManagerStringLocalizer - { - private readonly string _resourceBaseName; - private readonly CultureInfo _culture; - - /// - /// Creates a new . - /// - /// The to read strings from. - /// The that can find the resources. - /// The base name of the embedded resource that contains the strings. - /// Cache of the list of strings for a given resource assembly name. - /// The specific to use. - /// The . - internal ResourceManagerWithCultureStringLocalizer( - ResourceManager resourceManager, - IResourceStringProvider resourceStringProvider, - string baseName, - IResourceNamesCache resourceNamesCache, - CultureInfo culture, - ILogger logger) - : base(resourceManager, resourceStringProvider, baseName, resourceNamesCache, logger) - { - if (resourceManager == null) - { - throw new ArgumentNullException(nameof(resourceManager)); - } - - if (resourceStringProvider == null) - { - throw new ArgumentNullException(nameof(resourceStringProvider)); - } - - if (baseName == null) - { - throw new ArgumentNullException(nameof(baseName)); - } - - if (resourceNamesCache == null) - { - throw new ArgumentNullException(nameof(resourceNamesCache)); - } - - if (culture == null) - { - throw new ArgumentNullException(nameof(culture)); - } - - if (logger == null) - { - throw new ArgumentNullException(nameof(logger)); - } - - _resourceBaseName = baseName; - _culture = culture; - } - - /// - /// Creates a new . - /// - /// The to read strings from. - /// The that contains the strings as embedded resources. - /// The base name of the embedded resource that contains the strings. - /// Cache of the list of strings for a given resource assembly name. - /// The specific to use. - /// The . - public ResourceManagerWithCultureStringLocalizer( - ResourceManager resourceManager, - Assembly resourceAssembly, - string baseName, - IResourceNamesCache resourceNamesCache, - CultureInfo culture, - ILogger logger) - : base(resourceManager, resourceAssembly, baseName, resourceNamesCache, logger) - { - if (resourceManager == null) - { - throw new ArgumentNullException(nameof(resourceManager)); - } - - if (resourceAssembly == null) - { - throw new ArgumentNullException(nameof(resourceAssembly)); - } - - if (baseName == null) - { - throw new ArgumentNullException(nameof(baseName)); - } - - if (resourceNamesCache == null) - { - throw new ArgumentNullException(nameof(resourceNamesCache)); - } - - if (culture == null) - { - throw new ArgumentNullException(nameof(culture)); - } - - if (logger == null) - { - throw new ArgumentNullException(nameof(logger)); - } - - _resourceBaseName = baseName; - _culture = culture; - } - - /// - public override LocalizedString this[string name] - { - get - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - - var value = GetStringSafely(name, _culture); - - return new LocalizedString(name, value ?? name, resourceNotFound: value == null, searchedLocation: _resourceBaseName); - } - } - - /// - public override LocalizedString this[string name, params object[] arguments] - { - get - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - - var format = GetStringSafely(name, _culture); - var value = string.Format(_culture, format ?? name, arguments); - - return new LocalizedString(name, value, resourceNotFound: format == null, searchedLocation: _resourceBaseName); - } - } - - /// - public override IEnumerable GetAllStrings(bool includeParentCultures) => - GetAllStrings(includeParentCultures, _culture); - } -} diff --git a/src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/StringLocalizerOfTTest.cs b/src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/StringLocalizerOfTTest.cs index ce06e74d1c..53d290064e 100644 --- a/src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/StringLocalizerOfTTest.cs +++ b/src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/StringLocalizerOfTTest.cs @@ -33,28 +33,6 @@ namespace Microsoft.Extensions.Localization factory.Verify(mock => mock.Create(typeof(object)), Times.Once()); } - [Fact] - public void WithCulture_InvokesWithCultureFromInnerLocalizer() - { - // Arrange - var factory = new Mock(); - var innerLocalizer = new Mock(); - factory.Setup(mock => mock.Create(typeof(object))) - .Returns(innerLocalizer.Object); - - var localizer = new StringLocalizer(factory.Object); - - // Act -#pragma warning disable CS0618 - localizer.WithCulture(CultureInfo.GetCultureInfo("fr-FR")); -#pragma warning restore CS0618 - - // Assert -#pragma warning disable CS0618 - innerLocalizer.Verify(mock => mock.WithCulture(CultureInfo.GetCultureInfo("fr-FR")), Times.Once()); -#pragma warning restore CS0618 - } - [Fact] public void Indexer_ThrowsAnExceptionForNullName() { From d65b7239a68eff63dd175a0ca1d37ccc956a798a Mon Sep 17 00:00:00 2001 From: John Luo Date: Mon, 6 Jan 2020 11:40:44 -0800 Subject: [PATCH 20/22] Preserve functional test logs on CI (dotnet/extensions#2819) * Add option to preserve function test logs * Upload test logs as artifacts * Preserve binlogs * Add target to ensure all functional test logs preserved \n\nCommit migrated from https://github.com/dotnet/extensions/commit/08aa4560e589002f8f2444e4b27b8f0930cfbb46 --- src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs | 4 +++- .../ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs | 4 +++- src/Testing/src/TestFileOutputContext.cs | 6 ++++++ src/Testing/src/TestOutputDirectoryAttribute.cs | 4 +++- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs b/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs index af28ec60e0..e737371a8c 100644 --- a/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs +++ b/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs @@ -295,6 +295,7 @@ namespace Microsoft.AspNetCore.Testing public string TestName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public static string GetAssemblyBaseDirectory(System.Reflection.Assembly assembly, string baseDirectory = null) { throw null; } public static string GetOutputDirectory(System.Reflection.Assembly assembly) { throw null; } + public static bool GetPreserveExistingLogsInOutput(System.Reflection.Assembly assembly) { throw null; } public static string GetTestClassName(System.Type type) { throw null; } public static string GetTestMethodName(System.Reflection.MethodInfo method, object[] arguments) { throw null; } public string GetUniqueFileName(string prefix, string extension) { throw null; } @@ -307,8 +308,9 @@ namespace Microsoft.AspNetCore.Testing [System.AttributeUsageAttribute(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=true)] public partial class TestOutputDirectoryAttribute : System.Attribute { - public TestOutputDirectoryAttribute(string targetFramework, string baseDirectory = null) { } + public TestOutputDirectoryAttribute(string preserveExistingLogsInOutput, string targetFramework, string baseDirectory = null) { } public string BaseDirectory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public bool PreserveExistingLogsInOutput { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public string TargetFramework { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } [System.ObsoleteAttribute("This API is obsolete and the pattern its usage encouraged should not be used anymore. See https://github.com/aspnet/Extensions/issues/1697 for details.")] diff --git a/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs b/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs index af28ec60e0..e737371a8c 100644 --- a/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs +++ b/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs @@ -295,6 +295,7 @@ namespace Microsoft.AspNetCore.Testing public string TestName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public static string GetAssemblyBaseDirectory(System.Reflection.Assembly assembly, string baseDirectory = null) { throw null; } public static string GetOutputDirectory(System.Reflection.Assembly assembly) { throw null; } + public static bool GetPreserveExistingLogsInOutput(System.Reflection.Assembly assembly) { throw null; } public static string GetTestClassName(System.Type type) { throw null; } public static string GetTestMethodName(System.Reflection.MethodInfo method, object[] arguments) { throw null; } public string GetUniqueFileName(string prefix, string extension) { throw null; } @@ -307,8 +308,9 @@ namespace Microsoft.AspNetCore.Testing [System.AttributeUsageAttribute(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=true)] public partial class TestOutputDirectoryAttribute : System.Attribute { - public TestOutputDirectoryAttribute(string targetFramework, string baseDirectory = null) { } + public TestOutputDirectoryAttribute(string preserveExistingLogsInOutput, string targetFramework, string baseDirectory = null) { } public string BaseDirectory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public bool PreserveExistingLogsInOutput { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public string TargetFramework { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } [System.ObsoleteAttribute("This API is obsolete and the pattern its usage encouraged should not be used anymore. See https://github.com/aspnet/Extensions/issues/1697 for details.")] diff --git a/src/Testing/src/TestFileOutputContext.cs b/src/Testing/src/TestFileOutputContext.cs index 496a1379fb..fb79fd7bf7 100644 --- a/src/Testing/src/TestFileOutputContext.cs +++ b/src/Testing/src/TestFileOutputContext.cs @@ -93,6 +93,12 @@ namespace Microsoft.AspNetCore.Testing return Path.Combine(baseDirectory, assembly.GetName().Name, attribute.TargetFramework); } + public static bool GetPreserveExistingLogsInOutput(Assembly assembly) + { + var attribute = assembly.GetCustomAttributes().OfType().FirstOrDefault(); + return attribute.PreserveExistingLogsInOutput; + } + public static string GetTestClassName(Type type) { var shortNameAttribute = diff --git a/src/Testing/src/TestOutputDirectoryAttribute.cs b/src/Testing/src/TestOutputDirectoryAttribute.cs index 4ae8cea054..b1895c1d92 100644 --- a/src/Testing/src/TestOutputDirectoryAttribute.cs +++ b/src/Testing/src/TestOutputDirectoryAttribute.cs @@ -8,13 +8,15 @@ namespace Microsoft.AspNetCore.Testing [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = true)] public class TestOutputDirectoryAttribute : Attribute { - public TestOutputDirectoryAttribute(string targetFramework, string baseDirectory = null) + public TestOutputDirectoryAttribute(string preserveExistingLogsInOutput, string targetFramework, string baseDirectory = null) { TargetFramework = targetFramework; BaseDirectory = baseDirectory; + PreserveExistingLogsInOutput = bool.Parse(preserveExistingLogsInOutput); } public string BaseDirectory { get; } public string TargetFramework { get; } + public bool PreserveExistingLogsInOutput { get; } } } From 639de3f5f48ebda1779a1c53a223f01a9dad7fc0 Mon Sep 17 00:00:00 2001 From: Kevin Pilch Date: Thu, 9 Jan 2020 13:39:52 -0800 Subject: [PATCH 21/22] Update links for repository move/rename (dotnet/extensions#2840) \n\nCommit migrated from https://github.com/dotnet/extensions/commit/6b493684d90150b96b3057fdd0f45441bf9545d9 --- .../DependencyInjection/ServiceCollectionExtensionsTest.cs | 2 +- src/JSInterop/Microsoft.JSInterop.JS/src/package.json | 6 +++--- .../test/Infrastructure/DotNetDispatcherTest.cs | 6 +++--- src/Localization/README.md | 2 +- src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs | 2 +- .../ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs | 2 +- src/Testing/src/TestPathUtilities.cs | 2 +- src/Testing/test/TestPathUtilitiesTest.cs | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/HealthChecks/HealthChecks/test/DependencyInjection/ServiceCollectionExtensionsTest.cs b/src/HealthChecks/HealthChecks/test/DependencyInjection/ServiceCollectionExtensionsTest.cs index 98371e9f13..4a191a365f 100644 --- a/src/HealthChecks/HealthChecks/test/DependencyInjection/ServiceCollectionExtensionsTest.cs +++ b/src/HealthChecks/HealthChecks/test/DependencyInjection/ServiceCollectionExtensionsTest.cs @@ -42,7 +42,7 @@ namespace Microsoft.Extensions.DependencyInjection }); } - [Fact] // see: https://github.com/aspnet/Extensions/issues/639 + [Fact] // see: https://github.com/dotnet/extensions/issues/639 public void AddHealthChecks_RegistersPublisherService_WhenOtherHostedServicesRegistered() { // Arrange diff --git a/src/JSInterop/Microsoft.JSInterop.JS/src/package.json b/src/JSInterop/Microsoft.JSInterop.JS/src/package.json index 8f04908e78..37273c492f 100644 --- a/src/JSInterop/Microsoft.JSInterop.JS/src/package.json +++ b/src/JSInterop/Microsoft.JSInterop.JS/src/package.json @@ -12,14 +12,14 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/aspnet/Extensions.git" + "url": "git+https://github.com/dotnet/extensions.git" }, "author": "Microsoft", "license": "Apache-2.0", "bugs": { - "url": "https://github.com/aspnet/Extensions/issues" + "url": "https://github.com/dotnet/extensions/issues" }, - "homepage": "https://github.com/aspnet/Extensions/tree/master/src/JSInterop#readme", + "homepage": "https://github.com/dotnet/extensions/tree/master/src/JSInterop#readme", "files": [ "dist/**" ], diff --git a/src/JSInterop/Microsoft.JSInterop/test/Infrastructure/DotNetDispatcherTest.cs b/src/JSInterop/Microsoft.JSInterop/test/Infrastructure/DotNetDispatcherTest.cs index c85565d5f2..1f482b2680 100644 --- a/src/JSInterop/Microsoft.JSInterop/test/Infrastructure/DotNetDispatcherTest.cs +++ b/src/JSInterop/Microsoft.JSInterop/test/Infrastructure/DotNetDispatcherTest.cs @@ -298,7 +298,7 @@ namespace Microsoft.JSInterop.Infrastructure Assert.Equal(expected, ex.Message); } - [Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/12357")] + [Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/12357")] public void EndInvoke_AfterCancel() { // Arrange @@ -527,7 +527,7 @@ namespace Microsoft.JSInterop.Infrastructure Assert.False(jsRuntime.LastCompletionResult.Success); // Fails // Make sure the method that threw the exception shows up in the call stack - // https://github.com/aspnet/AspNetCore/issues/8612 + // https://github.com/dotnet/aspnetcore/issues/8612 Assert.Contains(nameof(ThrowingClass.ThrowingMethod), jsRuntime.LastCompletionResult.Exception.ToString()); } @@ -549,7 +549,7 @@ namespace Microsoft.JSInterop.Infrastructure Assert.False(jsRuntime.LastCompletionResult.Success); // Fails // Make sure the method that threw the exception shows up in the call stack - // https://github.com/aspnet/AspNetCore/issues/8612 + // https://github.com/dotnet/aspnetcore/issues/8612 Assert.Contains(nameof(ThrowingClass.AsyncThrowingMethod), jsRuntime.LastCompletionResult.Exception.ToString()); } diff --git a/src/Localization/README.md b/src/Localization/README.md index dc6894b6e0..503620b3c6 100644 --- a/src/Localization/README.md +++ b/src/Localization/README.md @@ -3,4 +3,4 @@ Localization These projects provide abstractions for localizing resources in .NET applications. -The ASP.NET Core implementation of localization can be found in https://github.com/aspnet/AspNetCore/tree/master/src/Middleware/Localization. +The ASP.NET Core implementation of localization can be found in https://github.com/dotnet/aspnetcore/tree/master/src/Middleware/Localization. diff --git a/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs b/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs index e737371a8c..17a922a6c7 100644 --- a/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs +++ b/src/Testing/ref/Microsoft.AspNetCore.Testing.net46.cs @@ -313,7 +313,7 @@ namespace Microsoft.AspNetCore.Testing public bool PreserveExistingLogsInOutput { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public string TargetFramework { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } - [System.ObsoleteAttribute("This API is obsolete and the pattern its usage encouraged should not be used anymore. See https://github.com/aspnet/Extensions/issues/1697 for details.")] + [System.ObsoleteAttribute("This API is obsolete and the pattern its usage encouraged should not be used anymore. See https://github.com/dotnet/extensions/issues/1697 for details.")] public partial class TestPathUtilities { public TestPathUtilities() { } diff --git a/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs b/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs index e737371a8c..17a922a6c7 100644 --- a/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs +++ b/src/Testing/ref/Microsoft.AspNetCore.Testing.netstandard2.0.cs @@ -313,7 +313,7 @@ namespace Microsoft.AspNetCore.Testing public bool PreserveExistingLogsInOutput { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public string TargetFramework { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } } - [System.ObsoleteAttribute("This API is obsolete and the pattern its usage encouraged should not be used anymore. See https://github.com/aspnet/Extensions/issues/1697 for details.")] + [System.ObsoleteAttribute("This API is obsolete and the pattern its usage encouraged should not be used anymore. See https://github.com/dotnet/extensions/issues/1697 for details.")] public partial class TestPathUtilities { public TestPathUtilities() { } diff --git a/src/Testing/src/TestPathUtilities.cs b/src/Testing/src/TestPathUtilities.cs index a5d83feeff..6d4449ca92 100644 --- a/src/Testing/src/TestPathUtilities.cs +++ b/src/Testing/src/TestPathUtilities.cs @@ -6,7 +6,7 @@ using System.IO; namespace Microsoft.AspNetCore.Testing { - [Obsolete("This API is obsolete and the pattern its usage encouraged should not be used anymore. See https://github.com/aspnet/Extensions/issues/1697 for details.")] + [Obsolete("This API is obsolete and the pattern its usage encouraged should not be used anymore. See https://github.com/dotnet/extensions/issues/1697 for details.")] public class TestPathUtilities { public static string GetRepoRootDirectory() diff --git a/src/Testing/test/TestPathUtilitiesTest.cs b/src/Testing/test/TestPathUtilitiesTest.cs index 4a6a74ae9c..024f476f07 100644 --- a/src/Testing/test/TestPathUtilitiesTest.cs +++ b/src/Testing/test/TestPathUtilitiesTest.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Testing { public class TestPathUtilitiesTest { - // Entire test pending removal - see https://github.com/aspnet/Extensions/issues/1697 + // Entire test pending removal - see https://github.com/dotnet/extensions/issues/1697 #pragma warning disable 0618 [Fact] From 7d27ed93f7f79b663faa050079def10b2d60eb33 Mon Sep 17 00:00:00 2001 From: Kahbazi Date: Fri, 10 Jan 2020 03:07:56 +0330 Subject: [PATCH 22/22] Set argument if no option has found (dotnet/extensions#2822) \n\nCommit migrated from https://github.com/dotnet/extensions/commit/1513ad0854b32d08f86acd4cd25225af556c2c81 --- .../CommandLine/CommandLineApplication.cs | 46 +++++++++++++++- .../CommandLineApplicationTests.cs | 54 +++++++++++++++++++ 2 files changed, 98 insertions(+), 2 deletions(-) diff --git a/src/Shared/CommandLineUtils/CommandLine/CommandLineApplication.cs b/src/Shared/CommandLineUtils/CommandLine/CommandLineApplication.cs index 51590d5990..ce608f65bc 100644 --- a/src/Shared/CommandLineUtils/CommandLine/CommandLineApplication.cs +++ b/src/Shared/CommandLineUtils/CommandLine/CommandLineApplication.cs @@ -26,10 +26,13 @@ namespace Microsoft.Extensions.CommandLineUtils // options. private readonly bool _continueAfterUnexpectedArg; - public CommandLineApplication(bool throwOnUnexpectedArg = true, bool continueAfterUnexpectedArg = false) + private readonly bool _treatUnmatchedOptionsAsArguments; + + public CommandLineApplication(bool throwOnUnexpectedArg = true, bool continueAfterUnexpectedArg = false, bool treatUnmatchedOptionsAsArguments = false) { _throwOnUnexpectedArg = throwOnUnexpectedArg; _continueAfterUnexpectedArg = continueAfterUnexpectedArg; + _treatUnmatchedOptionsAsArguments = treatUnmatchedOptionsAsArguments; Options = new List(); Arguments = new List(); Commands = new List(); @@ -136,6 +139,7 @@ namespace Microsoft.Extensions.CommandLineUtils CommandLineApplication command = this; CommandOption option = null; IEnumerator arguments = null; + var argumentsAssigned = false; for (var index = 0; index < args.Length; index++) { @@ -161,6 +165,25 @@ namespace Microsoft.Extensions.CommandLineUtils var longOptionName = longOption[0]; option = command.GetOptions().SingleOrDefault(opt => string.Equals(opt.LongName, longOptionName, StringComparison.Ordinal)); + if (option == null && _treatUnmatchedOptionsAsArguments) + { + if (arguments == null) + { + arguments = new CommandArgumentEnumerator(command.Arguments.GetEnumerator()); + } + if (arguments.MoveNext()) + { + processed = true; + arguments.Current.Values.Add(arg); + argumentsAssigned = true; + continue; + } + //else + //{ + // argumentsAssigned = false; + //} + } + if (option == null) { var ignoreContinueAfterUnexpectedArg = false; @@ -221,6 +244,25 @@ namespace Microsoft.Extensions.CommandLineUtils processed = true; option = command.GetOptions().SingleOrDefault(opt => string.Equals(opt.ShortName, shortOption[0], StringComparison.Ordinal)); + if (option == null && _treatUnmatchedOptionsAsArguments) + { + if (arguments == null) + { + arguments = new CommandArgumentEnumerator(command.Arguments.GetEnumerator()); + } + if (arguments.MoveNext()) + { + processed = true; + arguments.Current.Values.Add(arg); + argumentsAssigned = true; + continue; + } + //else + //{ + // argumentsAssigned = false; + //} + } + // If not a short option, try symbol option if (option == null) { @@ -278,7 +320,7 @@ namespace Microsoft.Extensions.CommandLineUtils option = null; } - if (!processed && arguments == null) + if (!processed && !argumentsAssigned) { var currentCommand = command; foreach (var subcommand in command.Commands) diff --git a/src/Shared/test/Shared.Tests/CommandLineApplicationTests.cs b/src/Shared/test/Shared.Tests/CommandLineApplicationTests.cs index cc6d0d841e..0bdc4a8f1d 100644 --- a/src/Shared/test/Shared.Tests/CommandLineApplicationTests.cs +++ b/src/Shared/test/Shared.Tests/CommandLineApplicationTests.cs @@ -1166,5 +1166,59 @@ Examples: Assert.Equal($"Unrecognized option '{inputOption}'", exception.Message); } + + [Fact] + public void TreatUnmatchedOptionsAsArguments() + { + CommandArgument first = null; + CommandArgument second = null; + + CommandOption firstOption = null; + CommandOption secondOption = null; + + var firstUnmatchedOption = "-firstUnmatchedOption"; + var firstActualOption = "-firstActualOption"; + var seconUnmatchedOption = "--secondUnmatchedOption"; + var secondActualOption = "--secondActualOption"; + + var app = new CommandLineApplication(treatUnmatchedOptionsAsArguments: true); + + app.Command("test", c => + { + firstOption = c.Option("-firstActualOption", "first option", CommandOptionType.NoValue); + secondOption = c.Option("--secondActualOption", "second option", CommandOptionType.NoValue); + + first = c.Argument("first", "First argument"); + second = c.Argument("second", "Second argument"); + c.OnExecute(() => 0); + }); + + app.Execute("test", firstUnmatchedOption, firstActualOption, seconUnmatchedOption, secondActualOption); + + Assert.Equal(firstUnmatchedOption, first.Value); + Assert.Equal(seconUnmatchedOption, second.Value); + + Assert.Equal(firstActualOption, firstOption.Template); + Assert.Equal(secondActualOption, secondOption.Template); + } + + [Fact] + public void ThrowExceptionWhenUnmatchedOptionAndTreatUnmatchedOptionsAsArgumentsIsFalse() + { + CommandArgument first = null; + + var firstOption = "-firstUnmatchedOption"; + + var app = new CommandLineApplication(treatUnmatchedOptionsAsArguments: false); + app.Command("test", c => + { + first = c.Argument("first", "First argument"); + c.OnExecute(() => 0); + }); + + var exception = Assert.Throws(() => app.Execute("test", firstOption)); + + Assert.Equal($"Unrecognized option '{firstOption}'", exception.Message); + } } }