diff --git a/src/Http/Routing/src/EndpointMiddleware.cs b/src/Http/Routing/src/EndpointMiddleware.cs index 08e5bb1db7b3257f97a3cefdcc61b7215d6d7743..41919ff00cc05aaa85ddb0449bb76a6f349778c6 100644 --- a/src/Http/Routing/src/EndpointMiddleware.cs +++ b/src/Http/Routing/src/EndpointMiddleware.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; -using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Cors.Infrastructure; using Microsoft.AspNetCore.Http; @@ -90,7 +88,7 @@ namespace Microsoft.AspNetCore.Routing throw new InvalidOperationException($"Endpoint {endpoint.DisplayName} contains authorization metadata, " + "but a middleware was not found that supports authorization." + Environment.NewLine + - "Configure your application startup by adding app.UseAuthorization() inside the call to Configure(..) in the application startup code. The call to app.UseAuthorization() must appear between app.UseRouting() and app.UseEndpoints(...)."); + "Configure your application startup by adding app.UseAuthorization() in the application startup code. If there are calls to app.UseRouting() and app.UseEndpoints(...), the call to app.UseAuthorization() must go between them."); } private static void ThrowMissingCorsMiddlewareException(Endpoint endpoint) @@ -98,7 +96,7 @@ namespace Microsoft.AspNetCore.Routing throw new InvalidOperationException($"Endpoint {endpoint.DisplayName} contains CORS metadata, " + "but a middleware was not found that supports CORS." + Environment.NewLine + - "Configure your application startup by adding app.UseCors() inside the call to Configure(..) in the application startup code. The call to app.UseCors() must appear between app.UseRouting() and app.UseEndpoints(...)."); + "Configure your application startup by adding app.UseCors() in the application startup code. If there are calls to app.UseRouting() and app.UseEndpoints(...), the call to app.UseCors() must go between them."); } private static partial class Log diff --git a/src/Http/Routing/test/FunctionalTests/EndpointRoutingIntegrationTest.cs b/src/Http/Routing/test/FunctionalTests/EndpointRoutingIntegrationTest.cs index 9a1f8267346733e28a495435feb5ab59f46eb3f8..0d6f2f4fa77c9504fc350eba8f81b2d5fad74f86 100644 --- a/src/Http/Routing/test/FunctionalTests/EndpointRoutingIntegrationTest.cs +++ b/src/Http/Routing/test/FunctionalTests/EndpointRoutingIntegrationTest.cs @@ -20,13 +20,13 @@ namespace Microsoft.AspNetCore.Routing.FunctionalTests private static readonly RequestDelegate TestDelegate = async context => await Task.Yield(); private static readonly string AuthErrorMessage = "Endpoint / contains authorization metadata, but a middleware was not found that supports authorization." + Environment.NewLine + - "Configure your application startup by adding app.UseAuthorization() inside the call to Configure(..) in the application startup code. " + - "The call to app.UseAuthorization() must appear between app.UseRouting() and app.UseEndpoints(...)."; + "Configure your application startup by adding app.UseAuthorization() in the application startup code. " + + "If there are calls to app.UseRouting() and app.UseEndpoints(...), the call to app.UseAuthorization() must go between them."; private static readonly string CORSErrorMessage = "Endpoint / contains CORS metadata, but a middleware was not found that supports CORS." + Environment.NewLine + - "Configure your application startup by adding app.UseCors() inside the call to Configure(..) in the application startup code. " + - "The call to app.UseCors() must appear between app.UseRouting() and app.UseEndpoints(...)."; + "Configure your application startup by adding app.UseCors() in the application startup code. " + + "If there are calls to app.UseRouting() and app.UseEndpoints(...), the call to app.UseCors() must go between them."; [Fact] public async Task AuthorizationMiddleware_WhenNoAuthMetadataIsConfigured() diff --git a/src/Http/Routing/test/UnitTests/EndpointMiddlewareTest.cs b/src/Http/Routing/test/UnitTests/EndpointMiddlewareTest.cs index 5bdef13fe567da3761d1dda4fe77161b6c92b3a7..2f6482ec716f1f075832818156854496a36d3fec 100644 --- a/src/Http/Routing/test/UnitTests/EndpointMiddlewareTest.cs +++ b/src/Http/Routing/test/UnitTests/EndpointMiddlewareTest.cs @@ -1,16 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; -using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Cors.Infrastructure; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Http.Features; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; using Moq; -using Xunit; namespace Microsoft.AspNetCore.Routing { @@ -101,8 +97,8 @@ namespace Microsoft.AspNetCore.Routing // Arrange var expected = "Endpoint Test contains authorization metadata, but a middleware was not found that supports authorization." + Environment.NewLine + - "Configure your application startup by adding app.UseAuthorization() inside the call to Configure(..) in the application startup code. " + - "The call to app.UseAuthorization() must appear between app.UseRouting() and app.UseEndpoints(...)."; + "Configure your application startup by adding app.UseAuthorization() in the application startup code. " + + "If there are calls to app.UseRouting() and app.UseEndpoints(...), the call to app.UseAuthorization() must go between them."; var httpContext = new DefaultHttpContext { RequestServices = new ServiceProvider() @@ -198,8 +194,8 @@ namespace Microsoft.AspNetCore.Routing // Arrange var expected = "Endpoint Test contains CORS metadata, but a middleware was not found that supports CORS." + Environment.NewLine + - "Configure your application startup by adding app.UseCors() inside the call to Configure(..) in the application startup code. " + - "The call to app.UseCors() must appear between app.UseRouting() and app.UseEndpoints(...)."; + "Configure your application startup by adding app.UseCors() in the application startup code. " + + "If there are calls to app.UseRouting() and app.UseEndpoints(...), the call to app.UseCors() must go between them."; var httpContext = new DefaultHttpContext { RequestServices = new ServiceProvider() diff --git a/src/ProjectTemplates/Web.ItemTemplates/content/Protobuf/.template.config/template.json b/src/ProjectTemplates/Web.ItemTemplates/content/Protobuf/.template.config/template.json index ec86526b6620e2ca02fee2e8c2a1ee144a74b9b2..a3beafd9d2e71f5c2cbab71b92535241fd362b56 100644 --- a/src/ProjectTemplates/Web.ItemTemplates/content/Protobuf/.template.config/template.json +++ b/src/ProjectTemplates/Web.ItemTemplates/content/Protobuf/.template.config/template.json @@ -12,9 +12,9 @@ "language": "", "type": "item" }, - "groupIdentity": "Microsoft.Web.Grpc.Protobuf.6.0", + "groupIdentity": "Microsoft.Web.Grpc.Protobuf", "precedence": "600", - "identity": "Microsoft.Web.Grpc.Protobuf", + "identity": "Microsoft.Web.Grpc.Protobuf.6.0", "shortname": "proto", "sourceName": "protobuf", "primaryOutputs": [ diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/cs-CZ/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/cs-CZ/strings.json old mode 100644 new mode 100755 index fa9586732a02af95a08cd7bebe986fed6c9fc002..746e19f9fcd3d8dd4584b4367b70b30dbb03768c --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/cs-CZ/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/cs-CZ/strings.json @@ -3,6 +3,9 @@ "strings": { "name": "Webové rozhranà API pro ASP.NET Core", "description": "Å ablona projektu pro vytvoÅ™enà aplikace ASP.NET Core s ukázkovým kontrolerem pro službu RESTful HTTP. Tato Å¡ablona se dá použÃt i pro zobrazenà a kontrolery ASP.NET Core MVC.", - "parameter.DisableOpenAPI.name": "Povolit podporu _OpenAPI" + "parameter.DisableOpenAPI.name": "Povolit podporu _OpenAPI", + "parameter.DisableOpenAPI.description": "Povolenà podpory OpenAPI (Swagger)", + "parameter.UseMinimalAPIs.name": "PoužÃvánà kontrolérů (pokud chcete použÃvat minimálnà rozhranà API, zruÅ¡te zaÅ¡krtnutÃ)", + "parameter.UseMinimalAPIs.description": "UrÄuje, jestli se mÃsto kontrolérů majà použÃvat minimálnà rozhranà API." } } \ No newline at end of file diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/de-DE/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/de-DE/strings.json old mode 100644 new mode 100755 index 1d4495b45e3b9aa4744380c029dec142c415a9b7..27d30199bc8b4fcd6bab07065401c419c0db31c4 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/de-DE/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/de-DE/strings.json @@ -3,6 +3,9 @@ "strings": { "name": "ASP.NET Core-Web-API", "description": "Eine Projektvorlage zum Erstellen einer ASP.NET Core-Anwendung mit einem Beispielcontroller für einen RESTful HTTP-Dienst. Diese Vorlage kann auch für ASP.NET Core-MVC-Ansichten und -Controller verwendet werden.", - "parameter.DisableOpenAPI.name": "_OpenAPI-Unterstützung aktivieren" + "parameter.DisableOpenAPI.name": "_OpenAPI-Unterstützung aktivieren", + "parameter.DisableOpenAPI.description": "Aktiviert OpenAPI-Unterstützung (Swagger)", + "parameter.UseMinimalAPIs.name": "Controller verwenden (deaktivieren, um minimale APIs zu verwenden)", + "parameter.UseMinimalAPIs.description": "Gibt an, ob minimale APIs anstelle von Controllern verwendet werden sollen." } } \ No newline at end of file diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/es-ES/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/es-ES/strings.json old mode 100644 new mode 100755 index 15371fabd694ef25a3d7e1f2eec7c2a61bd67984..7967b75e05a64082ad1084368286c5f9f2663240 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/es-ES/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/es-ES/strings.json @@ -3,6 +3,9 @@ "strings": { "name": "ASP.NET Core Web API", "description": "Una plantilla de proyecto para crear una aplicación ASP.NET Core con un controlador de ejemplo para un servicio RESTful HTTP. Esta plantilla también puede usarse para controladores y vistas de ASP.NET Core MVC.", - "parameter.DisableOpenAPI.name": "Habilitar compatibilidad con _OpenAPI" + "parameter.DisableOpenAPI.name": "Habilitar compatibilidad con _OpenAPI", + "parameter.DisableOpenAPI.description": "Habilitar la compatibilidad con OpenAPI (Swagger)", + "parameter.UseMinimalAPIs.name": "Usar controladores (desactivar para usar API mÃnimas)", + "parameter.UseMinimalAPIs.description": "Indica si se deben usar API minimas en lugar de controladores." } } \ No newline at end of file diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/fr-FR/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/fr-FR/strings.json old mode 100644 new mode 100755 index 42666fbd5e3c597d8e5febd4f0789de753d9102d..fdb68ea3696d138ed29d46a077b26313b7e11d33 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/fr-FR/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/fr-FR/strings.json @@ -3,6 +3,9 @@ "strings": { "name": "API web ASP.NET Core", "description": "Modèle de projet permettant de créer une application ASP.NET Core avec un exemple de contrôleur pour un service HTTP RESTful. Vous pouvez également utiliser ce modèle pour les vues et contrôleurs ASP.NET Core MVC.", - "parameter.DisableOpenAPI.name": "Activer la prise en charge d'_OpenAPI" + "parameter.DisableOpenAPI.name": "Activer la prise en charge d'_OpenAPI", + "parameter.DisableOpenAPI.description": "Active la prise en charge d'OpenAPI (Swagger)", + "parameter.UseMinimalAPIs.name": "Utiliser des contrôleurs (décocher pour utiliser un minimum d'API)", + "parameter.UseMinimalAPIs.description": "S'il faut utiliser des API minimales au lieu de contrôleurs." } } \ No newline at end of file diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ide.host.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ide.host.json index 2b3113af4e3b65795434fb9b5c53447c1665ffee..c8fdd64b6acd763a50dfd8d95c245db7af90231f 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ide.host.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ide.host.json @@ -40,6 +40,9 @@ "name": { "text": "Enable _OpenAPI support" }, + "description": { + "text": "Enables OpenAPI (Swagger) support" + }, "invertBoolean": true, "isVisible": true, "defaultValue": true diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/it-IT/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/it-IT/strings.json old mode 100644 new mode 100755 index fa9b48fb5dcc9407bb5d3876a8edcdc80aa04c2e..9945ffaec5bcbea005a3f9ff14ccaba3292e396b --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/it-IT/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/it-IT/strings.json @@ -3,6 +3,9 @@ "strings": { "name": "API Web ASP.NET Core", "description": "Modello di progetto per la creazione di un'applicazione ASP.NET Core con un controller di esempio per un servizio HTTP RESTful. È possibile usare questo modello anche per i controller e le viste di ASP.NET Core MVC.", - "parameter.DisableOpenAPI.name": "Abilita supporto _OpenAPI" + "parameter.DisableOpenAPI.name": "Abilita supporto _OpenAPI", + "parameter.DisableOpenAPI.description": "Abilita supporto OpenAPI (Swagger)", + "parameter.UseMinimalAPIs.name": "Usa i controller (deseleziona per usare il numero minimo di API)", + "parameter.UseMinimalAPIs.description": "Indica se usare le API minimal invece dei controller." } } \ No newline at end of file diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ja-JP/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ja-JP/strings.json old mode 100644 new mode 100755 index ccc979a8dfcfde7184b91815af6f70902cf8f1bf..f399c2bffe3142e85c20e603471923e453624826 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ja-JP/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ja-JP/strings.json @@ -3,6 +3,9 @@ "strings": { "name": "ASP.NET Core Web API", "description": "RESTful HTTP サービスã®ã‚µãƒ³ãƒ—ル コントãƒãƒ¼ãƒ©ãƒ¼ã§ ASP.NET Core アプリケーションを作æˆã™ã‚‹ãŸã‚ã®ãƒ—ãƒã‚¸ã‚§ã‚¯ãƒˆ テンプレートã§ã™ã€‚ã“ã®ãƒ†ãƒ³ãƒ—レート㯠ASP.NET Core MVC ã®ãƒ“ューã¨ã‚³ãƒ³ãƒˆãƒãƒ¼ãƒ©ãƒ¼ã§ã‚‚使用ã§ãã¾ã™ã€‚", - "parameter.DisableOpenAPI.name": "OpenAPI サãƒãƒ¼ãƒˆã‚’有効ã«ã™ã‚‹(_O)" + "parameter.DisableOpenAPI.name": "OpenAPI サãƒãƒ¼ãƒˆã‚’有効ã«ã™ã‚‹(_O)", + "parameter.DisableOpenAPI.description": "OpenAPI (Swagger) サãƒãƒ¼ãƒˆã‚’有効ã«ã™ã‚‹", + "parameter.UseMinimalAPIs.name": "コントãƒãƒ¼ãƒ©ãƒ¼ã‚’使用ã™ã‚‹ (最å°é™ã® API を使用ã™ã‚‹å ´åˆã¯ã‚ªãƒ•ã«ã—ã¾ã™)", + "parameter.UseMinimalAPIs.description": "コントãƒãƒ¼ãƒ©ãƒ¼ã®ä»£ã‚ã‚Šã«æœ€å°é™ã® API を使用ã™ã‚‹ã‹ã©ã†ã‹ã€‚" } } \ No newline at end of file diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ko-KR/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ko-KR/strings.json old mode 100644 new mode 100755 index 5c0c0840e1199a205b59b64b223494bcab635df5..3c9bfeaf589e8a350321654f02b4a144d99a5a33 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ko-KR/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ko-KR/strings.json @@ -3,6 +3,9 @@ "strings": { "name": "ASP.NET Core Web API", "description": "RESTful HTTP 서비스용 ì˜ˆì œ 컨트롤러를 사용하여 ASP.NET Core ì• í”Œë¦¬ì¼€ì´ì…˜ì„ 만드는 ë° ì‚¬ìš©ë˜ëŠ” 프로ì 트 템플릿입니다. ì´ í…œí”Œë¦¿ì€ ASP.NET Core MVC ë·° ë° ì»¨íŠ¸ë¡¤ëŸ¬ì—ë„ ì‚¬ìš©í• ìˆ˜ 있습니다.", - "parameter.DisableOpenAPI.name": "OpenAPI ì§€ì› ì‚¬ìš©(_O)" + "parameter.DisableOpenAPI.name": "OpenAPI ì§€ì› ì‚¬ìš©(_O)", + "parameter.DisableOpenAPI.description": "OpenAPI(Swagger) ì§€ì› ì‚¬ìš©", + "parameter.UseMinimalAPIs.name": "컨트롤러 사용(최소 API 사용 ì„ íƒ ì·¨ì†Œ)", + "parameter.UseMinimalAPIs.description": "컨트롤러 ëŒ€ì‹ ìµœì†Œ API를 ì‚¬ìš©í• ì§€ 여부" } } \ No newline at end of file diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/pl-PL/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/pl-PL/strings.json old mode 100644 new mode 100755 index 6745a2a2aaf4d83d4a0ec0752a2adb521b623156..b343560037e967aae0aa4d05c7cbf666b792f41e --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/pl-PL/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/pl-PL/strings.json @@ -3,6 +3,9 @@ "strings": { "name": "Internetowy interfejs API platformy ASP.NET Core", "description": "Szablon projektu sÅ‚użący do tworzenia aplikacji platformy ASP.NET Core z przykÅ‚adowym kontrolerem obsÅ‚ugujÄ…cym usÅ‚ugÄ™ HTTP RESTful. Tego szablonu można także użyć dla widoków i kontrolerów platformy ASP.NET Core MVC.", - "parameter.DisableOpenAPI.name": "Włącz obsÅ‚ugÄ™ interfejsu _OpenAPI" + "parameter.DisableOpenAPI.name": "Włącz obsÅ‚ugÄ™ interfejsu _OpenAPI", + "parameter.DisableOpenAPI.description": "Włącza obsÅ‚ugÄ™ interfejsu OpenAPI (Swagger)", + "parameter.UseMinimalAPIs.name": "Użyj kontrolerów (usuÅ„ zaznaczenie, aby używać minimalnej iloÅ›ci interfejsów API)", + "parameter.UseMinimalAPIs.description": "OkreÅ›la, czy używać minimalnej iloÅ›ci interfejsów API zamiast kontrolerów." } } \ No newline at end of file diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/pt-BR/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/pt-BR/strings.json old mode 100644 new mode 100755 index 6d0a094c23def4df0c63dd0e1c147e3b8e7e248b..2c07afece218a4c08ddf6f0324d88c8880c9f68b --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/pt-BR/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/pt-BR/strings.json @@ -3,6 +3,9 @@ "strings": { "name": "API Web do ASP.NET Core", "description": "Um modelo de projeto para criar um aplicativo ASP.NET Core com um Controlador de exemplo para um serviço HTTP RESTful. Esse modelo também pode ser usado para Controladores e Exibições do ASP.NET Core MVC.", - "parameter.DisableOpenAPI.name": "Habilitar o suporte a _OpenAPI" + "parameter.DisableOpenAPI.name": "Habilitar o suporte a _OpenAPI", + "parameter.DisableOpenAPI.description": "Habilita o suporte a OpenAPI (Swagger)", + "parameter.UseMinimalAPIs.name": "Usar controladores (desmarque para usar APIs mÃnimas)", + "parameter.UseMinimalAPIs.description": "Se usar APIs mÃnimas em vez de controladores." } } \ No newline at end of file diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ru-RU/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ru-RU/strings.json old mode 100644 new mode 100755 index adc67973bb62a9906f48609ea6597c2f8b7f53fe..bb529502b9e77115a1be6566e28e4f15775a5bb5 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ru-RU/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ru-RU/strings.json @@ -3,6 +3,9 @@ "strings": { "name": "Веб-API ASP.NET Core", "description": "Шаблон проекта Ð´Ð»Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ ASP.NET Core Ñ Ð¾Ð±Ñ€Ð°Ð·Ñ†Ð¾Ð¼ контроллера Ð´Ð»Ñ Ñлужбы HTTP RESTful. Ðтот шаблон можно также иÑпользовать Ð´Ð»Ñ Ð¿Ñ€ÐµÐ´Ñтавлений MVC и контроллеров ASP.NET Core.", - "parameter.DisableOpenAPI.name": "Включить поддержку _OpenAPI" + "parameter.DisableOpenAPI.name": "Включить поддержку _OpenAPI", + "parameter.DisableOpenAPI.description": "Включает поддержку OpenAPI (Swagger)", + "parameter.UseMinimalAPIs.name": "ИÑпользовать контроллеры (Ñнимите флажок, чтобы иÑпользовать минимальные API)", + "parameter.UseMinimalAPIs.description": "ИÑпользование минимальных API вмеÑто контроллеров." } } \ No newline at end of file diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/tr-TR/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/tr-TR/strings.json old mode 100644 new mode 100755 index b06aee9a4597292d4dde42d188f995a63edfcbc2..8583f1337385918d943a31caadfe213b80e6c1a2 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/tr-TR/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/tr-TR/strings.json @@ -3,6 +3,9 @@ "strings": { "name": "ASP.NET Core Web API'si", "description": "RESTful HTTP hizmetine ait örnek bir Denetleyici içeren bir ASP.NET Core uygulaması oluÅŸturmaya yönelik proje ÅŸablonu. Bu ÅŸablon aynı zamanda ASP.NET Core MVC Görünümleri ve Denetleyicileri için de kullanılabilir.", - "parameter.DisableOpenAPI.name": "_OpenAPI desteÄŸini etkinleÅŸtir" + "parameter.DisableOpenAPI.name": "_OpenAPI desteÄŸini etkinleÅŸtir", + "parameter.DisableOpenAPI.description": "OpenAPI (Swagger) desteÄŸini etkinleÅŸtirir", + "parameter.UseMinimalAPIs.name": "Denetleyicileri kullan (minimal API’leri kullanmak için onay iÅŸaretini kaldırın)", + "parameter.UseMinimalAPIs.description": "Denetleyiciler yerine minimal API’lerin kullanılıp kullanılmayacağını belirtir." } } \ No newline at end of file diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/zh-CN/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/zh-CN/strings.json old mode 100644 new mode 100755 index d5e7d3261a30b60ec6590f87e7b8ca39b9e2ca25..f387c339a65c3bedad8e67ea6666469509e07fc7 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/zh-CN/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/zh-CN/strings.json @@ -3,6 +3,9 @@ "strings": { "name": "ASP.NET Core Web API", "description": "ç”¨äºŽåˆ›å»ºåŒ…å« RESTful HTTP æœåŠ¡ç¤ºä¾‹æŽ§åˆ¶å™¨çš„ ASP.NET Core 应用程åºçš„项目模æ¿ã€‚æ¤æ¨¡æ¿è¿˜å¯ä»¥ç”¨äºŽ ASP.NET Core MVC 视图和控制器。", - "parameter.DisableOpenAPI.name": "å¯ç”¨ OpenAPI 支æŒ(_O)" + "parameter.DisableOpenAPI.name": "å¯ç”¨ OpenAPI 支æŒ(_O)", + "parameter.DisableOpenAPI.description": "å¯ç”¨ OpenAI (Swagger)支æŒ", + "parameter.UseMinimalAPIs.name": "使用控制器(å–æ¶ˆé€‰ä¸ä»¥ä½¿ç”¨æœ€å° API)", + "parameter.UseMinimalAPIs.description": "是å¦ä½¿ç”¨æœ€å° API è€Œä¸æ˜¯æŽ§åˆ¶å™¨ã€‚" } } \ No newline at end of file diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/zh-TW/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/zh-TW/strings.json old mode 100644 new mode 100755 index 99d82a83ff4f278dea701b44c3defe0f1c137fff..b4faea763fcf3a00266b534d9f0728ee9ce48d9f --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/zh-TW/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/zh-TW/strings.json @@ -3,6 +3,9 @@ "strings": { "name": "ASP.NET Core Web API", "description": "用於建立 ASP.NET Core 應用程å¼çš„專案範本,附有 RESTful HTTP æœå‹™çš„æŽ§åˆ¶å™¨ç¯„例。æ¤ç¯„本也å¯ç”¨æ–¼ ASP.NET Core MVC çš„æª¢è¦–åŠæŽ§åˆ¶å™¨ã€‚", - "parameter.DisableOpenAPI.name": "啟用 OpenAPI 支æ´(_O)" + "parameter.DisableOpenAPI.name": "啟用 OpenAPI 支æ´(_O)", + "parameter.DisableOpenAPI.description": "啟用 OpenAPI (Swagger) 支æ´", + "parameter.UseMinimalAPIs.name": "使用控制器 (å–æ¶ˆå‹¾é¸ä»¥ä½¿ç”¨æœ€ä½Ž API)", + "parameter.UseMinimalAPIs.description": "是å¦è¦ä½¿ç”¨è¿·ä½ API è€Œä¸æ˜¯æŽ§åˆ¶å™¨ã€‚" } } \ No newline at end of file diff --git a/src/Security/Authorization/Policy/src/AuthorizationAppBuilderExtensions.cs b/src/Security/Authorization/Policy/src/AuthorizationAppBuilderExtensions.cs index 2fccd211f1db51c47a76f8b0a2add0a7d4747dee..1fa8f2dd0a6b356447caed8521d1fdb4a6708633 100644 --- a/src/Security/Authorization/Policy/src/AuthorizationAppBuilderExtensions.cs +++ b/src/Security/Authorization/Policy/src/AuthorizationAppBuilderExtensions.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization.Policy; using Microsoft.Extensions.DependencyInjection; @@ -42,8 +41,7 @@ namespace Microsoft.AspNetCore.Builder { throw new InvalidOperationException(Resources.FormatException_UnableToFindServices( nameof(IServiceCollection), - nameof(PolicyServiceCollectionExtensions.AddAuthorization), - "ConfigureServices(...)")); + nameof(PolicyServiceCollectionExtensions.AddAuthorization))); } } } diff --git a/src/Security/Authorization/Policy/src/Resources.resx b/src/Security/Authorization/Policy/src/Resources.resx index 15d6f7d53c0f84289f099e92d110f6cdc8d2c7c6..93cc19ce4f710eb5bb13cbfbf249250f0affe8e0 100644 --- a/src/Security/Authorization/Policy/src/Resources.resx +++ b/src/Security/Authorization/Policy/src/Resources.resx @@ -118,6 +118,6 @@ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <data name="Exception_UnableToFindServices" xml:space="preserve"> - <value>Unable to find the required services. Please add all the required services by calling '{0}.{1}' inside the call to '{2}' in the application startup code.</value> + <value>Unable to find the required services. Please add all the required services by calling '{0}.{1}' in the application startup code.</value> </data> </root> \ No newline at end of file diff --git a/src/Security/Authorization/test/AuthorizationAppBuilderExtensionsTests.cs b/src/Security/Authorization/test/AuthorizationAppBuilderExtensionsTests.cs index 73cc1138721a2ce1d829937cc5b555be33c8f38a..1f19e2486012ae155ff806ab5126de11095b57cd 100644 --- a/src/Security/Authorization/test/AuthorizationAppBuilderExtensionsTests.cs +++ b/src/Security/Authorization/test/AuthorizationAppBuilderExtensionsTests.cs @@ -61,8 +61,7 @@ namespace Microsoft.AspNetCore.Authorization.Test // Assert Assert.Equal( "Unable to find the required services. Please add all the required services by calling " + - "'IServiceCollection.AddAuthorization' inside the call to 'ConfigureServices(...)' " + - "in the application startup code.", + "'IServiceCollection.AddAuthorization' in the application startup code.", ex.Message); } diff --git a/src/Servers/HttpSys/src/RequestProcessing/Request.cs b/src/Servers/HttpSys/src/RequestProcessing/Request.cs index 82d31cf110d4d889f2776d4429d82b2797a022f2..ffffc050672cce7df8cba9bd1482b7ca86069981 100644 --- a/src/Servers/HttpSys/src/RequestProcessing/Request.cs +++ b/src/Servers/HttpSys/src/RequestProcessing/Request.cs @@ -45,7 +45,9 @@ namespace Microsoft.AspNetCore.Server.HttpSys _contentBoundaryType = BoundaryType.None; RequestId = requestContext.RequestId; + // For HTTP/2 Http.Sys assigns each request a unique connection id for use with API calls, but the RawConnectionId represents the real connection. UConnectionId = requestContext.ConnectionId; + RawConnectionId = requestContext.RawConnectionId; SslStatus = requestContext.SslStatus; KnownMethod = requestContext.VerbId; @@ -115,8 +117,10 @@ namespace Microsoft.AspNetCore.Server.HttpSys internal ulong UConnectionId { get; } + internal ulong RawConnectionId { get; } + // No ulongs in public APIs... - public long ConnectionId => (long)UConnectionId; + public long ConnectionId => (long)RawConnectionId; internal ulong RequestId { get; } diff --git a/src/Shared/HttpSys/RequestProcessing/NativeRequestContext.cs b/src/Shared/HttpSys/RequestProcessing/NativeRequestContext.cs index 77f8633d7d9de279f961f3240308a77ecebc39d8..51e734bf504a9e4c424bc12c5872f46fae9b8e04 100644 --- a/src/Shared/HttpSys/RequestProcessing/NativeRequestContext.cs +++ b/src/Shared/HttpSys/RequestProcessing/NativeRequestContext.cs @@ -99,6 +99,8 @@ namespace Microsoft.AspNetCore.HttpSys.Internal internal ulong ConnectionId => NativeRequest->ConnectionId; + internal ulong RawConnectionId => NativeRequest->RawConnectionId; + internal HttpApiTypes.HTTP_VERB VerbId => NativeRequest->Verb; internal ulong UrlContext => NativeRequest->UrlContext; diff --git a/src/submodules/googletest b/src/submodules/googletest index 3b49be074d5c1340eeb447e6a8e78427051e675a..16f637fbf4ffc3f7a01fa4eceb7906634565242f 160000 --- a/src/submodules/googletest +++ b/src/submodules/googletest @@ -1 +1 @@ -Subproject commit 3b49be074d5c1340eeb447e6a8e78427051e675a +Subproject commit 16f637fbf4ffc3f7a01fa4eceb7906634565242f