Skip to content

Commit b48c163

Browse files
author
Meerow
authored
Rework implicit ctors and multiple other improvements
Rework implicit ctors and multiple other improvements
2 parents 55cf8b4 + 5450407 commit b48c163

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+2487
-500
lines changed

src/Yaapii.Atoms/Collection/ArrayListAsCollection.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
using System.Collections;
2424
using System.Collections.Concurrent;
25-
using Yaapii.Atoms.Scalar;
25+
using Yaapii.Atoms.Func;
2626

2727
namespace Yaapii.Atoms.Collection
2828
{

src/Yaapii.Atoms/Collection/CollectionOf.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ public CollectionOf(IEnumerable<T> src) : base(
6666

6767
public static class CollectionOf
6868
{
69-
public static CollectionOf<T> New<T>(params T[] array) => new CollectionOf<T>(array);
69+
public static ICollection<T> New<T>(params T[] array) => new CollectionOf<T>(array);
7070

71-
public static CollectionOf<T> New<T>(IEnumerator<T> src) => new CollectionOf<T>(src);
71+
public static ICollection<T> New<T>(IEnumerator<T> src) => new CollectionOf<T>(src);
7272

73-
public static CollectionOf<T> New<T>(IEnumerable<T> src) => new CollectionOf<T>(src);
73+
public static ICollection<T> New<T>(IEnumerable<T> src) => new CollectionOf<T>(src);
7474

7575
}
7676
}

src/Yaapii.Atoms/Collection/Filtered.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ public Filtered(Func<T, Boolean> func, IEnumerable<T> src) : base(
8585

8686
public static class Filtered
8787
{
88-
public static Filtered<T> New<T>(Func<T, Boolean> func, IEnumerable<T> src) => new Filtered<T>(func, src);
89-
public static Filtered<T> New<T>(Func<T, Boolean> func, IEnumerator<T> src) => new Filtered<T>(func, src);
90-
public static Filtered<T> New<T>(Func<T, Boolean> func, T item1, T item2, params T[] items) => new Filtered<T>(func, item1, item2, items);
88+
public static ICollection<T> New<T>(Func<T, Boolean> func, IEnumerable<T> src) => new Filtered<T>(func, src);
89+
public static ICollection<T> New<T>(Func<T, Boolean> func, IEnumerator<T> src) => new Filtered<T>(func, src);
90+
public static ICollection<T> New<T>(Func<T, Boolean> func, T item1, T item2, params T[] items) => new Filtered<T>(func, item1, item2, items);
9191
}
9292
}

src/Yaapii.Atoms/Collection/HeadOf.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ public HeadOf(int lmt, ICollection<T> src) : base(
7171

7272
public static class HeadOf
7373
{
74-
public static HeadOf<T> New<T>(int lmt, params T[] src) => new HeadOf<T>(lmt, src);
75-
public static HeadOf<T> New<T>(int lmt, ICollection<T> src) => new HeadOf<T>(lmt, src);
76-
public static HeadOf<T> New<T>(int lmt, IEnumerable<T> src) => new HeadOf<T>(lmt, src);
77-
public static HeadOf<T> New<T>(int lmt, IEnumerator<T> src) => new HeadOf<T>(lmt, src);
74+
public static ICollection<T> New<T>(int lmt, params T[] src) => new HeadOf<T>(lmt, src);
75+
public static ICollection<T> New<T>(int lmt, ICollection<T> src) => new HeadOf<T>(lmt, src);
76+
public static ICollection<T> New<T>(int lmt, IEnumerable<T> src) => new HeadOf<T>(lmt, src);
77+
public static ICollection<T> New<T>(int lmt, IEnumerator<T> src) => new HeadOf<T>(lmt, src);
7878
}
7979
}

src/Yaapii.Atoms/Collection/Joined.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ public Joined(params IEnumerable<T>[] list) : base(
4545

4646
public static class Joined
4747
{
48-
public static Joined<T> New<T>(params IEnumerable<T>[] list) => new Joined<T>(list);
48+
public static ICollection<T> New<T>(params IEnumerable<T>[] list) => new Joined<T>(list);
4949
}
5050
}

src/Yaapii.Atoms/Collection/LiveCollection.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public LiveCollection(IEnumerable<T> src) : base(
5959

6060
public static class LiveCollection
6161
{
62-
public static LiveCollection<T> New<T>(IEnumerator<T> src) => new LiveCollection<T>(src);
63-
public static LiveCollection<T> New<T>(IEnumerable<T> src) => new LiveCollection<T>(src);
62+
public static ICollection<T> New<T>(IEnumerator<T> src) => new LiveCollection<T>(src);
63+
public static ICollection<T> New<T>(IEnumerable<T> src) => new LiveCollection<T>(src);
6464
}
6565
}

src/Yaapii.Atoms/Collection/Mapped.cs

+4-8
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public sealed class Mapped<In, Out> : CollectionEnvelope<Out>
4040
/// <param name="src">source items</param>
4141
public Mapped(Func<In, Out> mapping, params In[] src) : this(mapping, new ManyOf<In>(src))
4242
{ }
43-
public static Mapped<In, Out> New(Func<In, Out> mapping, params In[] src) => new Mapped<In, Out>(mapping, src);
4443

4544
/// <summary>
4645
/// ctor
@@ -50,7 +49,6 @@ public sealed class Mapped<In, Out> : CollectionEnvelope<Out>
5049
public Mapped(Func<In, Out> mapping, IEnumerator<In> src) : this(
5150
mapping, new ManyOf<In>(src))
5251
{ }
53-
public static Mapped<In, Out> New(Func<In, Out> mapping, IEnumerator<In> src) => new Mapped<In, Out>(mapping, src);
5452

5553
/// <summary>
5654
/// ctor
@@ -60,7 +58,6 @@ public Mapped(Func<In, Out> mapping, IEnumerator<In> src) : this(
6058
public Mapped(Func<In, Out> mapping, IEnumerable<In> src) : this(
6159
mapping, new LiveCollection<In>(src))
6260
{ }
63-
public static Mapped<In, Out> New(Func<In, Out> mapping, IEnumerable<In> src) => new Mapped<In, Out>(mapping, src);
6461

6562
/// <summary>
6663
/// ctor
@@ -72,7 +69,6 @@ public Mapped(Func<In, Out> mapping, ICollection<In> src) : base(() =>
7269
false
7370
)
7471
{ }
75-
public static Mapped<In, Out> New(Func<In, Out> mapping, ICollection<In> src) => new Mapped<In, Out>(mapping, src);
7672
}
7773

7874
// <summary>
@@ -82,12 +78,12 @@ public Mapped(Func<In, Out> mapping, ICollection<In> src) : base(() =>
8278
/// <typeparam name="Out">target type</typeparam>
8379
public static class Mapped
8480
{
85-
public static Mapped<In, Out> New<In, Out>(Func<In, Out> mapping, params In[] src) => new Mapped<In, Out>(mapping, src);
81+
public static ICollection<Out> New<In, Out>(Func<In, Out> mapping, params In[] src) => new Mapped<In, Out>(mapping, src);
8682

87-
public static Mapped<In, Out> New<In, Out>(Func<In, Out> mapping, IEnumerator<In> src) => new Mapped<In, Out>(mapping, src);
83+
public static ICollection<Out> New<In, Out>(Func<In, Out> mapping, IEnumerator<In> src) => new Mapped<In, Out>(mapping, src);
8884

89-
public static Mapped<In, Out> New<In, Out>(Func<In, Out> mapping, IEnumerable<In> src) => new Mapped<In, Out>(mapping, src);
85+
public static ICollection<Out> New<In, Out>(Func<In, Out> mapping, IEnumerable<In> src) => new Mapped<In, Out>(mapping, src);
9086

91-
public static Mapped<In, Out> New<In, Out>(Func<In, Out> mapping, ICollection<In> src) => new Mapped<In, Out>(mapping, src);
87+
public static ICollection<Out> New<In, Out>(Func<In, Out> mapping, ICollection<In> src) => new Mapped<In, Out>(mapping, src);
9288
}
9389
}

src/Yaapii.Atoms/Collection/NotEmpty.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ public NotEmpty(ICollection<T> origin, Func<ICollection<T>> fallback) : base(
8080
/// </summary>
8181
public static class NotEmpty
8282
{
83-
public static NotEmpty<T> New<T>(ICollection<T> origin) => new NotEmpty<T>(origin);
83+
public static ICollection<T> New<T>(ICollection<T> origin) => new NotEmpty<T>(origin);
8484

85-
public static NotEmpty<T> New<T>(ICollection<T> origin, Func<ICollection<T>> fallback) => new NotEmpty<T>(origin, fallback);
85+
public static ICollection<T> New<T>(ICollection<T> origin, Func<ICollection<T>> fallback) => new NotEmpty<T>(origin, fallback);
8686
}
8787
}

src/Yaapii.Atoms/Collection/Reversed.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ public Reversed(ICollection<T> src) : base(
6565
/// Reversed collection.
6666
public static class Reversed
6767
{
68-
public static Reversed<T> New<T>(params T[] src) => new Reversed<T>(src);
68+
public static ICollection<T> New<T>(params T[] src) => new Reversed<T>(src);
6969

70-
public static Reversed<T> New<T>(IEnumerable<T> src) => new Reversed<T>(src);
70+
public static ICollection<T> New<T>(IEnumerable<T> src) => new Reversed<T>(src);
7171

72-
public static Reversed<T> New<T>(ICollection<T> src) => new Reversed<T>(src);
72+
public static ICollection<T> New<T>(ICollection<T> src) => new Reversed<T>(src);
7373
}
7474
}

src/Yaapii.Atoms/Collection/Solid.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ public Solid(ICollection<T> src) : base(
7676
///
7777
public static class Solid
7878
{
79-
public static Solid<T> New<T>(params T[] array) => new Solid<T>(array);
79+
public static ICollection<T> New<T>(params T[] array) => new Solid<T>(array);
8080

81-
public static Solid<T> New<T>(IEnumerator<T> src) => new Solid<T>(src);
81+
public static ICollection<T> New<T>(IEnumerator<T> src) => new Solid<T>(src);
8282

83-
public static Solid<T> New<T>(IEnumerable<T> src) => new Solid<T>(src);
83+
public static ICollection<T> New<T>(IEnumerable<T> src) => new Solid<T>(src);
8484

85-
public static Solid<T> New<T>(ICollection<T> src) => new Solid<T>(src);
85+
public static ICollection<T> New<T>(ICollection<T> src) => new Solid<T>(src);
8686
}
8787
}

src/Yaapii.Atoms/Collection/Sorted.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ public Sorted(Comparer<T> cmp, ICollection<T> src) : base(
9191
public static class Sorted
9292
{
9393
/// <summary>
94-
public static Sorted<T> New<T>(params T[] src) where T : IComparable<T> => new Sorted<T>(src);
94+
public static ICollection<T> New<T>(params T[] src) where T : IComparable<T> => new Sorted<T>(src);
9595

96-
public static Sorted<T> New<T>(IEnumerable<T> src) where T : IComparable<T> => new Sorted<T>(src);
96+
public static ICollection<T> New<T>(IEnumerable<T> src) where T : IComparable<T> => new Sorted<T>(src);
9797

98-
public static Sorted<T> New<T>(Comparer<T> cmp, params T[] src) where T : IComparable<T> => new Sorted<T>(cmp, src);
98+
public static ICollection<T> New<T>(Comparer<T> cmp, params T[] src) where T : IComparable<T> => new Sorted<T>(cmp, src);
9999

100-
public static Sorted<T> New<T>(Comparer<T> cmp, IEnumerator<T> src) where T : IComparable<T> => new Sorted<T>(cmp, src);
100+
public static ICollection<T> New<T>(Comparer<T> cmp, IEnumerator<T> src) where T : IComparable<T> => new Sorted<T>(cmp, src);
101101

102-
public static Sorted<T> New<T>(Comparer<T> cmp, ICollection<T> src) where T : IComparable<T> => new Sorted<T>(cmp, src);
102+
public static ICollection<T> New<T>(Comparer<T> cmp, ICollection<T> src) where T : IComparable<T> => new Sorted<T>(cmp, src);
103103
}
104104
}

src/Yaapii.Atoms/Collection/Sync.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,6 @@ public Sync(object syncRoot, ICollection<T> col) : base(
8686

8787
public static class Sync
8888
{
89-
public static Sync<T> New<T>(params T[] items) => new Sync<T>(items);
89+
public static ICollection<T> New<T>(params T[] items) => new Sync<T>(items);
9090
}
9191
}

src/Yaapii.Atoms/Enumerable/Contains.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public Contains(IEnumerable<T> items, Func<T, bool> match) : base(() =>
5858
/// <typeparam name="T"></typeparam>
5959
public static class Contains
6060
{
61-
public static Contains<T> New<T>(IEnumerable<T> src, T item) => new Contains<T>(src, item);
61+
public static IScalar<bool> New<T>(IEnumerable<T> src, T item) => new Contains<T>(src, item);
6262

63-
public static Contains<T> New<T>(IEnumerable<T> items, Func<T, bool> match) => new Contains<T>(items, match);
63+
public static IScalar<bool> New<T>(IEnumerable<T> items, Func<T, bool> match) => new Contains<T>(items, match);
6464
}
6565
}

src/Yaapii.Atoms/Enumerable/Cycled.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ public Cycled(IEnumerable<T> enumerable) : base(() =>
4949
/// <typeparam name="T">type of the contents</typeparam>
5050
public static class Cycled
5151
{
52-
public static Cycled<T> New<T>(IEnumerable<T> enumerable) => new Cycled<T>(enumerable);
52+
public static IEnumerable<T> New<T>(IEnumerable<T> enumerable) => new Cycled<T>(enumerable);
5353
}
5454
}

src/Yaapii.Atoms/Enumerable/Distinct.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ public static class Distinct
6666
/// The distinct elements of one or multiple Enumerables.
6767
/// </summary>
6868
/// <param name="enumerables">enumerables to get distinct elements from</param>
69-
public static Distinct<T> New<T>(params IEnumerable<T>[] enumerables) => new Distinct<T>(enumerables);
69+
public static IEnumerable<T> New<T>(params IEnumerable<T>[] enumerables) => new Distinct<T>(enumerables);
7070

7171
/// <summary>
7272
/// The distinct elements of one or multiple Enumerables.
7373
/// </summary>
7474
/// <param name="enumerables">enumerables to get distinct elements from</param>
75-
public static Distinct<T> New<T>(IEnumerable<IEnumerable<T>> enumerables) => new Distinct<T>(enumerables);
75+
public static IEnumerable<T> New<T>(IEnumerable<IEnumerable<T>> enumerables) => new Distinct<T>(enumerables);
7676
}
7777
}

