Skip to content

Commit

Permalink
Merge branch 'IxAsyncCSharp8' of https://github.com/dotnet/reactive i…
Browse files Browse the repository at this point in the history
…nto IxAsyncCSharp8
  • Loading branch information
bartdesmet committed Feb 20, 2019
2 parents b51fbd3 + 38cf3f1 commit 4248578
Show file tree
Hide file tree
Showing 15 changed files with 430 additions and 254 deletions.
3 changes: 3 additions & 0 deletions Ix.NET/Source/Directory.build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<PropertyGroup Condition="'$(TargetFramework)' == 'net45'">
<DefineConstants>$(DefineConstants);NO_ARRAY_EMPTY;NO_TASK_FROMEXCEPTION</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net46'">
<DefineConstants>$(DefineConstants);USE_ASYNC_ITERATOR</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0' or '$(TargetFramework)' == 'netstandard2.1'">
<!--
NB: USE_ASYNC_ITERATOR relies on members in the framework only present in .NET Core 3.0 Preview 2 at the moment:
Expand Down
117 changes: 0 additions & 117 deletions Ix.NET/Source/System.Interactive.Async.Providers/Reflection.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>Interactive Extensions Async Providers Library used to build query providers and express queries over async enumerable sequences.</Description>
<AssemblyTitle>Interactive Extensions - Async Providers Library</AssemblyTitle>
<TargetFrameworks>net45;net46;netstandard1.4;netstandard2.0;netcoreapp3.0</TargetFrameworks>
<TargetFrameworks>net45;net46;netstandard2.0;netcoreapp3.0</TargetFrameworks>
<PackageTags>Ix;Interactive;Extensions;Enumerable;Asynchronous</PackageTags>
</PropertyGroup>

Expand All @@ -16,10 +16,6 @@
<ProjectReference Include="..\System.Linq.Async.Queryable\System.Linq.Async.Queryable.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.0'">
<PackageReference Include="System.Linq.Queryable" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
<None Update="System\Linq\AsyncQueryableEx.Generated.tt" Generator="TextTemplatingFileGenerator" LastGenOutput="AsyncQueryableEx.Generated.cs" />
<Compile Update="System\Linq\AsyncQueryableEx.Generated.cs" DesignTime="True" AutoGen="True" DependentUpon="AsyncQueryableEx.Generated.tt" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>Interactive Extensions Async Library used to express queries over asynchronous enumerable sequences.</Description>
<AssemblyTitle>Interactive Extensions - Async Library</AssemblyTitle>
<TargetFrameworks>net45;net46;netstandard1.4;netstandard2.0;netcoreapp3.0</TargetFrameworks>
<TargetFrameworks>net45;net46;netstandard2.0;netcoreapp3.0</TargetFrameworks>
<PackageTags>Ix;Interactive;Extensions;Enumerable;Asynchronous</PackageTags>
</PropertyGroup>

Expand Down
117 changes: 0 additions & 117 deletions Ix.NET/Source/System.Linq.Async.Queryable/Reflection.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net45;net46;netstandard1.4;netstandard2.0;netcoreapp3.0</TargetFrameworks>
<TargetFrameworks>net45;net46;netstandard2.0;netcoreapp3.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

using System.Collections.Generic;
using System.Linq.Expressions;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ protected override Expression VisitParameter(ParameterExpression node)

private static Type GetPublicType(Type type)
{
if (!type.IsNestedPrivate())
if (!type.GetTypeInfo().IsNestedPrivate)
{
return type;
}

foreach (var ifType in type.GetInterfaces())
{
if (ifType.IsGenericType())
if (ifType.GetTypeInfo().IsGenericType)
{
var def = ifType.GetGenericTypeDefinition();
if (def == typeof(IAsyncEnumerable<>) || def == typeof(IAsyncGrouping<,>))
Expand Down Expand Up @@ -461,15 +461,15 @@ private static Type FindGenericType(Type definition, Type type)
//
// If the current type matches the specified definition, return.
//
if (type.IsGenericType() && type.GetGenericTypeDefinition() == definition)
if (type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == definition)
{
return type;
}

//
// Probe all interfaces implemented by the current type.
//
if (definition.IsInterface())
if (definition.GetTypeInfo().IsInterface)
{
foreach (var ifType in type.GetInterfaces())
{
Expand All @@ -484,7 +484,7 @@ private static Type FindGenericType(Type definition, Type type)
//
// Continue up the type hierarchy.
//
type = type.GetBaseType();
type = type.GetTypeInfo().BaseType;
}

return null;
Expand Down
4 changes: 2 additions & 2 deletions Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="MSBuild.Sdk.Extras">

<PropertyGroup>
<TargetFrameworks>net45;net46;netstandard1.4;netstandard2.0;netcoreapp3.0</TargetFrameworks>
<TargetFrameworks>net45;net46;netstandard2.0;netcoreapp3.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -18,7 +18,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.2" />
<PackageReference Condition="'$(TargetFramework)' != 'netcoreapp3.0' " Include="System.Threading.Tasks.Extensions" Version="4.5.2" />
<ReferenceAssemblyProjectReference Include="..\refs\System.Linq.Async.Ref\System.Linq.Async.Ref.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#if !BCL_HAS_CONFIGUREAWAIT

using System;
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace System.Diagnostics
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Struct, Inherited = false)]
internal sealed class StackTraceHiddenAttribute : Attribute
{
public StackTraceHiddenAttribute() { }
}
}
#endif
Loading

0 comments on commit 4248578

Please sign in to comment.