Remove unnecessary Alias

pull/39/head
FreddyD 6 years ago
parent a1a6736f40
commit 28a4470ffd

@ -42,7 +42,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Data.Jet.Performance
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build help", "build help", "{20B764C9-8664-4609-A743-8CF32BA6CA69}"
ProjectSection(SolutionItems) = preProject
Directory.Build.targets = Directory.Build.targets
NuGet.Config = NuGet.Config
EndProjectSection
EndProject

@ -22,11 +22,6 @@
- C:\Program Files\Common Files\System\ado
- C:\Program Files (x86)\Common Files\System\ado
## Directory.Build.targets
- Used due to conflict between the EF Core 2.2 and .NET Core 3.1 versions of IAsyncGrouping<,> & IAsyncEnumerable<>. Invoked via setting an Alias attribute on the appropriate PackageReference.
- Affects SharedTypeExtensions.cs
- Likely is not be needed after upgrading to use EF Core 3.1 on .NET Core 3.1
## Test Design Guidelines
- Consider extracting out the following settings to a single, global test configuration file:
- Provider [string]: "Microsoft.ACE.OLEDB.15.0"

@ -65,10 +65,4 @@
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<!-- Will need an alias when using EFCore 2.2 & .NET Core 3.1 (Alias via Directory.Build.targets) -->
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="System.Interactive.Async" Version="3.2.0" Alias="SystemInteractiveAsync" />
</ItemGroup>
</Project>

@ -1,8 +1,4 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if NETCOREAPP3_1
extern alias SystemInteractiveAsync;
#endif
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
@ -65,17 +61,11 @@ namespace System
public static bool IsGrouping(this Type type) => IsGrouping(type.GetTypeInfo());
#if NETCOREAPP3_1
private static bool IsGrouping(TypeInfo type)
=> type.IsGenericType
&& (type.GetGenericTypeDefinition() == typeof(IGrouping<,>)
|| type.GetGenericTypeDefinition() == typeof(SystemInteractiveAsync::System.Linq.IAsyncGrouping<,>));
#else
// TODO: Is this method ever actually called?
private static bool IsGrouping(TypeInfo type)
=> type.IsGenericType
&& (type.GetGenericTypeDefinition() == typeof(IGrouping<,>)
|| type.GetGenericTypeDefinition() == typeof(IAsyncGrouping<,>));
#endif
=> type.IsGenericType
&& (type.GetGenericTypeDefinition() == typeof(IGrouping<,>)
|| type.GetGenericTypeDefinition() == typeof(IAsyncGrouping<,>));
public static Type UnwrapEnumType(this Type type)
{
@ -102,15 +92,9 @@ namespace System
return sequenceType;
}
#if NETCOREAPP3_1
public static Type TryGetSequenceType(this Type type)
=> type.TryGetElementType(typeof(IEnumerable<>))
?? type.TryGetElementType(typeof(SystemInteractiveAsync::System.Collections.Generic.IAsyncEnumerable<>));
#else
public static Type TryGetSequenceType(this Type type)
=> type.TryGetElementType(typeof(IEnumerable<>))
?? type.TryGetElementType(typeof(IAsyncEnumerable<>));
#endif
public static Type TryGetElementType(this Type type, Type interfaceOrBaseType)
{

Loading…
Cancel
Save