src/Yaapii.Atoms/Enumerable/Divergency.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ public static class Divergency
8484
/// <summary>
8585
/// Items which do only exist in one enumerable.
8686
/// </summary>
87-
public static Divergency<T> New<T>(IEnumerable<T> a, IEnumerable<T> b, Func<T, bool> match) => new Divergency<T>(a, b, match);
87+
public static IEnumerable<T> New<T>(IEnumerable<T> a, IEnumerable<T> b, Func<T, bool> match) => new Divergency<T>(a, b, match);
8888

8989
/// <summary>
9090
/// Items which do only exist in one enumerable.
9191
/// </summary>
92-
public static Divergency<T> New<T>(IEnumerable<T> a, IEnumerable<T> b) => new Divergency<T>(a, b);
92+
public static IEnumerable<T> New<T>(IEnumerable<T> a, IEnumerable<T> b) => new Divergency<T>(a, b);
9393

9494
}
9595
}

src/Yaapii.Atoms/Enumerable/Endless.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ public static class Endless
5050
/// A <see cref="IEnumerable"/> that repeats one element infinitely.
5151
/// </summary>
5252
/// <param name="elm">element to repeat</param>
53-
public static Endless<T> New<T>(T elm) => new Endless<T>(elm);
53+
public static IEnumerable<T> New<T>(T elm) => new Endless<T>(elm);
5454
}
5555
}

