Search Results for

    Show / Hide Table of Contents

    Class SugarClass

    Inheritance
    System.Object
    SugarClass
    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 SugarClass

    Methods

    | Improve this Doc View Source

    AssertNonNull<T>(T)

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

    AssertNull<T>(T)

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

    TryDequeue<T>(ConcurrentQueue<T>)

    Declaration
    public static T TryDequeue<T>(this ConcurrentQueue<T> self)
        where T : class
    Parameters
    Type Name Description
    System.Collections.Concurrent.ConcurrentQueue<T> self
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryDequeue<T>(Queue<T>)

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

    TryFirst<T>(IEnumerable<T>)

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

    TryGet<T>(Option<T>)

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

    TryGet<T>(in ReadOnlySequence<T>, ref SequencePosition, Boolean)

    Declaration
    public static ReadOnlyMemory<T>? TryGet<T>(this in ReadOnlySequence<T> self, ref SequencePosition position, bool advance = true)
        where T : class
    Parameters
    Type Name Description
    System.Buffers.ReadOnlySequence<T> self
    System.SequencePosition position
    System.Boolean advance
    Returns
    Type Description
    System.Nullable<System.ReadOnlyMemory<T>>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryGet<T>(HashSet<T>, T)

    Declaration
    public static T TryGet<T>(this HashSet<T> self, T key)
        where T : class
    Parameters
    Type Name Description
    System.Collections.Generic.HashSet<T> self
    T key
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    TryPeek<T>(ConcurrentBag<T>)

    Declaration
    public static T TryPeek<T>(this ConcurrentBag<T> self)
        where T : class
    Parameters
    Type Name Description
    System.Collections.Concurrent.ConcurrentBag<T> self
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryPeek<T>(ConcurrentQueue<T>)

    Declaration
    public static T TryPeek<T>(this ConcurrentQueue<T> self)
        where T : class
    Parameters
    Type Name Description
    System.Collections.Concurrent.ConcurrentQueue<T> self
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryPeek<T>(ConcurrentStack<T>)

    Declaration
    public static T TryPeek<T>(this ConcurrentStack<T> self)
        where T : class
    Parameters
    Type Name Description
    System.Collections.Concurrent.ConcurrentStack<T> self
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryPeek<T>(Queue<T>)

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

    TryPeek<T>(Stack<T>)

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

    TryPop<T>(ConcurrentStack<T>)

    Declaration
    public static T TryPop<T>(this ConcurrentStack<T> self)
        where T : class
    Parameters
    Type Name Description
    System.Collections.Concurrent.ConcurrentStack<T> self
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryPop<T>(Stack<T>)

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

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

    Declaration
    public static V TryRemove<K, V>(this ConcurrentDictionary<K, V> self, K key)
        where V : class
    Parameters
    Type Name Description
    System.Collections.Concurrent.ConcurrentDictionary<K, V> self
    K key
    Returns
    Type Description
    V
    Type Parameters
    Name Description
    K
    V
    | Improve this Doc View Source

    TryTake<T>(BlockingCollection<T>)

    Declaration
    public static T TryTake<T>(this BlockingCollection<T> self)
        where T : class
    Parameters
    Type Name Description
    System.Collections.Concurrent.BlockingCollection<T> self
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryTake<T>(BlockingCollection<T>, Int32)

    Declaration
    public static T TryTake<T>(this BlockingCollection<T> self, int millisecondsTimeout)
        where T : class
    Parameters
    Type Name Description
    System.Collections.Concurrent.BlockingCollection<T> self
    System.Int32 millisecondsTimeout
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryTake<T>(BlockingCollection<T>, Int32, CancellationToken)

    Declaration
    public static T TryTake<T>(this BlockingCollection<T> self, int millisecondsTimeout, CancellationToken cancellationToken)
        where T : class
    Parameters
    Type Name Description
    System.Collections.Concurrent.BlockingCollection<T> self
    System.Int32 millisecondsTimeout
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryTake<T>(BlockingCollection<T>, TimeSpan)

    Declaration
    public static T TryTake<T>(this BlockingCollection<T> self, TimeSpan timeout)
        where T : class
    Parameters
    Type Name Description
    System.Collections.Concurrent.BlockingCollection<T> self
    System.TimeSpan timeout
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryTake<T>(ConcurrentBag<T>)

    Declaration
    public static T TryTake<T>(this ConcurrentBag<T> self)
        where T : class
    Parameters
    Type Name Description
    System.Collections.Concurrent.ConcurrentBag<T> self
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • AssertNonNull<T>(T)
      • AssertNull<T>(T)
      • TryDequeue<T>(ConcurrentQueue<T>)
      • TryDequeue<T>(Queue<T>)
      • TryFirst<T>(IEnumerable<T>)
      • TryGet<T>(Option<T>)
      • TryGet<T>(in ReadOnlySequence<T>, ref SequencePosition, Boolean)
      • TryGet<T>(HashSet<T>, T)
      • TryGet<T, E>(Result<T, E>)
      • TryGet<K, V>(ConcurrentDictionary<K, V>, K)
      • TryGet<K, V>(Dictionary<K, V>, K)
      • TryGet<K, V>(IDictionary<K, V>, K)
      • TryGet<K, V>(IReadOnlyDictionary<K, V>, K)
      • TryGet<K, V>(SortedDictionary<K, V>, K)
      • TryGet<K, V>(SortedList<K, V>, K)
      • TryGet<K, V>(KeyedCollection<K, V>, K)
      • TryGet<K, V>(ReadOnlyDictionary<K, V>, K)
      • TryGetError<T, E>(Result<T, E>)
      • TryPeek<T>(ConcurrentBag<T>)
      • TryPeek<T>(ConcurrentQueue<T>)
      • TryPeek<T>(ConcurrentStack<T>)
      • TryPeek<T>(Queue<T>)
      • TryPeek<T>(Stack<T>)
      • TryPop<T>(ConcurrentStack<T>)
      • TryPop<T>(Stack<T>)
      • TryRemove<K, V>(ConcurrentDictionary<K, V>, K)
      • TryTake<T>(BlockingCollection<T>)
      • TryTake<T>(BlockingCollection<T>, Int32)
      • TryTake<T>(BlockingCollection<T>, Int32, CancellationToken)
      • TryTake<T>(BlockingCollection<T>, TimeSpan)
      • TryTake<T>(ConcurrentBag<T>)
    Back to top Copyright © LibSugar.
    Generated by DocFX