|
@@ -3,150 +3,150 @@ using Invercargill.Mapping;
|
|
|
|
|
|
|
|
namespace Invercargill {
|
|
namespace Invercargill {
|
|
|
|
|
|
|
|
- public abstract class StickyProxy<TEnumerable, T> : Proxy<T> {
|
|
|
|
|
|
|
+ public abstract class StickyProxy<TEnumerable, T> : Proxy<T>, Sticky<TEnumerable, T> {
|
|
|
|
|
|
|
|
- protected abstract TEnumerable rewrap(Enumerable<T> enumerable);
|
|
|
|
|
- protected abstract TEnumerable recycle();
|
|
|
|
|
|
|
+ protected abstract TEnumerable adhere(Enumerable<T> enumerable);
|
|
|
|
|
+ protected abstract TEnumerable passthrough();
|
|
|
|
|
|
|
|
public new TEnumerable where(owned PredicateDelegate<T> predicate) {
|
|
public new TEnumerable where(owned PredicateDelegate<T> predicate) {
|
|
|
- return rewrap(inner.where((owned)predicate));
|
|
|
|
|
|
|
+ return adhere(inner.where((owned)predicate));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable from(owned PredicateDelegate<T> predicate) {
|
|
public new TEnumerable from(owned PredicateDelegate<T> predicate) {
|
|
|
- return rewrap(inner.from((owned)predicate));
|
|
|
|
|
|
|
+ return adhere(inner.from((owned)predicate));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable until(owned PredicateDelegate<T> predicate) {
|
|
public new TEnumerable until(owned PredicateDelegate<T> predicate) {
|
|
|
- return rewrap(inner.until((owned)predicate));
|
|
|
|
|
|
|
+ return adhere(inner.until((owned)predicate));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable sort(owned CompareDelegate<T> compare) {
|
|
public new TEnumerable sort(owned CompareDelegate<T> compare) {
|
|
|
- return rewrap(inner.sort((owned)compare));
|
|
|
|
|
|
|
+ return adhere(inner.sort((owned)compare));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable order_by<TKey>(owned TransformDelegate<T, TKey> key_selector, owned CompareDelegate<TKey>? comparitor = null) {
|
|
public new TEnumerable order_by<TKey>(owned TransformDelegate<T, TKey> key_selector, owned CompareDelegate<TKey>? comparitor = null) {
|
|
|
- return rewrap(inner.order_by<TKey>((owned)key_selector, (owned)comparitor));
|
|
|
|
|
|
|
+ return adhere(inner.order_by<TKey>((owned)key_selector, (owned)comparitor));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable order_by_descending<TKey>(owned TransformDelegate<T, TKey> key_selector, owned CompareDelegate<TKey>? comparitor = null) {
|
|
public new TEnumerable order_by_descending<TKey>(owned TransformDelegate<T, TKey> key_selector, owned CompareDelegate<TKey>? comparitor = null) {
|
|
|
- return rewrap(inner.order_by_descending<TKey>((owned)key_selector, (owned)comparitor));
|
|
|
|
|
|
|
+ return adhere(inner.order_by_descending<TKey>((owned)key_selector, (owned)comparitor));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable order_by_complex(ItemDelegate<OrderConfiguration<T>> config) {
|
|
public new TEnumerable order_by_complex(ItemDelegate<OrderConfiguration<T>> config) {
|
|
|
- return rewrap(inner.order_by_complex(config));
|
|
|
|
|
|
|
+ return adhere(inner.order_by_complex(config));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable concat(Enumerable<T> other) {
|
|
public new TEnumerable concat(Enumerable<T> other) {
|
|
|
- return rewrap(inner.concat(other));
|
|
|
|
|
|
|
+ return adhere(inner.concat(other));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable take(uint count) {
|
|
public new TEnumerable take(uint count) {
|
|
|
- return rewrap(inner.take(count));
|
|
|
|
|
|
|
+ return adhere(inner.take(count));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable skip(uint count) {
|
|
public new TEnumerable skip(uint count) {
|
|
|
- return rewrap(inner.skip(count));
|
|
|
|
|
|
|
+ return adhere(inner.skip(count));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable skip_last(uint count) {
|
|
public new TEnumerable skip_last(uint count) {
|
|
|
- return rewrap(inner.skip_last(count));
|
|
|
|
|
|
|
+ return adhere(inner.skip_last(count));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable take_last(uint count) {
|
|
public new TEnumerable take_last(uint count) {
|
|
|
- return rewrap(inner.take_last(count));
|
|
|
|
|
|
|
+ return adhere(inner.take_last(count));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable distinct(owned EqualityDelegate<T>? comparison = null) {
|
|
public new TEnumerable distinct(owned EqualityDelegate<T>? comparison = null) {
|
|
|
- return rewrap(inner.distinct((owned)comparison));
|
|
|
|
|
|
|
+ return adhere(inner.distinct((owned)comparison));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable distinct_by<TProp>(owned TransformDelegate<T, TProp> property_selector, owned EqualityDelegate<TProp>? property_equality) {
|
|
public new TEnumerable distinct_by<TProp>(owned TransformDelegate<T, TProp> property_selector, owned EqualityDelegate<TProp>? property_equality) {
|
|
|
- return rewrap(inner.distinct_by<TProp>((owned)property_selector, (owned)property_equality));
|
|
|
|
|
|
|
+ return adhere(inner.distinct_by<TProp>((owned)property_selector, (owned)property_equality));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable reverse() {
|
|
public new TEnumerable reverse() {
|
|
|
- return rewrap(inner.reverse());
|
|
|
|
|
|
|
+ return adhere(inner.reverse());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable cycle(uint cycles = -1) {
|
|
public new TEnumerable cycle(uint cycles = -1) {
|
|
|
- return rewrap(inner.cycle(cycles));
|
|
|
|
|
|
|
+ return adhere(inner.cycle(cycles));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable prefix_with(T item, uint times = 1) {
|
|
public new TEnumerable prefix_with(T item, uint times = 1) {
|
|
|
- return rewrap(inner.prefix_with(item, times));
|
|
|
|
|
|
|
+ return adhere(inner.prefix_with(item, times));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable suffix_with(T item, uint times = 1) {
|
|
public new TEnumerable suffix_with(T item, uint times = 1) {
|
|
|
- return rewrap(inner.suffix_with(item, times));
|
|
|
|
|
|
|
+ return adhere(inner.suffix_with(item, times));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable pad_end(uint minimum_length, T pad_item) {
|
|
public new TEnumerable pad_end(uint minimum_length, T pad_item) {
|
|
|
- return rewrap(inner.pad_end(minimum_length, pad_item));
|
|
|
|
|
|
|
+ return adhere(inner.pad_end(minimum_length, pad_item));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable pad_start(uint minimum_length, T pad_item) {
|
|
public new TEnumerable pad_start(uint minimum_length, T pad_item) {
|
|
|
- return rewrap(inner.pad_start(minimum_length, pad_item));
|
|
|
|
|
|
|
+ return adhere(inner.pad_start(minimum_length, pad_item));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable seal() {
|
|
public new TEnumerable seal() {
|
|
|
- return rewrap(inner.seal());
|
|
|
|
|
|
|
+ return adhere(inner.seal());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable cache() {
|
|
public new TEnumerable cache() {
|
|
|
- return rewrap(inner.cache());
|
|
|
|
|
|
|
+ return adhere(inner.cache());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable act(ItemDelegate<T> handler) {
|
|
public new TEnumerable act(ItemDelegate<T> handler) {
|
|
|
- return rewrap(inner.act(handler));
|
|
|
|
|
|
|
+ return adhere(inner.act(handler));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable debug_trace(string additional_message = "", owned StringifyDelegate<T>? stringifier = null, owned DebugOutputDelegate? output_func = null, bool formatting = true) {
|
|
public new TEnumerable debug_trace(string additional_message = "", owned StringifyDelegate<T>? stringifier = null, owned DebugOutputDelegate? output_func = null, bool formatting = true) {
|
|
|
- return rewrap(new TraceEnumerable<T>(this, get_info(), (owned)stringifier, additional_message, (owned)output_func, formatting));
|
|
|
|
|
|
|
+ return adhere(new TraceEnumerable<T>(this, get_info(), (owned)stringifier, additional_message, (owned)output_func, formatting));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable debug_type(string additional_message = "", DebugOutputDelegate? output_func = null, bool formatting = true) {
|
|
public new TEnumerable debug_type(string additional_message = "", DebugOutputDelegate? output_func = null, bool formatting = true) {
|
|
|
DebugPrinter.print_enumerable_information(get_info(), additional_message, output_func, formatting);
|
|
DebugPrinter.print_enumerable_information(get_info(), additional_message, output_func, formatting);
|
|
|
- return recycle();
|
|
|
|
|
|
|
+ return passthrough();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable combine_by<TKey>(Enumerable<T> other, owned TransformDelegate<T, TKey> key_selector, owned HashDelegate<TKey>? hash_func = null, owned EqualityDelegate<TKey>? equal_func = null) {
|
|
public new TEnumerable 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 rewrap(inner.combine_by<TKey>(other, (owned)key_selector, (owned)hash_func, (owned)equal_func));
|
|
|
|
|
|
|
+ return adhere(inner.combine_by<TKey>(other, (owned)key_selector, (owned)hash_func, (owned)equal_func));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable combine(Enumerable<T> other, owned HashDelegate<T>? hash_func = null, owned EqualityDelegate<T>? equal_func = null) {
|
|
public new TEnumerable combine(Enumerable<T> other, owned HashDelegate<T>? hash_func = null, owned EqualityDelegate<T>? equal_func = null) {
|
|
|
- return rewrap(inner.combine(other, (owned)hash_func, (owned)equal_func));
|
|
|
|
|
|
|
+ return adhere(inner.combine(other, (owned)hash_func, (owned)equal_func));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable common_by<TKey>(Enumerable<T> other, owned TransformDelegate<T, TKey> key_selector, owned HashDelegate<TKey>? hash_func = null, owned EqualityDelegate<TKey>? equal_func = null) {
|
|
public new TEnumerable 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 rewrap(inner.common_by<TKey>(other, (owned)key_selector, (owned)hash_func, (owned)equal_func));
|
|
|
|
|
|
|
+ return adhere(inner.common_by<TKey>(other, (owned)key_selector, (owned)hash_func, (owned)equal_func));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable common(Enumerable<T> other, owned HashDelegate<T>? hash_func = null, owned EqualityDelegate<T>? equal_func = null) {
|
|
public new TEnumerable common(Enumerable<T> other, owned HashDelegate<T>? hash_func = null, owned EqualityDelegate<T>? equal_func = null) {
|
|
|
- return rewrap(inner.common(other, (owned)hash_func, (owned)equal_func));
|
|
|
|
|
|
|
+ return adhere(inner.common(other, (owned)hash_func, (owned)equal_func));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable exclude_by<TKey>(Enumerable<T> other, owned TransformDelegate<T, TKey> key_selector, owned HashDelegate<TKey>? hash_func = null, owned EqualityDelegate<TKey>? equal_func = null) {
|
|
public new TEnumerable 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 rewrap(inner.exclude_by<TKey>(other, (owned)key_selector, (owned)hash_func, (owned)equal_func));
|
|
|
|
|
|
|
+ return adhere(inner.exclude_by<TKey>(other, (owned)key_selector, (owned)hash_func, (owned)equal_func));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable exclude(Enumerable<T> other, owned HashDelegate<T>? hash_func = null, owned EqualityDelegate<T>? equal_func = null) {
|
|
public new TEnumerable exclude(Enumerable<T> other, owned HashDelegate<T>? hash_func = null, owned EqualityDelegate<T>? equal_func = null) {
|
|
|
- return rewrap(inner.exclude(other, (owned)hash_func, (owned)equal_func));
|
|
|
|
|
|
|
+ return adhere(inner.exclude(other, (owned)hash_func, (owned)equal_func));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable 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) {
|
|
public new TEnumerable 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 rewrap(inner.non_common_by<TKey>(other, (owned)key_selector, (owned)hash_func, (owned)equal_func));
|
|
|
|
|
|
|
+ return adhere(inner.non_common_by<TKey>(other, (owned)key_selector, (owned)hash_func, (owned)equal_func));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable non_common(Enumerable<T> other, owned HashDelegate<T>? hash_func = null, owned EqualityDelegate<T>? equal_func = null) {
|
|
public new TEnumerable non_common(Enumerable<T> other, owned HashDelegate<T>? hash_func = null, owned EqualityDelegate<T>? equal_func = null) {
|
|
|
- return rewrap(inner.non_common(other, (owned)hash_func, (owned)equal_func));
|
|
|
|
|
|
|
+ return adhere(inner.non_common(other, (owned)hash_func, (owned)equal_func));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable interleave(Enumerable<T> other) {
|
|
public new TEnumerable interleave(Enumerable<T> other) {
|
|
|
- return rewrap(inner.interleave(other));
|
|
|
|
|
|
|
+ return adhere(inner.interleave(other));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new TEnumerable parallel_where<T>(owned PredicateDelegate<T> predicate, uint workers = 0) {
|
|
public new TEnumerable parallel_where<T>(owned PredicateDelegate<T> predicate, uint workers = 0) {
|
|
|
- return rewrap(inner.parallel_where<T>((owned)predicate, workers));
|
|
|
|
|
|
|
+ return adhere(inner.parallel_where<T>((owned)predicate, workers));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|