src/Yaapii.Atoms/Enumerable/Filtered.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -93,22 +93,22 @@ public static class Filtered
9393
/// <param name="item1">first item to filter</param>
9494
/// <param name="item2">secound item to filter</param>
9595
/// <param name="items">other items to filter</param>
96-
public static Filtered<T> New<T>(Func<T, Boolean> fnc, T item1, T item2, params T[] items) =>
96+
public static IEnumerable<T> New<T>(Func<T, Boolean> fnc, T item1, T item2, params T[] items) =>
9797
new Filtered<T>(fnc, item1, item2, items);
9898

9999
/// <summary>
100100
/// A filtered <see cref="IEnumerable{T}"/> which filters by the given condition <see cref="Func{In, Out}"/>.
101101
/// </summary>
102102
/// <param name="src">enumerable to filter</param>
103103
/// <param name="fnc">filter function</param>
104-
public static Filtered<T> New<T>(Func<T, Boolean> fnc, IEnumerable<T> src) => new Filtered<T>(fnc, src);
104+
public static IEnumerable<T> New<T>(Func<T, Boolean> fnc, IEnumerable<T> src) => new Filtered<T>(fnc, src);
105105

106106
/// <summary>
107107
/// A filtered <see cref="IEnumerable{T}"/> which filters by the given condition <see cref="Func{In, Out}"/>.
108108
/// </summary>
109109
/// <param name="src">enumerable to filter</param>
110110
/// <param name="fnc">filter function</param>
111111
/// <param name="live">live or sticky</param>
112-
public static Filtered<T> New<T>(Func<T, Boolean> fnc, IEnumerable<T> src, bool live) => new Filtered<T>(fnc, src, live);
112+
public static IEnumerable<T> New<T>(Func<T, Boolean> fnc, IEnumerable<T> src, bool live) => new Filtered<T>(fnc, src, live);
113113
}
114114
}

