|
@@ -7,6 +7,9 @@ namespace Invercargill {
|
|
|
|
|
|
|
|
protected Enumerable<T> inner { get; set; }
|
|
protected Enumerable<T> inner { get; set; }
|
|
|
|
|
|
|
|
|
|
+ // NOTE: Do not implement debug functions here (debug_type, debug_dump, or debug_trace)
|
|
|
|
|
+ // as that will make the proxy invisable to the debug output, and can also cause nasty loops.
|
|
|
|
|
+
|
|
|
public override EnumerableInfo get_info() {
|
|
public override EnumerableInfo get_info() {
|
|
|
return new EnumerableInfo.infer_single(this, EnumerableCategory.PROXY, inner);
|
|
return new EnumerableInfo.infer_single(this, EnumerableCategory.PROXY, inner);
|
|
|
}
|
|
}
|
|
@@ -38,7 +41,23 @@ namespace Invercargill {
|
|
|
public override T[] to_array() {
|
|
public override T[] to_array() {
|
|
|
return inner.to_array();
|
|
return inner.to_array();
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ public override Buffer<T> to_buffer() {
|
|
|
|
|
+ return inner.to_buffer();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override ImmutableBuffer<T> to_immutable_buffer() {
|
|
|
|
|
+ return inner.to_immutable_buffer();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override RingBuffer<T> to_ring_buffer(uint? size = null) {
|
|
|
|
|
+ return inner.to_ring_buffer(size);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override ulong count_ulong(PredicateDelegate<T>? predicate = null) {
|
|
|
|
|
+ return inner.count_ulong(predicate);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public override uint count(PredicateDelegate<T>? predicate = null) {
|
|
public override uint count(PredicateDelegate<T>? predicate = null) {
|
|
|
return inner.count(predicate);
|
|
return inner.count(predicate);
|
|
|
}
|
|
}
|
|
@@ -110,7 +129,75 @@ namespace Invercargill {
|
|
|
public override T min(TransformDelegate<T, int> int_delegate) {
|
|
public override T min(TransformDelegate<T, int> int_delegate) {
|
|
|
return inner.min(int_delegate);
|
|
return inner.min(int_delegate);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> from(owned PredicateDelegate<T> predicate) {
|
|
|
|
|
+ return inner.from((owned)predicate);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> until(owned PredicateDelegate<T> predicate) {
|
|
|
|
|
+ return inner.until((owned)predicate);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<TOut> select_where<TOut>(owned FilterTransformDelegate<T, TOut> transform) {
|
|
|
|
|
+ return inner.select_where<TOut>((owned)transform);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Attempts<TOut> attempt_select<TOut>(owned AttemptTransformDelegate<T, TOut> transform) {
|
|
|
|
|
+ return inner.attempt_select<TOut>((owned)transform);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Attempts<SelectionContext<T, TOut>> attempt_contextualised_select<TOut>(owned AttemptTransformDelegate<T, TOut> transform) {
|
|
|
|
|
+ return inner.attempt_contextualised_select<TOut>((owned)transform);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Attempts<TOut> attempt_select_nested<TOut>(owned AttemptTransformDelegate<T, Enumerable<Attempt<TOut>>> transform) {
|
|
|
|
|
+ return inner.attempt_select_nested<TOut>((owned)transform);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Attempts<T> attempt_where(owned AttemptPredicate<T> predicate) {
|
|
|
|
|
+ return inner.attempt_where((owned)predicate);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<Pair<TFirst, TSecond>> select_pairs<TFirst, TSecond>(owned TransformDelegate<T, TFirst> transform1, owned TransformDelegate<T, TSecond> transform2) {
|
|
|
|
|
+ return inner.select_pairs<TFirst, TSecond>((owned)transform1, (owned)transform2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> order_by<TKey>(owned TransformDelegate<T, TKey> key_selector, owned CompareDelegate<TKey>? comparitor = null) {
|
|
|
|
|
+ return inner.order_by<TKey>((owned)key_selector, (owned)comparitor);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> order_by_descending<TKey>(owned TransformDelegate<T, TKey> key_selector, owned CompareDelegate<TKey>? comparitor = null) {
|
|
|
|
|
+ return inner.order_by_descending<TKey>((owned)key_selector, (owned)comparitor);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> order_by_complex(ItemDelegate<OrderConfiguration<T>> config) {
|
|
|
|
|
+ return inner.order_by_complex(config);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> skip_last(uint count) {
|
|
|
|
|
+ return inner.skip_last(count);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> take_last(uint count) {
|
|
|
|
|
+ return inner.take_last(count);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<TOut> of_type<TOut>() {
|
|
|
|
|
+ return inner.of_type<TOut>();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> parallel_where<T>(owned PredicateDelegate<T> predicate, uint workers = 0) {
|
|
|
|
|
+ return inner.parallel_where<T>((owned)predicate, workers);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<SelectionContext<T, TOut>> parallel_contextualised_select<TOut>(owned TransformDelegate<T, TOut> transform) {
|
|
|
|
|
+ return inner.parallel_contextualised_select<TOut>((owned)transform);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<TOut> zip<TOther, TOut>(Enumerable<TOther> other, owned ZipperTransformDelegate<T, TOther, TOut> transform) {
|
|
|
|
|
+ return inner.zip<TOther, TOut>(other, (owned)transform);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public override bool contains(T item, EqualityDelegate<T>? equator = null) {
|
|
public override bool contains(T item, EqualityDelegate<T>? equator = null) {
|
|
|
return inner.contains(item, equator);
|
|
return inner.contains(item, equator);
|
|
|
}
|
|
}
|
|
@@ -134,7 +221,71 @@ namespace Invercargill {
|
|
|
public override bool matches(Enumerable<T> other, EqualityDelegate<T> equals) {
|
|
public override bool matches(Enumerable<T> other, EqualityDelegate<T> equals) {
|
|
|
return inner.matches(other, equals);
|
|
return inner.matches(other, equals);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> act(ItemDelegate<T> handler) {
|
|
|
|
|
+ return inner.act(handler);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> distinct(owned EqualityDelegate<T>? comparison = null) {
|
|
|
|
|
+ return inner.distinct((owned)comparison);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> distinct_by<TProp>(owned TransformDelegate<T, TProp> property_selector, owned EqualityDelegate<TProp>? property_equality) {
|
|
|
|
|
+ return inner.distinct_by<TProp>((owned)property_selector, (owned)property_equality);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<Grouping<TKey, T>> group_by<TKey>(owned TransformDelegate<T, TKey> key_selector, owned EqualityDelegate<TKey>? key_equality = null) {
|
|
|
|
|
+ return inner.group_by<TKey>((owned)key_selector, (owned)key_equality);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> combine_by<TKey>(Enumerable<T> other, owned TransformDelegate<T, TKey> key_selector, owned HashDelegate<TKey>? hash_func = null, owned EqualityDelegate<TKey>? equal_func = null) {
|
|
|
|
|
+ return inner.combine_by<TKey>(other, (owned)key_selector, (owned)hash_func, (owned)equal_func);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> combine(Enumerable<T> other, owned HashDelegate<T>? hash_func = null, owned EqualityDelegate<T>? equal_func = null) {
|
|
|
|
|
+ return inner.combine(other, (owned)hash_func, (owned)equal_func);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> common_by<TKey>(Enumerable<T> other, owned TransformDelegate<T, TKey> key_selector, owned HashDelegate<TKey>? hash_func = null, owned EqualityDelegate<TKey>? equal_func = null) {
|
|
|
|
|
+ return inner.common_by<TKey>(other, (owned)key_selector, (owned)hash_func, (owned)equal_func);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> common(Enumerable<T> other, owned HashDelegate<T>? hash_func = null, owned EqualityDelegate<T>? equal_func = null) {
|
|
|
|
|
+ return inner.common(other, (owned)hash_func, (owned)equal_func);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> exclude_by<TKey>(Enumerable<T> other, owned TransformDelegate<T, TKey> key_selector, owned HashDelegate<TKey>? hash_func = null, owned EqualityDelegate<TKey>? equal_func = null) {
|
|
|
|
|
+ return inner.exclude_by<TKey>(other, (owned)key_selector, (owned)hash_func, (owned)equal_func);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> exclude(Enumerable<T> other, owned HashDelegate<T>? hash_func = null, owned EqualityDelegate<T>? equal_func = null) {
|
|
|
|
|
+ return inner.exclude(other, (owned)hash_func, (owned)equal_func);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> non_common_by<TKey>(Enumerable<T> other, owned TransformDelegate<T, TKey> key_selector, owned HashDelegate<TKey>? hash_func = null, owned EqualityDelegate<TKey>? equal_func = null) {
|
|
|
|
|
+ return inner.non_common_by<TKey>(other, (owned)key_selector, (owned)hash_func, (owned)equal_func);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> non_common(Enumerable<T> other, owned HashDelegate<T>? hash_func = null, owned EqualityDelegate<T>? equal_func = null) {
|
|
|
|
|
+ return inner.non_common(other, (owned)hash_func, (owned)equal_func);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> prefix_with(T item, uint times = 1) {
|
|
|
|
|
+ return inner.prefix_with(item, times);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Partition<T> partition(PredicateDelegate<T> test) {
|
|
|
|
|
+ return inner.partition(test);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override T element_at(uint index) throws SequenceError {
|
|
|
|
|
+ return inner.element_at(index);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override T? element_at_or_default(uint index) {
|
|
|
|
|
+ return inner.element_at_or_default(index);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public override Enumerable<T> suffix_with(T item, uint times = 1) {
|
|
public override Enumerable<T> suffix_with(T item, uint times = 1) {
|
|
|
return inner.suffix_with(item, times);
|
|
return inner.suffix_with(item, times);
|
|
|
}
|
|
}
|
|
@@ -201,10 +352,6 @@ namespace Invercargill {
|
|
|
return inner.select_to_dictionary<TKey, TValue>(key_selecter, value_selecter, key_hash_func, key_equal_func);
|
|
return inner.select_to_dictionary<TKey, TValue>(key_selecter, value_selecter, key_hash_func, key_equal_func);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public override Enumerable<Pair<TFirst, TSecond>> select_pairs<TFirst, TSecond>(owned TransformDelegate<T, TFirst> transform1, owned TransformDelegate<T, TSecond> transform2) {
|
|
|
|
|
- return inner.select_pairs<TFirst, TSecond>((owned) transform1, (owned) transform2);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
public override Enumerable<PositionItemPair<T>> with_positions() {
|
|
public override Enumerable<PositionItemPair<T>> with_positions() {
|
|
|
return inner.with_positions();
|
|
return inner.with_positions();
|
|
|
}
|
|
}
|
|
@@ -215,18 +362,6 @@ namespace Invercargill {
|
|
|
return inner.to_elements();
|
|
return inner.to_elements();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public override Enumerable<TOut> select_where<TOut>(owned FilterTransformDelegate<T, TOut> transform) {
|
|
|
|
|
- return inner.select_where<TOut>((owned)transform);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public override Attempts<TOut> attempt_select<TOut>(owned AttemptTransformDelegate<T, TOut> transform) {
|
|
|
|
|
- return inner.attempt_select<TOut>((owned)transform);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public override Attempts<TOut> attempt_select_nested<TOut>(owned AttemptTransformDelegate<T, Enumerable<Attempt<TOut>>> transform) {
|
|
|
|
|
- return inner.attempt_select_nested<TOut>((owned)transform);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
public override Enumerable<T> cache() {
|
|
public override Enumerable<T> cache() {
|
|
|
return inner.cache();
|
|
return inner.cache();
|
|
|
}
|
|
}
|
|
@@ -238,7 +373,47 @@ namespace Invercargill {
|
|
|
public override Enumerable<T> as_enumerable() {
|
|
public override Enumerable<T> as_enumerable() {
|
|
|
return inner.as_enumerable();
|
|
return inner.as_enumerable();
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<Enumerable<T>> chunk(uint chunk_size) {
|
|
|
|
|
+ return inner.chunk(chunk_size);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> cycle(uint cycles = -1) {
|
|
|
|
|
+ return inner.cycle(cycles);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<Grouping<TKey, T>> group_adjacent_by<TKey>(owned TransformDelegate<T, TKey> key_selector, owned EqualityDelegate<TKey>? key_equality = null) {
|
|
|
|
|
+ return inner.group_adjacent_by<TKey>((owned)key_selector, (owned)key_equality);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<KeyCountPair<TKey>> histogram_by<TKey>(owned TransformDelegate<T, TKey> key_selector, owned EqualityDelegate<TKey>? key_equality = null) {
|
|
|
|
|
+ return inner.histogram_by<TKey>((owned)key_selector, (owned)key_equality);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<KeyCountPair<T>> histogram(owned EqualityDelegate<T>? key_equality = null) {
|
|
|
|
|
+ return inner.histogram((owned)key_equality);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> reverse() {
|
|
|
|
|
+ return inner.reverse();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<Enumerable<T>> window(uint window_size) {
|
|
|
|
|
+ return inner.window(window_size);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> pad_end(uint minimum_length, T pad_item) {
|
|
|
|
|
+ return inner.pad_end(minimum_length, pad_item);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<T> pad_start(uint minimum_length, T pad_item) {
|
|
|
|
|
+ return inner.pad_start(minimum_length, pad_item);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override Enumerable<TOut> scan<TOut>(TOut initial_value, owned AggregateDelegate<T, TOut> scanning_delegate) {
|
|
|
|
|
+ return inner.scan<TOut>(initial_value, (owned)scanning_delegate);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|