Search Results for

    Show / Hide Table of Contents

    Class Sugar

    Inheritance
    System.Object
    Sugar
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: LibSugar
    Assembly: LibSugar.dll
    Syntax
    public static class Sugar

    Methods

    | Improve this Doc View Source

    Abort()

    Task that will never continue

    Declaration
    public static Task Abort()
    Returns
    Type Description
    System.Threading.Tasks.Task
    | Improve this Doc View Source

    AddOrUpdate<K, V>(ConcurrentDictionary<K, V>, K, V)

    Declaration
    public static void AddOrUpdate<K, V>(this ConcurrentDictionary<K, V> self, K key, V val)
    Parameters
    Type Name Description
    System.Collections.Concurrent.ConcurrentDictionary<K, V> self
    K key
    V val
    Type Parameters
    Name Description
    K
    V
    | Improve this Doc View Source

    Alloc<T>(ArrayPool<T>, Int32)

    Rent a array by RAII

    Declaration
    public static PooledArray<T> Alloc<T>(this ArrayPool<T> pool, int minimumLength)
    Parameters
    Type Name Description
    System.Buffers.ArrayPool<T> pool

    The ArrayPool

    System.Int32 minimumLength

    The minimum length of the array

    Returns
    Type Description
    PooledArray<T>
    Type Parameters
    Name Description
    T

    The type of the objects that are in the resource pool

    | Improve this Doc View Source

    Alloc<T>(ArrayPool<T>, Int32, Boolean)

    Rent a array by RAII

    Declaration
    public static PooledArray<T> Alloc<T>(this ArrayPool<T> pool, int minimumLength, bool clearArray)
    Parameters
    Type Name Description
    System.Buffers.ArrayPool<T> pool

    The ArrayPool

    System.Int32 minimumLength

    The minimum length of the array

    System.Boolean clearArray

    Indicates whether the contents of the buffer should be cleared before reuse

    Returns
    Type Description
    PooledArray<T>
    Type Parameters
    Name Description
    T

    The type of the objects that are in the resource pool

    | Improve this Doc View Source

    Also<T>(T, Action<T>)

    Declaration
    public static T Also<T>(this T v, Action<T> f)
    Parameters
    Type Name Description
    T v
    System.Action<T> f
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    AlsoIf<T>(T, Boolean, Action<T>)

    Declaration
    public static T AlsoIf<T>(this T v, bool cond, Action<T> f)
    Parameters
    Type Name Description
    T v
    System.Boolean cond
    System.Action<T> f
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    AssertEq<T>(T, T)

    Declaration
    public static T AssertEq<T>(this T self, T other)
    Parameters
    Type Name Description
    T self
    T other
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    AssertFalse(Boolean)

    Declaration
    public static bool AssertFalse(this bool v)
    Parameters
    Type Name Description
    System.Boolean v
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    AssertNaN(Double)

    Declaration
    public static double AssertNaN(this double v)
    Parameters
    Type Name Description
    System.Double v
    Returns
    Type Description
    System.Double
    | Improve this Doc View Source

    AssertNaN(Half)

    Declaration
    public static Half AssertNaN(this Half v)
    Parameters
    Type Name Description
    System.Half v
    Returns
    Type Description
    System.Half
    | Improve this Doc View Source

    AssertNaN(Single)

    Declaration
    public static float AssertNaN(this float v)
    Parameters
    Type Name Description
    System.Single v
    Returns
    Type Description
    System.Single
    | Improve this Doc View Source

    AssertNe<T>(T, T)

    Declaration
    public static T AssertNe<T>(this T self, T other)
    Parameters
    Type Name Description
    T self
    T other
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    AssertNotNaN(Double)

    Declaration
    public static double AssertNotNaN(this double v)
    Parameters
    Type Name Description
    System.Double v
    Returns
    Type Description
    System.Double
    | Improve this Doc View Source

    AssertNotNaN(Half)

    Declaration
    public static Half AssertNotNaN(this Half v)
    Parameters
    Type Name Description
    System.Half v
    Returns
    Type Description
    System.Half
    | Improve this Doc View Source

    AssertNotNaN(Single)

    Declaration
    public static float AssertNotNaN(this float v)
    Parameters
    Type Name Description
    System.Single v
    Returns
    Type Description
    System.Single
    | Improve this Doc View Source

    AssertNotSame<T>(T, T)

    Declaration
    public static T AssertNotSame<T>(this T self, T other)
        where T : class
    Parameters
    Type Name Description
    T self
    T other
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    AssertSame<T>(T, T)

    Declaration
    public static T AssertSame<T>(this T self, T other)
        where T : class
    Parameters
    Type Name Description
    T self
    T other
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    AssertTrue(Boolean)

    Declaration
    public static bool AssertTrue(this bool v)
    Parameters
    Type Name Description
    System.Boolean v
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    AssertZero(Byte)

    Declaration
    public static byte AssertZero(this byte v)
    Parameters
    Type Name Description
    System.Byte v
    Returns
    Type Description
    System.Byte
    | Improve this Doc View Source

    AssertZero(Decimal)

    Declaration
    public static decimal AssertZero(this decimal v)
    Parameters
    Type Name Description
    System.Decimal v
    Returns
    Type Description
    System.Decimal
    | Improve this Doc View Source

    AssertZero(Double)

    Declaration
    public static double AssertZero(this double v)
    Parameters
    Type Name Description
    System.Double v
    Returns
    Type Description
    System.Double
    | Improve this Doc View Source

    AssertZero(Half)

    Declaration
    public static Half AssertZero(this Half v)
    Parameters
    Type Name Description
    System.Half v
    Returns
    Type Description
    System.Half
    | Improve this Doc View Source

    AssertZero(Int16)

    Declaration
    public static short AssertZero(this short v)
    Parameters
    Type Name Description
    System.Int16 v
    Returns
    Type Description
    System.Int16
    | Improve this Doc View Source

    AssertZero(Int32)

    Declaration
    public static int AssertZero(this int v)
    Parameters
    Type Name Description
    System.Int32 v
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    AssertZero(Int64)

    Declaration
    public static long AssertZero(this long v)
    Parameters
    Type Name Description
    System.Int64 v
    Returns
    Type Description
    System.Int64
    | Improve this Doc View Source

    AssertZero(IntPtr)

    Declaration
    public static nint AssertZero(this nint v)
    Parameters
    Type Name Description
    System.IntPtr v
    Returns
    Type Description
    System.IntPtr
    | Improve this Doc View Source

    AssertZero(BigInteger)

    Declaration
    public static BigInteger AssertZero(this BigInteger v)
    Parameters
    Type Name Description
    System.Numerics.BigInteger v
    Returns
    Type Description
    System.Numerics.BigInteger
    | Improve this Doc View Source

    AssertZero(SByte)

    Declaration
    public static sbyte AssertZero(this sbyte v)
    Parameters
    Type Name Description
    System.SByte v
    Returns
    Type Description
    System.SByte
    | Improve this Doc View Source

    AssertZero(Single)

    Declaration
    public static float AssertZero(this float v)
    Parameters
    Type Name Description
    System.Single v
    Returns
    Type Description
    System.Single
    | Improve this Doc View Source

    AssertZero(UInt16)

    Declaration
    public static ushort AssertZero(this ushort v)
    Parameters
    Type Name Description
    System.UInt16 v
    Returns
    Type Description
    System.UInt16
    | Improve this Doc View Source

    AssertZero(UInt32)

    Declaration
    public static uint AssertZero(this uint v)
    Parameters
    Type Name Description
    System.UInt32 v
    Returns
    Type Description
    System.UInt32
    | Improve this Doc View Source

    AssertZero(UInt64)

    Declaration
    public static ulong AssertZero(this ulong v)
    Parameters
    Type Name Description
    System.UInt64 v
    Returns
    Type Description
    System.UInt64
    | Improve this Doc View Source

    AssertZero(UIntPtr)

    Declaration
    public static nuint AssertZero(this nuint v)
    Parameters
    Type Name Description
    System.UIntPtr v
    Returns
    Type Description
    System.UIntPtr
    | Improve this Doc View Source

    Box<T>(T)

    Pack the value into the box so that it is passed by reference

    Declaration
    public static Box<T> Box<T>(this T v)
    Parameters
    Type Name Description
    T v
    Returns
    Type Description
    Box<T>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Cloned<T>(T[])

    Declaration
    public static T[] Cloned<T>(this T[] self)
        where T : IClone<T>
    Parameters
    Type Name Description
    T[] self
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Cloned<T>(Option<T>)

    Declaration
    public static Option<T> Cloned<T>(this Option<T> o)
        where T : IClone<T>
    Parameters
    Type Name Description
    Option<T> o
    Returns
    Type Description
    Option<T>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Cloned<T>(PooledArray<T>)

    Creates a deep(1) copy of the System.Array.

    Declaration
    public static T[] Cloned<T>(this PooledArray<T> array)
        where T : IClone<T>
    Parameters
    Type Name Description
    PooledArray<T> array
    Returns
    Type Description
    T[]

    A deep(1) copy of the System.Array.

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    DistinctBy<T, D>(IEnumerable<T>, IEqualityComparer<D>, Func<T, D>)

    Declaration
    public static IEnumerable<T> DistinctBy<T, D>(this IEnumerable<T> iter, IEqualityComparer<D> equality, Func<T, D> f)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.Collections.Generic.IEqualityComparer<D> equality
    System.Func<T, D> f
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    DistinctBy<T, D>(IEnumerable<T>, Func<T, D>)

    Declaration
    public static IEnumerable<T> DistinctBy<T, D>(this IEnumerable<T> iter, Func<T, D> f)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.Func<T, D> f
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    DistinctBy<T, D>(IEnumerable<T>, Func<T, D>, IEqualityComparer<D>)

    Declaration
    public static IEnumerable<T> DistinctBy<T, D>(this IEnumerable<T> iter, Func<T, D> f, IEqualityComparer<D> equality)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.Func<T, D> f
    System.Collections.Generic.IEqualityComparer<D> equality
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    DistinctBy<T, D>(ParallelQuery<T>, IEqualityComparer<D>, Func<T, D>)

    Declaration
    public static ParallelQuery<T> DistinctBy<T, D>(this ParallelQuery<T> iter, IEqualityComparer<D> equality, Func<T, D> f)
    Parameters
    Type Name Description
    System.Linq.ParallelQuery<T> iter
    System.Collections.Generic.IEqualityComparer<D> equality
    System.Func<T, D> f
    Returns
    Type Description
    System.Linq.ParallelQuery<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    DistinctBy<T, D>(ParallelQuery<T>, Func<T, D>)

    Declaration
    public static ParallelQuery<T> DistinctBy<T, D>(this ParallelQuery<T> iter, Func<T, D> f)
    Parameters
    Type Name Description
    System.Linq.ParallelQuery<T> iter
    System.Func<T, D> f
    Returns
    Type Description
    System.Linq.ParallelQuery<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    DistinctBy<T, D>(ParallelQuery<T>, Func<T, D>, IEqualityComparer<D>)

    Declaration
    public static ParallelQuery<T> DistinctBy<T, D>(this ParallelQuery<T> iter, Func<T, D> f, IEqualityComparer<D> equality)
    Parameters
    Type Name Description
    System.Linq.ParallelQuery<T> iter
    System.Func<T, D> f
    System.Collections.Generic.IEqualityComparer<D> equality
    Returns
    Type Description
    System.Linq.ParallelQuery<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    Empty()

    Do nothing

    Declaration
    public static void Empty()
    | Improve this Doc View Source

    EqBy<T, D>(IEqualityComparer<D>, Func<T, D>)

    Declaration
    public static EqByEqualityComparer<T, D> EqBy<T, D>(this IEqualityComparer<D> equality, Func<T, D> f)
    Parameters
    Type Name Description
    System.Collections.Generic.IEqualityComparer<D> equality
    System.Func<T, D> f
    Returns
    Type Description
    EqByEqualityComparer<T, D>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    EqBy<T, D>(Func<T, D>)

    Declaration
    public static EqByEqualityComparer<T, D> EqBy<T, D>(this Func<T, D> f)
    Parameters
    Type Name Description
    System.Func<T, D> f
    Returns
    Type Description
    EqByEqualityComparer<T, D>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    EqBy<T, D>(Func<T, D>, IEqualityComparer<D>)

    Declaration
    public static EqByEqualityComparer<T, D> EqBy<T, D>(this Func<T, D> f, IEqualityComparer<D> equality)
    Parameters
    Type Name Description
    System.Func<T, D> f
    System.Collections.Generic.IEqualityComparer<D> equality
    Returns
    Type Description
    EqByEqualityComparer<T, D>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    ExceptBy<T, D>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<D>, Func<T, D>)

    Declaration
    public static IEnumerable<T> ExceptBy<T, D>(this IEnumerable<T> iter, IEnumerable<T> other, IEqualityComparer<D> equality, Func<T, D> f)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.Collections.Generic.IEnumerable<T> other
    System.Collections.Generic.IEqualityComparer<D> equality
    System.Func<T, D> f
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    ExceptBy<T, D>(IEnumerable<T>, IEnumerable<T>, Func<T, D>)

    Declaration
    public static IEnumerable<T> ExceptBy<T, D>(this IEnumerable<T> iter, IEnumerable<T> other, Func<T, D> f)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.Collections.Generic.IEnumerable<T> other
    System.Func<T, D> f
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    ExceptBy<T, D>(IEnumerable<T>, IEnumerable<T>, Func<T, D>, IEqualityComparer<D>)

    Declaration
    public static IEnumerable<T> ExceptBy<T, D>(this IEnumerable<T> iter, IEnumerable<T> other, Func<T, D> f, IEqualityComparer<D> equality)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.Collections.Generic.IEnumerable<T> other
    System.Func<T, D> f
    System.Collections.Generic.IEqualityComparer<D> equality
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    ExceptBy<T, D>(ParallelQuery<T>, ParallelQuery<T>, IEqualityComparer<D>, Func<T, D>)

    Declaration
    public static ParallelQuery<T> ExceptBy<T, D>(this ParallelQuery<T> iter, ParallelQuery<T> other, IEqualityComparer<D> equality, Func<T, D> f)
    Parameters
    Type Name Description
    System.Linq.ParallelQuery<T> iter
    System.Linq.ParallelQuery<T> other
    System.Collections.Generic.IEqualityComparer<D> equality
    System.Func<T, D> f
    Returns
    Type Description
    System.Linq.ParallelQuery<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    ExceptBy<T, D>(ParallelQuery<T>, ParallelQuery<T>, Func<T, D>)

    Declaration
    public static ParallelQuery<T> ExceptBy<T, D>(this ParallelQuery<T> iter, ParallelQuery<T> other, Func<T, D> f)
    Parameters
    Type Name Description
    System.Linq.ParallelQuery<T> iter
    System.Linq.ParallelQuery<T> other
    System.Func<T, D> f
    Returns
    Type Description
    System.Linq.ParallelQuery<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    ExceptBy<T, D>(ParallelQuery<T>, ParallelQuery<T>, Func<T, D>, IEqualityComparer<D>)

    Declaration
    public static ParallelQuery<T> ExceptBy<T, D>(this ParallelQuery<T> iter, ParallelQuery<T> other, Func<T, D> f, IEqualityComparer<D> equality)
    Parameters
    Type Name Description
    System.Linq.ParallelQuery<T> iter
    System.Linq.ParallelQuery<T> other
    System.Func<T, D> f
    System.Collections.Generic.IEqualityComparer<D> equality
    Returns
    Type Description
    System.Linq.ParallelQuery<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    Flatten<T>(Option<Option<T>>)

    Declaration
    public static Option<T> Flatten<T>(this Option<Option<T>> o)
    Parameters
    Type Name Description
    Option<Option<T>> o
    Returns
    Type Description
    Option<T>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Flatten<T, E>(Result<Result<T, E>, E>)

    Declaration
    public static Result<T, E> Flatten<T, E>(this Result<Result<T, E>, E> r)
    Parameters
    Type Name Description
    Result<Result<T, E>, E> r
    Returns
    Type Description
    Result<T, E>
    Type Parameters
    Name Description
    T
    E
    | Improve this Doc View Source

    Flatten<T, E>(UResult<UResult<T, E>, E>)

    Declaration
    public static UResult<T, E> Flatten<T, E>(this UResult<UResult<T, E>, E> r)
        where T : struct where E : struct
    Parameters
    Type Name Description
    UResult<UResult<T, E>, E> r
    Returns
    Type Description
    UResult<T, E>
    Type Parameters
    Name Description
    T
    E
    | Improve this Doc View Source

    ForEach<T>(IEnumerable<T>, Action<T>)

    ForEach for System.Collections.Generic.IEnumerable<T>

    Declaration
    public static void ForEach<T>(this IEnumerable<T> iter, Action<T> f)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.Action<T> f
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    ForEach<T>(IEnumerable<T>, Func<T, Boolean>)

    ForEach for System.Collections.Generic.IEnumerable<T>

    Param f return true to continue, false to break

    Declaration
    public static void ForEach<T>(this IEnumerable<T> iter, Func<T, bool> f)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.Func<T, System.Boolean> f

    Return true to continue, false to break

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    ForEach<T, R>(IEnumerable<T>, Func<T, Option<R>>)

    ForEach for System.Collections.Generic.IEnumerable<T>

    Param f return None to continue, Some(T) to break and return a R

    Declaration
    public static Option<R> ForEach<T, R>(this IEnumerable<T> iter, Func<T, Option<R>> f)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.Func<T, Option<R>> f

    Return None to continue, Some(T) to break and return a R

    Returns
    Type Description
    Option<R>
    Type Parameters
    Name Description
    T
    R
    | Improve this Doc View Source

    Identity<T>(T)

    Identity function

    Declaration
    public static T Identity<T>(T v)
    Parameters
    Type Name Description
    T v
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Indexed<T>(IEnumerable<T>)

    Declaration
    public static IEnumerable<(T a, int i)> Indexed<T>(this IEnumerable<T> iter)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<System.ValueTuple<T, System.Int32>>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Indexed<T>(ParallelQuery<T>)

    Declaration
    public static ParallelQuery<(T a, int i)> Indexed<T>(this ParallelQuery<T> iter)
    Parameters
    Type Name Description
    System.Linq.ParallelQuery<T> iter
    Returns
    Type Description
    System.Linq.ParallelQuery<System.ValueTuple<T, System.Int32>>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Intern(String)

    Retrieves the system's reference to the specified System.String.

    Declaration
    public static string Intern(this string s)
    Parameters
    Type Name Description
    System.String s
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    IntersectBy<T, D>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<D>, Func<T, D>)

    Declaration
    public static IEnumerable<T> IntersectBy<T, D>(this IEnumerable<T> iter, IEnumerable<T> other, IEqualityComparer<D> equality, Func<T, D> f)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.Collections.Generic.IEnumerable<T> other
    System.Collections.Generic.IEqualityComparer<D> equality
    System.Func<T, D> f
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    IntersectBy<T, D>(IEnumerable<T>, IEnumerable<T>, Func<T, D>)

    Declaration
    public static IEnumerable<T> IntersectBy<T, D>(this IEnumerable<T> iter, IEnumerable<T> other, Func<T, D> f)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.Collections.Generic.IEnumerable<T> other
    System.Func<T, D> f
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    IntersectBy<T, D>(IEnumerable<T>, IEnumerable<T>, Func<T, D>, IEqualityComparer<D>)

    Declaration
    public static IEnumerable<T> IntersectBy<T, D>(this IEnumerable<T> iter, IEnumerable<T> other, Func<T, D> f, IEqualityComparer<D> equality)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.Collections.Generic.IEnumerable<T> other
    System.Func<T, D> f
    System.Collections.Generic.IEqualityComparer<D> equality
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    IntersectBy<T, D>(ParallelQuery<T>, ParallelQuery<T>, IEqualityComparer<D>, Func<T, D>)

    Declaration
    public static ParallelQuery<T> IntersectBy<T, D>(this ParallelQuery<T> iter, ParallelQuery<T> other, IEqualityComparer<D> equality, Func<T, D> f)
    Parameters
    Type Name Description
    System.Linq.ParallelQuery<T> iter
    System.Linq.ParallelQuery<T> other
    System.Collections.Generic.IEqualityComparer<D> equality
    System.Func<T, D> f
    Returns
    Type Description
    System.Linq.ParallelQuery<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    IntersectBy<T, D>(ParallelQuery<T>, ParallelQuery<T>, Func<T, D>)

    Declaration
    public static ParallelQuery<T> IntersectBy<T, D>(this ParallelQuery<T> iter, ParallelQuery<T> other, Func<T, D> f)
    Parameters
    Type Name Description
    System.Linq.ParallelQuery<T> iter
    System.Linq.ParallelQuery<T> other
    System.Func<T, D> f
    Returns
    Type Description
    System.Linq.ParallelQuery<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    IntersectBy<T, D>(ParallelQuery<T>, ParallelQuery<T>, Func<T, D>, IEqualityComparer<D>)

    Declaration
    public static ParallelQuery<T> IntersectBy<T, D>(this ParallelQuery<T> iter, ParallelQuery<T> other, Func<T, D> f, IEqualityComparer<D> equality)
    Parameters
    Type Name Description
    System.Linq.ParallelQuery<T> iter
    System.Linq.ParallelQuery<T> other
    System.Func<T, D> f
    System.Collections.Generic.IEqualityComparer<D> equality
    Returns
    Type Description
    System.Linq.ParallelQuery<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    IsInterned(String)

    Retrieves a reference to a specified System.String.

    Declaration
    public static string IsInterned(this string s)
    Parameters
    Type Name Description
    System.String s
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    IsNullOrEmpty(String)

    Indicates whether the specified string is null or an empty string ("").

    Declaration
    public static bool IsNullOrEmpty(this string s)
    Parameters
    Type Name Description
    System.String s
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsNullOrWhiteSpace(String)

    Indicates whether a specified string is null, empty, or consists only of white-space characters.

    Declaration
    public static bool IsNullOrWhiteSpace(this string s)
    Parameters
    Type Name Description
    System.String s
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    JoinStr(Object[])

    Declaration
    public static string JoinStr(this object[] arr)
    Parameters
    Type Name Description
    System.Object[] arr
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    JoinStr(Object[], Char)

    Declaration
    public static string JoinStr(this object[] arr, char separator)
    Parameters
    Type Name Description
    System.Object[] arr
    System.Char separator
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    JoinStr(Object[], String)

    Declaration
    public static string JoinStr(this object[] arr, string separator)
    Parameters
    Type Name Description
    System.Object[] arr
    System.String separator
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    JoinStr(String[])

    Declaration
    public static string JoinStr(this string[] arr)
    Parameters
    Type Name Description
    System.String[] arr
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    JoinStr(String[], Char)

    Declaration
    public static string JoinStr(this string[] arr, char separator)
    Parameters
    Type Name Description
    System.String[] arr
    System.Char separator
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    JoinStr(String[], String)

    Declaration
    public static string JoinStr(this string[] arr, string separator)
    Parameters
    Type Name Description
    System.String[] arr
    System.String separator
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    JoinStr<T>(IEnumerable<T>)

    Declaration
    public static string JoinStr<T>(this IEnumerable<T> iter)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    Returns
    Type Description
    System.String
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    JoinStr<T>(IEnumerable<T>, Char)

    Declaration
    public static string JoinStr<T>(this IEnumerable<T> iter, char separator)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.Char separator
    Returns
    Type Description
    System.String
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    JoinStr<T>(IEnumerable<T>, String)

    Declaration
    public static string JoinStr<T>(this IEnumerable<T> iter, string separator)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.String separator
    Returns
    Type Description
    System.String
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Let<T, U>(T, Func<T, U>)

    Declaration
    public static U Let<T, U>(this T v, Func<T, U> f)
    Parameters
    Type Name Description
    T v
    System.Func<T, U> f
    Returns
    Type Description
    U
    Type Parameters
    Name Description
    T
    U
    | Improve this Doc View Source

    LetIf<T>(T, Boolean, Func<T, T>)

    Declaration
    public static T LetIf<T>(this T v, bool cond, Func<T, T> f)
    Parameters
    Type Name Description
    T v
    System.Boolean cond
    System.Func<T, T> f
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Movable<T>(T)

    Declaration
    public static Movable<T> Movable<T>(this T value)
        where T : IDisposable
    Parameters
    Type Name Description
    T value
    Returns
    Type Description
    Movable<T>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Movable<T>(Owner<T>)

    Declaration
    public static Owner<Movable<T>> Movable<T>(this Owner<T> value)
        where T : IDisposable
    Parameters
    Type Name Description
    Owner<T> value
    Returns
    Type Description
    Owner<Movable<T>>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    MovableBy<T>(T, MovableBy<T>.Drop)

    Declaration
    public static MovableBy<T> MovableBy<T>(this T value, MovableBy<T>.Drop drop)
    Parameters
    Type Name Description
    T value
    MovableBy.Drop<> drop
    Returns
    Type Description
    MovableBy<T>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    MovableByUnmanaged<T>(T, MovableByUnmanaged<T>.Drop)

    Declaration
    public static MovableByUnmanaged<T> MovableByUnmanaged<T>(this T value, MovableByUnmanaged<T>.Drop drop)
        where T : struct
    Parameters
    Type Name Description
    T value
    MovableByUnmanaged.Drop<> drop
    Returns
    Type Description
    MovableByUnmanaged<T>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Move<T>(IEnumerable<T>)

    Declaration
    public static IEnumerable<T> Move<T>(this IEnumerable<T> self)
        where T : IMovable<T>
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> self
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Move<T, R>(IEnumerable<T>)

    Declaration
    public static IEnumerable<R> Move<T, R>(this IEnumerable<T> self)
        where T : IMovable<R>
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> self
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<R>
    Type Parameters
    Name Description
    T
    R
    | Improve this Doc View Source

    Ref<T>(T)

    Pack the value into the box so that it is passed by reference

    Declaration
    public static Ref<T> Ref<T>(this T v)
    Parameters
    Type Name Description
    T v
    Returns
    Type Description
    Ref<T>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Repeat<T>(T, Int32)

    Declaration
    public static IEnumerable<T> Repeat<T>(this T v, int count)
    Parameters
    Type Name Description
    T v
    System.Int32 count
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Run(Action)

    Declaration
    public static void Run(this Action f)
    Parameters
    Type Name Description
    System.Action f
    | Improve this Doc View Source

    Run<U>(Func<U>)

    Declaration
    public static U Run<U>(this Func<U> f)
    Parameters
    Type Name Description
    System.Func<U> f
    Returns
    Type Description
    U
    Type Parameters
    Name Description
    U
    | Improve this Doc View Source

    Seq<T>(T)

    Declaration
    public static IEnumerable<T> Seq<T>(this T v)
    Parameters
    Type Name Description
    T v
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Seq<T>(T, T[])

    Declaration
    public static IEnumerable<T> Seq<T>(this T v, params T[] args)
    Parameters
    Type Name Description
    T v
    T[] args
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    SeqCloned<T>(IEnumerable<T>)

    Declaration
    public static IEnumerable<T> SeqCloned<T>(this IEnumerable<T> self)
        where T : IClone<T>
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> self
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    SeqCloned<T, R>(IEnumerable<T>)

    Declaration
    public static IEnumerable<R> SeqCloned<T, R>(this IEnumerable<T> self)
        where T : IClone<R>
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> self
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<R>
    Type Parameters
    Name Description
    T
    R
    | Improve this Doc View Source

    Swap<T>(ref T, T)

    Exchange

    Declaration
    public static T Swap<T>(ref T self, T newValue)
    Parameters
    Type Name Description
    T self
    T newValue
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TODO(Exception)

    throw TODO

    Declaration
    public static void TODO(Exception inner)
    Parameters
    Type Name Description
    System.Exception inner

    Inner Exception

    Exceptions
    Type Condition
    System.NotImplementedException
    | Improve this Doc View Source

    TODO(String)

    throw TODO

    Declaration
    public static void TODO(string message = "TODO")
    Parameters
    Type Name Description
    System.String message

    TODO message

    Exceptions
    Type Condition
    System.NotImplementedException
    | Improve this Doc View Source

    TODO(String, Exception)

    throw TODO

    Declaration
    public static void TODO(string message, Exception inner)
    Parameters
    Type Name Description
    System.String message

    TODO message

    System.Exception inner

    Inner Exception

    Exceptions
    Type Condition
    System.NotImplementedException
    | Improve this Doc View Source

    TODO<T>(Exception)

    throw TODO

    Declaration
    public static T TODO<T>(Exception inner)
    Parameters
    Type Name Description
    System.Exception inner

    Inner Exception

    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    Return type

    Exceptions
    Type Condition
    System.NotImplementedException
    | Improve this Doc View Source

    TODO<T>(String)

    throw TODO

    Declaration
    public static T TODO<T>(string message = "TODO")
    Parameters
    Type Name Description
    System.String message

    TODO message

    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    Return type

    Exceptions
    Type Condition
    System.NotImplementedException
    | Improve this Doc View Source

    TODO<T>(String, Exception)

    throw TODO

    Declaration
    public static T TODO<T>(string message, Exception inner)
    Parameters
    Type Name Description
    System.String message

    TODO message

    System.Exception inner

    Inner Exception

    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    Return type

    Exceptions
    Type Condition
    System.NotImplementedException
    | Improve this Doc View Source

    Transpose<T, E>(Option<Result<T, E>>)

    Declaration
    public static Result<Option<T>, E> Transpose<T, E>(this Option<Result<T, E>> o)
    Parameters
    Type Name Description
    Option<Result<T, E>> o
    Returns
    Type Description
    Result<Option<T>, E>
    Type Parameters
    Name Description
    T
    E
    | Improve this Doc View Source

    Transpose<T, E>(Result<Option<T>, E>)

    Declaration
    public static Option<Result<T, E>> Transpose<T, E>(this Result<Option<T>, E> r)
    Parameters
    Type Name Description
    Result<Option<T>, E> r
    Returns
    Type Description
    Option<Result<T, E>>
    Type Parameters
    Name Description
    T
    E
    | Improve this Doc View Source

    Transpose<T, E>(UResult<Option<T>, E>)

    Declaration
    public static Option<UResult<T, E>> Transpose<T, E>(this UResult<Option<T>, E> r)
        where T : struct where E : struct
    Parameters
    Type Name Description
    UResult<Option<T>, E> r
    Returns
    Type Description
    Option<UResult<T, E>>
    Type Parameters
    Name Description
    T
    E
    | Improve this Doc View Source

    TryGet<K, V>(ConditionalWeakTable<K, V>, K)

    Declaration
    public static V TryGet<K, V>(this ConditionalWeakTable<K, V> self, K key)
        where K : class where V : class
    Parameters
    Type Name Description
    System.Runtime.CompilerServices.ConditionalWeakTable<K, V> self
    K key
    Returns
    Type Description
    V
    Type Parameters
    Name Description
    K
    V
    | Improve this Doc View Source

    UnionBy<T, D>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<D>, Func<T, D>)

    Declaration
    public static IEnumerable<T> UnionBy<T, D>(this IEnumerable<T> iter, IEnumerable<T> other, IEqualityComparer<D> equality, Func<T, D> f)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.Collections.Generic.IEnumerable<T> other
    System.Collections.Generic.IEqualityComparer<D> equality
    System.Func<T, D> f
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    UnionBy<T, D>(IEnumerable<T>, IEnumerable<T>, Func<T, D>)

    Declaration
    public static IEnumerable<T> UnionBy<T, D>(this IEnumerable<T> iter, IEnumerable<T> other, Func<T, D> f)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.Collections.Generic.IEnumerable<T> other
    System.Func<T, D> f
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    UnionBy<T, D>(IEnumerable<T>, IEnumerable<T>, Func<T, D>, IEqualityComparer<D>)

    Declaration
    public static IEnumerable<T> UnionBy<T, D>(this IEnumerable<T> iter, IEnumerable<T> other, Func<T, D> f, IEqualityComparer<D> equality)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.Collections.Generic.IEnumerable<T> other
    System.Func<T, D> f
    System.Collections.Generic.IEqualityComparer<D> equality
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    UnionBy<T, D>(ParallelQuery<T>, ParallelQuery<T>, IEqualityComparer<D>, Func<T, D>)

    Declaration
    public static ParallelQuery<T> UnionBy<T, D>(this ParallelQuery<T> iter, ParallelQuery<T> other, IEqualityComparer<D> equality, Func<T, D> f)
    Parameters
    Type Name Description
    System.Linq.ParallelQuery<T> iter
    System.Linq.ParallelQuery<T> other
    System.Collections.Generic.IEqualityComparer<D> equality
    System.Func<T, D> f
    Returns
    Type Description
    System.Linq.ParallelQuery<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    UnionBy<T, D>(ParallelQuery<T>, ParallelQuery<T>, Func<T, D>)

    Declaration
    public static ParallelQuery<T> UnionBy<T, D>(this ParallelQuery<T> iter, ParallelQuery<T> other, Func<T, D> f)
    Parameters
    Type Name Description
    System.Linq.ParallelQuery<T> iter
    System.Linq.ParallelQuery<T> other
    System.Func<T, D> f
    Returns
    Type Description
    System.Linq.ParallelQuery<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    UnionBy<T, D>(ParallelQuery<T>, ParallelQuery<T>, Func<T, D>, IEqualityComparer<D>)

    Declaration
    public static ParallelQuery<T> UnionBy<T, D>(this ParallelQuery<T> iter, ParallelQuery<T> other, Func<T, D> f, IEqualityComparer<D> equality)
    Parameters
    Type Name Description
    System.Linq.ParallelQuery<T> iter
    System.Linq.ParallelQuery<T> other
    System.Func<T, D> f
    System.Collections.Generic.IEqualityComparer<D> equality
    Returns
    Type Description
    System.Linq.ParallelQuery<T>
    Type Parameters
    Name Description
    T
    D
    | Improve this Doc View Source

    WhereCast<R>(IEnumerable)

    Declaration
    public static IEnumerable<R> WhereCast<R>(this IEnumerable iter)
    Parameters
    Type Name Description
    System.Collections.IEnumerable iter
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<R>
    Type Parameters
    Name Description
    R
    | Improve this Doc View Source

    WhereCast<T, R>(IEnumerable<T>)

    Declaration
    public static IEnumerable<R> WhereCast<T, R>(this IEnumerable<T> iter)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<R>
    Type Parameters
    Name Description
    T
    R
    | Improve this Doc View Source

    WhereCast<T, R>(ParallelQuery<T>)

    Declaration
    public static ParallelQuery<R> WhereCast<T, R>(this ParallelQuery<T> iter)
    Parameters
    Type Name Description
    System.Linq.ParallelQuery<T> iter
    Returns
    Type Description
    System.Linq.ParallelQuery<R>
    Type Parameters
    Name Description
    T
    R
    | Improve this Doc View Source

    WhereSelect<T, R>(IEnumerable<T>, Func<T, Option<R>>)

    Declaration
    public static IEnumerable<R> WhereSelect<T, R>(this IEnumerable<T> iter, Func<T, Option<R>> f)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> iter
    System.Func<T, Option<R>> f
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<R>
    Type Parameters
    Name Description
    T
    R
    | Improve this Doc View Source

    WhereSelect<T, R>(ParallelQuery<T>, Func<T, Option<R>>)

    Declaration
    public static ParallelQuery<R> WhereSelect<T, R>(this ParallelQuery<T> iter, Func<T, Option<R>> f)
    Parameters
    Type Name Description
    System.Linq.ParallelQuery<T> iter
    System.Func<T, Option<R>> f
    Returns
    Type Description
    System.Linq.ParallelQuery<R>
    Type Parameters
    Name Description
    T
    R
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © LibSugar.
    Generated by DocFX