src/Yaapii.Atoms/Enumerable/HeadOf.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,21 @@ public static class HeadOf
6969
/// ctor
7070
/// </summary>
7171
/// <param name="enumerable">enumerable to limit</param>
72-
public static HeadOf<T> New<T>(IEnumerable<T> enumerable) => new HeadOf<T>(enumerable);
72+
public static IEnumerable<T> New<T>(IEnumerable<T> enumerable) => new HeadOf<T>(enumerable);
7373

7474
/// <summary>
7575
/// ctor
7676
/// </summary>
7777
/// <param name="enumerable">enumerable to limit</param>
7878
/// <param name="limit">maximum item count</param>
79-
public static HeadOf<T> New<T>(IEnumerable<T> enumerable, int limit) => new HeadOf<T>(enumerable, limit);
79+
public static IEnumerable<T> New<T>(IEnumerable<T> enumerable, int limit) => new HeadOf<T>(enumerable, limit);
8080

8181
/// <summary>
8282
/// A <see cref="IEnumerable{T}"/> limited to an item maximum.
8383
/// </summary>
8484
/// <param name="enumerable">enumerable to limit</param>
8585
/// <param name="limit">maximum item count</param>
86-
public static HeadOf<T> New<T>(IEnumerable<T> enumerable, IScalar<int> limit) => new HeadOf<T>(enumerable, limit);
86+
public static IEnumerable<T> New<T>(IEnumerable<T> enumerable, IScalar<int> limit) => new HeadOf<T>(enumerable, limit);
8787
}
8888
}
8989

