From 3f084103ae5f0cbd484cdb9aac07a65055d716fc Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Wed, 20 Sep 2023 13:33:58 +0800 Subject: [PATCH] Remove netstandard1.5 from some projects --- src/Grpc.Auth/Grpc.Auth.csproj | 2 +- src/Grpc.Core.Api/Grpc.Core.Api.csproj | 2 +- src/Grpc.Core.Api/Internal/ClientDebuggerHelpers.cs | 12 ------------ src/Grpc.HealthCheck/Grpc.HealthCheck.csproj | 2 +- src/Grpc.Reflection/Grpc.Reflection.csproj | 2 +- 5 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/Grpc.Auth/Grpc.Auth.csproj b/src/Grpc.Auth/Grpc.Auth.csproj index 8edcfcf4f..af058881c 100755 --- a/src/Grpc.Auth/Grpc.Auth.csproj +++ b/src/Grpc.Auth/Grpc.Auth.csproj @@ -5,7 +5,7 @@ true true - net462;netstandard1.5;netstandard2.0 + net462;netstandard2.0 README.md diff --git a/src/Grpc.Core.Api/Grpc.Core.Api.csproj b/src/Grpc.Core.Api/Grpc.Core.Api.csproj index 6cf865ff7..bb6756d1e 100755 --- a/src/Grpc.Core.Api/Grpc.Core.Api.csproj +++ b/src/Grpc.Core.Api/Grpc.Core.Api.csproj @@ -5,7 +5,7 @@ true true - net462;netstandard1.5;netstandard2.0;netstandard2.1 + net462;netstandard2.0;netstandard2.1 README.md true diff --git a/src/Grpc.Core.Api/Internal/ClientDebuggerHelpers.cs b/src/Grpc.Core.Api/Internal/ClientDebuggerHelpers.cs index f309fd8ce..3ca7b0dba 100644 --- a/src/Grpc.Core.Api/Internal/ClientDebuggerHelpers.cs +++ b/src/Grpc.Core.Api/Internal/ClientDebuggerHelpers.cs @@ -25,11 +25,7 @@ namespace Grpc.Core.Internal; internal static class ClientDebuggerHelpers { -#if NETSTANDARD1_5 - private static TypeInfo? GetParentType(Type clientType) -#else private static Type? GetParentType(Type clientType) -#endif { // Attempt to get the parent type for a generated client. // A generated client is always nested inside a static type that contains information about the client. @@ -48,11 +44,7 @@ internal static class ClientDebuggerHelpers return null; } -#if NETSTANDARD1_5 - var parentType = clientType.DeclaringType.GetTypeInfo(); -#else var parentType = clientType.DeclaringType; -#endif // Check parent type is static. A C# static type is sealed and abstract. if (parentType == null || (!parentType.IsSealed && !parentType.IsAbstract)) { @@ -101,10 +93,6 @@ internal static class ClientDebuggerHelpers return methods; static bool IsMethodField(FieldInfo field) => -#if NETSTANDARD1_5 - typeof(IMethod).GetTypeInfo().IsAssignableFrom(field.FieldType); -#else typeof(IMethod).IsAssignableFrom(field.FieldType); -#endif } } diff --git a/src/Grpc.HealthCheck/Grpc.HealthCheck.csproj b/src/Grpc.HealthCheck/Grpc.HealthCheck.csproj index c6a40f099..d3e02fc34 100755 --- a/src/Grpc.HealthCheck/Grpc.HealthCheck.csproj +++ b/src/Grpc.HealthCheck/Grpc.HealthCheck.csproj @@ -5,7 +5,7 @@ true true - net462;netstandard1.5;netstandard2.0 + net462;netstandard2.0 README.md diff --git a/src/Grpc.Reflection/Grpc.Reflection.csproj b/src/Grpc.Reflection/Grpc.Reflection.csproj index 0a52e1642..63b23d665 100755 --- a/src/Grpc.Reflection/Grpc.Reflection.csproj +++ b/src/Grpc.Reflection/Grpc.Reflection.csproj @@ -5,7 +5,7 @@ true true - net462;netstandard1.5;netstandard2.0 + net462;netstandard2.0 README.md