Skip to content

Commit 9f54480

Browse files
committed
Switch To C# 8 & Core APP 3
1 parent 2674b0a commit 9f54480

File tree

7 files changed

+26
-34
lines changed

7 files changed

+26
-34
lines changed

async-enumerable-dotnet-benchmark/async-enumerable-dotnet-benchmark.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.1</TargetFramework>
5+
<TargetFramework>netcoreapp3.0</TargetFramework>
66
<RootNamespace>async_enumerable_dotnet_benchmark</RootNamespace>
77
<LangVersion>latest</LangVersion>
88
</PropertyGroup>

async-enumerable-dotnet-test/AsyncEnumerableTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,18 +190,18 @@ static AsyncEnumerableTest()
190190
Defaults.Add(typeof(long), 1L);
191191

192192
Defaults.Add(typeof(IEnumerable<int>), Enumerable.Empty<int>());
193-
Defaults.Add(typeof(IAsyncEnumerable<int>), AsyncEnumerable.Empty<int>());
194-
Defaults.Add(typeof(IAsyncEnumerable<int>[]), new[] { AsyncEnumerable.Empty<int>() });
193+
Defaults.Add(typeof(async_enumerable_dotnet.IAsyncEnumerable<int>), AsyncEnumerable.Empty<int>());
194+
Defaults.Add(typeof(async_enumerable_dotnet.IAsyncEnumerable<int>[]), new[] { AsyncEnumerable.Empty<int>() });
195195

196196
Defaults.Add(typeof(Func<int>), (Func<int>)(() => 1));
197197
Defaults.Add(typeof(Func<int, bool>), (Func<int, bool>)(v => true));
198198
Defaults.Add(typeof(Func<int, int>), (Func<int, int>)(v => v));
199199
Defaults.Add(typeof(Func<int, int, int>), (Func<int, int, int>)((v, w) => v));
200200
Defaults.Add(typeof(Func<int[], int>), (Func<int[], int>)(v => v[0]));
201-
Defaults.Add(typeof(Func<IAsyncEnumerable<int>>), (Func<IAsyncEnumerable<int>>)AsyncEnumerable.Empty<int>);
201+
Defaults.Add(typeof(Func<async_enumerable_dotnet.IAsyncEnumerable<int>>), (Func<async_enumerable_dotnet.IAsyncEnumerable<int>>)AsyncEnumerable.Empty<int>);
202202
Defaults.Add(typeof(Func<int, IEnumerable<int>>), (Func<int, IEnumerable<int>>)(v => Enumerable.Empty<int>()));
203-
Defaults.Add(typeof(Func<int, IAsyncEnumerable<int>>), (Func<int, IAsyncEnumerable<int>>)(v => AsyncEnumerable.Empty<int>()));
204-
Defaults.Add(typeof(Func<Exception, IAsyncEnumerable<int>>), (Func<Exception, IAsyncEnumerable<int>>)(v => AsyncEnumerable.Empty<int>()));
203+
Defaults.Add(typeof(Func<int, async_enumerable_dotnet.IAsyncEnumerable<int>>), (Func<int, async_enumerable_dotnet.IAsyncEnumerable<int>>)(v => AsyncEnumerable.Empty<int>()));
204+
Defaults.Add(typeof(Func<Exception, async_enumerable_dotnet.IAsyncEnumerable<int>>), (Func<Exception, async_enumerable_dotnet.IAsyncEnumerable<int>>)(v => AsyncEnumerable.Empty<int>()));
205205
Defaults.Add(typeof(Func<int, Task>), (Func<int, Task>)(v => null));
206206
Defaults.Add(typeof(Func<int, Task<int>>), (Func<int, Task<int>>)(v => null));
207207
Defaults.Add(typeof(Func<int, Task<bool>>), (Func<int, Task<bool>>)(v => null));
@@ -214,7 +214,7 @@ static AsyncEnumerableTest()
214214
Defaults.Add(typeof(Func<long, Task<bool>>), (Func<long, Task<bool>>)(v => Task.FromResult(false)));
215215
Defaults.Add(typeof(Func<ISet<int>>), (Func<ISet<int>>)(() => null));
216216

