LanguageExt.Core

LanguageExt.Core Utility

Contents

class CollectionFormat Source #

Fields

field int MaxShortItems = 50 Source #

Application wide setting for the maximum number of items shown in a call to the ToString method of any LanguageExt collection type.

class EnumerableOptimal Source #

Methods

method IEnumerable<A> ConcatFast <A> (this IEnumerable<A> ma, IEnumerable<A> mb) Source #

method Iterable<A> ConcatFast <A> (this Iterable<A> ma, IEnumerable<A> mb) Source #

class IL Source #

Methods

method Func<R> Ctor <R> () Source #

Emits the IL to instantiate a type of R with a single argument to the constructor

method Func<A, R> Ctor <A, R> () Source #

Emits the IL to instantiate a type of R with a single argument to the constructor

method Func<A, B, R> Ctor <A, B, R> () Source #

Emits the IL to instantiate a type of R with two arguments to the constructor

method Func<A, B, C, R> Ctor <A, B, C, R> () Source #

Emits the IL to instantiate a type of R with three arguments to the constructor

method Func<A, B, C, D, R> Ctor <A, B, C, D, R> () Source #

Emits the IL to instantiate a type of R with four arguments to the constructor

method Option<Func<object, R>> Func1 <TYPE, R> (Type arg1, Func<MethodInfo, bool>? methodPred = null) Source #

Emits the IL to invoke a static method

method Option<Func<A, R>> Func1 <TYPE, A, R> (Func<MethodInfo, bool>? methodPred = null) Source #

Emits the IL to invoke a static method with one argument

method Option<Func<A, B, R>> Func2 <TYPE, A, B, R> (Func<MethodInfo, bool>? methodPred = null) Source #

Emits the IL to invoke a static method with two arguments

method Option<Func<A, B, C, R>> Func3 <TYPE, A, B, C, R> (Func<MethodInfo, bool>? methodPred = null) Source #

Emits the IL to invoke a static method with three arguments

method Option<Func<A, B, C, D, R>> Func4 <TYPE, A, B, C, D, R> (Func<MethodInfo, bool>? methodPred = null) Source #

Emits the IL to invoke a static method with four arguments

method Func<A, int> GetHashCode <A> (bool includeBase) Source #

Builds a function to provide a hash-code for a record type. the hash-code is built from the hash-codes of all the fields that make up the type.

You should cache the result of this method to reduce the work of building the IL each time. Better still use the RecordType<A> type to provide a cached version of these results.

method Func<A, object, bool> Equals <A> (bool includeBase) Source #

Provides a function that compares two record type arguments (one of type A and one of object) for structural equality, this first makes sure that the Object argument is of type A and then compares the fields from each argument for equality and returns true if all are equal.

You should cache the result of this method to reduce the work of building the IL each time. Better still use the RecordType<A> type to provide a cached version of these results.

method Func<A, A, bool> EqualsTyped <A> (bool includeBase) Source #

Provides a function that compares two record type arguments for structural equality, this first compares the fields from each argument for equality and returns true if all are equal.

You should cache the result of this method to reduce the work of building the IL each time. Better still use the RecordType<A> type to provide a cached version of these results.

method Func<A, A, int> Compare <A> (bool includeBase) Source #

Provides a function that compares two record type arguments for structural equality, this compares the fields from each argument for equality and returns 0 if all are equal, -1 if X is less than Y, and 1 if X is greater than Y.

You should cache the result of this method to reduce the work of building the IL each time. Better still use the RecordType<A> type to provide a cached version of these results.

method Func<A, string> ToString <A> (bool includeBase) Source #

method Action<A, SerializationInfo> GetObjectData <A> (bool includeBase) Source #

method Action<A, SerializationInfo> SetObjectData <A> (bool includeBase) Source #

method Func<A, B>? GetPropertyOrField <A, B> (string name) Source #

method Func<A, B>? GetProperty <A, B> (string name) Source #

method Func<A, B>? GetField <A, B> (string name) Source #

class ILCapability Source #

Fields

field bool Available Source #