src/Yaapii.Atoms/Enumerable/Joined.cs

+3-17
Original file line numberDiff line numberDiff line change
@@ -159,32 +159,18 @@ public static class Joined
159159
/// </summary>
160160
/// <param name="lst">enumerable of items to join</param>
161161
/// <param name="items">array of items to join</param>
162-
public static Joined<T> New<T>(T first, T second, IEnumerable<T> lst, params T[] items) => new Joined<T>(first, second, lst, items);
163-
164-
/// <summary>
165-
/// Join a <see cref="IEnumerable{T}"/> with (multiple) single Elements.
166-
/// </summary>
167-
/// <param name="lst">enumerable of items to join</param>
168-
/// <param name="items">array of items to join</param>
169-
public static Joined<T> New<T>(T first, IEnumerable<T> lst, params T[] items) => new Joined<T>(first, lst, items);
170-
171-
/// <summary>
172-
/// Join a <see cref="IEnumerable{T}"/> with (multiple) single Elements.
173-
/// </summary>
174-
/// <param name="lst">enumerable of items to join</param>
175-
/// <param name="items">array of items to join</param>
176-
public static Joined<T> New<T>(IEnumerable<T> lst, params T[] items) => new Joined<T>(lst, items);
162+
public static IEnumerable<T> New<T>(IEnumerable<T> lst, params T[] items) => new Joined<T>(lst, items);
177163

