Skip to content

Commit

Permalink
Remove netstandard1.5 from some projects (#2279)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK authored Sep 21, 2023
1 parent 40a26c9 commit 46480fc
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/Grpc.Auth/Grpc.Auth.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<IsGrpcPublishedPackage>true</IsGrpcPublishedPackage>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TargetFrameworks>net462;netstandard1.5;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Grpc.Core.Api/Grpc.Core.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<IsGrpcPublishedPackage>true</IsGrpcPublishedPackage>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TargetFrameworks>net462;netstandard1.5;netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;netstandard2.1</TargetFrameworks>
<PackageReadmeFile>README.md</PackageReadmeFile>

<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
12 changes: 0 additions & 12 deletions src/Grpc.Core.Api/Internal/ClientDebuggerHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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))
{
Expand Down Expand Up @@ -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
}
}
2 changes: 1 addition & 1 deletion src/Grpc.HealthCheck/Grpc.HealthCheck.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<IsGrpcPublishedPackage>true</IsGrpcPublishedPackage>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TargetFrameworks>net462;netstandard1.5;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Grpc.Reflection/Grpc.Reflection.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<IsGrpcPublishedPackage>true</IsGrpcPublishedPackage>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TargetFrameworks>net462;netstandard1.5;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

Expand Down

0 comments on commit 46480fc

Please sign in to comment.