From 1d3cad9107514237ed4c12a9e4a625e64a589ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Mon, 25 Nov 2024 12:01:41 +0100 Subject: [PATCH] PR feedback - disable CA1515 when public classes are necessary --- .../Controllers/WeatherForecastController.cs | 4 +++- .../grpc.core/Examples.GrpcCore.AspNetCore/WeatherForecast.cs | 4 +++- examples/owin/Controllers/TestController.cs | 4 +++- examples/wcf/client-core/StatusServiceClient.cs | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/examples/grpc.core/Examples.GrpcCore.AspNetCore/Controllers/WeatherForecastController.cs b/examples/grpc.core/Examples.GrpcCore.AspNetCore/Controllers/WeatherForecastController.cs index b0e502a3a0..65126feec3 100644 --- a/examples/grpc.core/Examples.GrpcCore.AspNetCore/Controllers/WeatherForecastController.cs +++ b/examples/grpc.core/Examples.GrpcCore.AspNetCore/Controllers/WeatherForecastController.cs @@ -7,7 +7,9 @@ namespace Examples.GrpcCore.AspNetCore.Controllers; [ApiController] [Route("[controller]")] -internal class WeatherForecastController : ControllerBase +#pragma warning disable CA1515 +public class WeatherForecastController : ControllerBase +#pragma warning restore CA1515 { private static readonly string[] Summaries = [ diff --git a/examples/grpc.core/Examples.GrpcCore.AspNetCore/WeatherForecast.cs b/examples/grpc.core/Examples.GrpcCore.AspNetCore/WeatherForecast.cs index 0a930cbb4f..e8aa41fb67 100644 --- a/examples/grpc.core/Examples.GrpcCore.AspNetCore/WeatherForecast.cs +++ b/examples/grpc.core/Examples.GrpcCore.AspNetCore/WeatherForecast.cs @@ -3,7 +3,9 @@ namespace Examples.GrpcCore.AspNetCore; -internal class WeatherForecast +#pragma warning disable CA1515 +public class WeatherForecast +#pragma warning restore CA1515 { public WeatherForecast(DateTime date, int temperatureC, string summary) { diff --git a/examples/owin/Controllers/TestController.cs b/examples/owin/Controllers/TestController.cs index 9469360781..80a6051efb 100644 --- a/examples/owin/Controllers/TestController.cs +++ b/examples/owin/Controllers/TestController.cs @@ -5,7 +5,9 @@ namespace Examples.Owin.Controllers; -internal class TestController : ApiController +#pragma warning disable CA1515 +public class TestController : ApiController +#pragma warning restore CA1515 { // GET api/test/{id} public string Get(string? id = null) diff --git a/examples/wcf/client-core/StatusServiceClient.cs b/examples/wcf/client-core/StatusServiceClient.cs index de97724092..4c844c8cf1 100644 --- a/examples/wcf/client-core/StatusServiceClient.cs +++ b/examples/wcf/client-core/StatusServiceClient.cs @@ -6,7 +6,9 @@ namespace Examples.Wcf.Client; -internal class StatusServiceClient : ClientBase, IStatusServiceContract +#pragma warning disable CA1515 +public class StatusServiceClient : ClientBase, IStatusServiceContract +#pragma warning restore CA1515 { public StatusServiceClient(string name) : base(name)