178164
/// <summary>
179165
/// Multiple <see cref="IEnumerable{T}"/> joined together.
180166
/// </summary>
181167
/// <param name="items">enumerables to join</param>
182-
public static Joined<T> New<T>(params IEnumerable<T>[] items) => new Joined<T>(items);
168+
public static IEnumerable<T> New<T>(params IEnumerable<T>[] items) => new Joined<T>(items);
183169

184170
/// <summary>
185171
/// Multiple <see cref="IEnumerable{T}"/> joined together.
186172
/// </summary>
187173
/// <param name="items">enumerables to join</param>
188-
public static Joined<T> New<T>(IEnumerable<IEnumerable<T>> items) => new Joined<T>(items);
174+
public static IEnumerable<T> New<T>(IEnumerable<IEnumerable<T>> items) => new Joined<T>(items);
189175
}
190176
}

src/Yaapii.Atoms/Enumerable/LessThan.cs

+22
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
// MIT License
2+
//
3+
// Copyright(c) 2022 ICARUS Consulting GmbH
4+
//
5+
// Permission is hereby granted, free of charge, to any person obtaining a copy
6+
// of this software and associated documentation files (the "Software"), to deal
7+
// in the Software without restriction, including without limitation the rights
8+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
// copies of the Software, and to permit persons to whom the Software is
10+
// furnished to do so, subject to the following conditions:
11+
//
12+
// The above copyright notice and this permission notice shall be included in all
13+
// copies or substantial portions of the Software.
14+
//
15+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
// SOFTWARE.
22+
123
using System;
224
using System.Collections;
325
using Yaapii.Atoms.Scalar;

src/Yaapii.Atoms/Enumerable/LiveMany.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,18 @@ public static class LiveMany
100100
/// A <see cref="IEnumerable{T}"/> out of an array.
101101
/// </summary>
102102
/// <param name="items"></param>
103-
public static LiveMany<T> New<T>(params T[] items) => new LiveMany<T>(items);
103+
public static IEnumerable<T> New<T>(params T[] items) => new LiveMany<T>(items);
104104

105105
/// <summary>
106106
/// A <see cref="IEnumerable{T}"/> out of a <see cref="IEnumerator{T}"/> returned by a <see cref="Func{T}"/>"/>.
107107
/// </summary>
108108
/// <param name="fnc">function which retrieves enumerator</param>
109-
public static LiveMany<T> New<T>(Func<IEnumerator<T>> fnc) => new LiveMany<T>(fnc);
109+
public static IEnumerable<T> New<T>(Func<IEnumerator<T>> fnc) => new LiveMany<T>(fnc);
110110

111111
/// <summary>
112112
/// A <see cref="IEnumerable{T}"/> out of a <see cref="IEnumerator{T}"/> returned by a <see cref="Func{T}"/>"/>.
113113
/// </summary>
114114
/// <param name="fnc">function which retrieves enumerator</param>
115-
public static LiveMany<T> New<T>(Func<IEnumerable<T>> fnc) => new LiveMany<T>(fnc);
115+
public static IEnumerable<T> New<T>(Func<IEnumerable<T>> fnc) => new LiveMany<T>(fnc);
116116
}
117117
}

0 commit comments

Comments
 (0)