217-
Defaults.Add(typeof(Func<IAsyncEnumerable<int>, IAsyncEnumerable<int>>), (Func<IAsyncEnumerable<int>, IAsyncEnumerable<int>>)(w => w));
217+
Defaults.Add(typeof(Func<async_enumerable_dotnet.IAsyncEnumerable<int>, async_enumerable_dotnet.IAsyncEnumerable<int>>), (Func<async_enumerable_dotnet.IAsyncEnumerable<int>, async_enumerable_dotnet.IAsyncEnumerable<int>>)(w => w));
218218

219219
Defaults.Add(typeof(Action), (Action)(() => { }));
220220
Defaults.Add(typeof(Action<int>), (Action<int>)(v => { }));

async-enumerable-dotnet-test/ConcatTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ await AsyncEnumerable.Concat(
2828
[Fact]
2929
public async void Enumerable_Normal()
3030
{
31-
await AsyncEnumerable.Concat((IEnumerable<IAsyncEnumerable<int>>)new[] {
31+
await AsyncEnumerable.Concat((IEnumerable<async_enumerable_dotnet.IAsyncEnumerable<int>>)new[] {
3232
AsyncEnumerable.Range(1, 3),
3333
AsyncEnumerable.Empty<int>(),
3434
AsyncEnumerable.FromArray(4, 5, 6, 7),

async-enumerable-dotnet-test/TestHelper.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ namespace async_enumerable_dotnet_test
1616
{
1717
internal static class TestHelper
1818
{
19-
public static ValueTask AssertResult<T>(this IAsyncEnumerable<T> source, params T[] values)
19+
public static ValueTask AssertResult<T>(this async_enumerable_dotnet.IAsyncEnumerable<T> source, params T[] values)
2020
{
2121
return AssertResult(source.GetAsyncEnumerator(), values);
2222
}
2323

2424
// ReSharper disable once ParameterOnlyUsedForPreconditionCheck.Global
25-
public static async ValueTask AssertResult<T>(this IAsyncEnumerator<T> source, params T[] values)
25+
public static async ValueTask AssertResult<T>(this async_enumerable_dotnet.IAsyncEnumerator<T> source, params T[] values)
2626
{
2727
var main = default(Exception);
2828
var dispose = default(Exception);
@@ -68,18 +68,18 @@ public static async ValueTask AssertResult<T>(this IAsyncEnumerator<T> source, p
6868
}
6969
}
7070

71-
public static async ValueTask AssertThen<T>(this IAsyncEnumerable<T> source, Action<IList<T>> outcomeHandler)
71+
public static async ValueTask AssertThen<T>(this async_enumerable_dotnet.IAsyncEnumerable<T> source, Action<IList<T>> outcomeHandler)
7272
{
7373
var list = await source.ToListAsync();
7474
outcomeHandler(list);
7575
}
7676

77-
public static ValueTask AssertResultSet<T>(this IAsyncEnumerable<T> source, params T[] values)
77+
public static ValueTask AssertResultSet<T>(this async_enumerable_dotnet.IAsyncEnumerable<T> source, params T[] values)
7878
{
7979
return AssertResultSet(source, EqualityComparer<T>.Default, values);
8080
}
8181

82-
public static async ValueTask AssertResultSet<T>(this IAsyncEnumerable<T> source, IEqualityComparer<T> comparer, params T[] values)
82+
public static async ValueTask AssertResultSet<T>(this async_enumerable_dotnet.IAsyncEnumerable<T> source, IEqualityComparer<T> comparer, params T[] values)
8383
{
8484
var set = new HashSet<T>(values, comparer);
8585
var en = source.GetAsyncEnumerator();
@@ -121,13 +121,13 @@ private static string AsString(object obj)
121121
return obj != null ? obj.ToString() : "null";
122122
}
123123

124-
public static ValueTask AssertFailure<T>(this IAsyncEnumerable<T> source, Type exception, params T[] values)
124+
public static ValueTask AssertFailure<T>(this async_enumerable_dotnet.IAsyncEnumerable<T> source, Type exception, params T[] values)
125125
{
126126
return AssertFailure(source.GetAsyncEnumerator(), exception, values);
127127
}
128128

129129
// ReSharper disable once ParameterOnlyUsedForPreconditionCheck.Global
130-
public static async ValueTask AssertFailure<T>(this IAsyncEnumerator<T> source, Type exception,
130+
public static async ValueTask AssertFailure<T>(this async_enumerable_dotnet.IAsyncEnumerator<T> source, Type exception,
131131
params T[] values)
132132
{
133133
var idx = 0;
@@ -164,7 +164,7 @@ public static async ValueTask AssertFailure<T>(this IAsyncEnumerator<T> source,
164164
/// </summary>
165165
/// <param name="timestamps">The params array of timestamps.</param>
166166
/// <returns>The new IAsyncEnumerable sequence.</returns>
167-
internal static IAsyncEnumerable<long> TimeSequence(params long[] timestamps)
167+
internal static async_enumerable_dotnet.IAsyncEnumerable<long> TimeSequence(params long[] timestamps)
168168
{
169169
return AsyncEnumerable.FromArray(timestamps)
170170
.FlatMap(v => AsyncEnumerable.Timer(TimeSpan.FromMilliseconds(v)).Map(w => v));
@@ -177,7 +177,7 @@ internal static IAsyncEnumerable<long> TimeSequence(params long[] timestamps)
177177
/// <param name="error">Th error to append</param>
178178
/// <typeparam name="TSource">The element type of the sequence</typeparam>
179179
/// <returns>The new IAsyncEnumerable instance.</returns>
180-
internal static IAsyncEnumerable<TSource> WithError<TSource>(this IAsyncEnumerable<TSource> source, Exception error)
180+
internal static async_enumerable_dotnet.IAsyncEnumerable<TSource> WithError<TSource>(this async_enumerable_dotnet.IAsyncEnumerable<TSource> source, Exception error)
181181
{
182182
return source.ConcatWith(AsyncEnumerable.Error<TSource>(error));
183183
}

async-enumerable-dotnet-test/async-enumerable-dotnet-test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.1</TargetFramework>
4+
<TargetFramework>netcoreapp3.0</TargetFramework>
55
<RootNamespace>async_enumerable_dotnet_test</RootNamespace>
66

77
<IsPackable>false</IsPackable>

async-enumerable-dotnet/AsyncEnumerable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public static IAsyncEnumerable<T> Take<T>(this IAsyncEnumerable<T> source, long
273273
/// <returns>The new IAsyncEnumerable instance.</returns>
274274
public static IAsyncEnumerable<int> Range(int start, int count)
275275
{
276-
return new Range(start, start + count);
276+
return new impl.Range(start, start + count);
277277
}
278278

279279
/// <summary>

async-enumerable-dotnet/async-enumerable-dotnet.csproj

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,23 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp2.1;netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.0;netstandard2.1</TargetFrameworks>
55
<RootNamespace>async_enumerable_dotnet</RootNamespace>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77
<LangVersion>latest</LangVersion>
88
<PackageId>akarnokd.async-enumerable-dotnet</PackageId>
9-
<Version>0.0.2.0</Version>
9+
<Version>0.0.3.0</Version>
1010
<Authors>David Karnok</Authors>
1111
<Company />
12-
<AssemblyVersion>0.0.2.0</AssemblyVersion>
13-
<FileVersion>0.0.2.0</FileVersion>
12+
<AssemblyVersion>0.0.3.0</AssemblyVersion>
13+
<FileVersion>0.0.3.0</FileVersion>
1414
<PackageTags>async, concurrency, async-enumerable, operators, async-sequence</PackageTags>
1515
<RepositoryUrl>https://github.com/akarnokd/async-enumerable-dotnet</RepositoryUrl>
1616
<PackageProjectUrl>https://github.com/akarnokd/async-enumerable-dotnet#getting-started</PackageProjectUrl>
17-
<Description>Experimental operators for the upcoming C# 8 IAsyncEnumerables.</Description>
17+
<Description>Experimental operators for the C# 8 IAsyncEnumerables.</Description>
1818
<Copyright>(C) David Karnok</Copyright>
1919
<PackageLicenseUrl>https://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
20-
<PackageReleaseNotes>Bugfixes and simplifications in many operators.
21-
22-
New operators:
23-
- Any
24-
- All
25-
- Count
26-
- ElementAt
27-
- IsEmpty
28-
</PackageReleaseNotes>
20+
<PackageReleaseNotes>Switching to C# 8</PackageReleaseNotes>
2921
<RepositoryType>Github</RepositoryType>
3022
<Product>Async Enumerable operators for .NET</Product>
3123
</PropertyGroup>

0 commit comments

Comments
 (0)