record LazyF <F, A> (Func<K<F, A>> runLazyF) Source #

where F : Applicative<F>, MonoidK<F>

Makes K<F, A> lazy

This is more of a utility type right now, so it hasn't been fleshed out like other Applicatives

class LazyF Source #

LazyF module

Methods

method LazyF<F, A> lift <F, A> (K<F, A> fa) Source #

where F : Applicative<F>, MonoidK<F>

method LazyF<F, A> lift <F, A> (K<LazyF<F>, A> fa) Source #

where F : Applicative<F>, MonoidK<F>

method LazyF<F, A> lazy <F, A> (Func<K<F, A>> f) Source #

where F : Applicative<F>, MonoidK<F>

method LazyF<F, A> lazy <F, A> (Func<K<LazyF<F>, A>> f) Source #

where F : Applicative<F>, MonoidK<F>

method LazyF<F, A> lazy <F, A> (Func<LazyF<F, A>> f) Source #

where F : Applicative<F>, MonoidK<F>

method LazyF<F, A> As <F, A> (this K<LazyF<F>, A> ma) Source #

where F : Applicative<F>, MonoidK<F>

method K<F, A> Run <F, A> (this K<LazyF<F>, A> ma) Source #

where F : Applicative<F>, MonoidK<F>

class LazyF <F> Source #

where F : Applicative<F>, MonoidK<F>

LazyF trait implementations

Methods

method K<LazyF<F>, B> Map <A, B> (Func<A, B> f, K<LazyF<F>, A> ma) Source #

method K<LazyF<F>, A> Pure <A> (A value) Source #

method K<LazyF<F>, B> Apply <A, B> (K<LazyF<F>, Func<A, B>> mf, K<LazyF<F>, A> ma) Source #

method K<LazyF<F>, A> Combine <A> (K<LazyF<F>, A> lhs, K<LazyF<F>, A> rhs) Source #

method K<LazyF<F>, A> Empty <A> () Source #

class SysInfo Source #

System information helper

Properties

property int ProcessorCount Source #

Cached number of processors in the machine

property int DefaultAsyncSequenceParallelism Source #

When working with an IEnumerable of Tasks or Seq of Tasks, this setting is used as the default number of task items streamed at any one time. This reduces pressure on the system when working with large lazy streams of tasks.

Each method that uses it has an override that allows for per-usage settings.

The default value is max(1, Environment.ProcessorCount / 2)

class WaitAsync Source #

Methods

method ValueTask<(A A, B B)> WaitAll <A, B> (ValueTask<A> va, ValueTask<B> vb) Source #

method ValueTask<(A A, B B, C C)> WaitAll <A, B, C> (ValueTask<A> va, ValueTask<B> vb, ValueTask<C> vc) Source #

method ValueTask<(A A, B B, C C, D D)> WaitAll <A, B, C, D> (ValueTask<A> va, ValueTask<B> vb, ValueTask<C> vc, ValueTask<D> vd) Source #

method ValueTask<(A A, B B, C C, D D, E E)> WaitAll <A, B, C, D, E> (ValueTask<A> va, ValueTask<B> vb, ValueTask<C> vc, ValueTask<D> vd, ValueTask<E> ve) Source #

method ValueTask<(A A, B B, C C, D D, E E, F F)> WaitAll <A, B, C, D, E, F> (ValueTask<A> va, ValueTask<B> vb, ValueTask<C> vc, ValueTask<D> vd, ValueTask<E> ve, ValueTask<F> vf) Source #

method Task<bool> WaitOneAsync (this WaitHandle handle, int millisecondsTimeout, CancellationToken cancellationToken) Source #

method Task<bool> WaitOneAsync (this WaitHandle handle, int millisecondsTimeout) Source #

method Task<bool> WaitOneAsync (this WaitHandle handle, TimeSpan timeout, CancellationToken cancellationToken) Source #

method Task<bool> WaitOneAsync (this WaitHandle handle, CancellationToken cancellationToken) Source #

method Task<bool> WaitOneAsync (this WaitHandle handle) Source #