Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    Dispatcher Class

    Namespace: Stride.Core.Threading
    Assembly: Stride.Core.dll
    System.Object → Dispatcher
    Derived from Dispatcher:

    public class Dispatcher
    Name Description
    Fields
    MaxDegreeOfParallelism
    Methods
    For(Int32, Int32, Action<Int32>)
    For<TLocal>(Int32, Int32, Func<TLocal>, Action<Int32, TLocal>, Action<TLocal>)
    ForEach<T>(FastCollection<T>, Action<T>)
    ForEach<T>(FastList<T>, Dispatcher.ValueAction<T>)
    ForEach<T>(FastList<T>, Action<T>)
    ForEach<T>(ConcurrentCollector<T>, Dispatcher.ValueAction<T>)
    ForEach<T>(ConcurrentCollector<T>, Action<T>)
    ForEach<T>(IReadOnlyList<T>, Action<T>)
    ForEach<T>(List<T>, Action<T>)
    ForEach<TKey, TValue>(Dictionary<TKey, TValue>, Action<KeyValuePair<TKey, TValue>>)
    ForEach<TItem, TLocal>(IReadOnlyList<TItem>, Func<TLocal>, Action<TItem, TLocal>, Action<TLocal>)
    ForEach<TKey, TValue, TLocal>(Dictionary<TKey, TValue>, Func<TLocal>, Action<KeyValuePair<TKey, TValue>, TLocal>, Action<TLocal>)
    Sort<T>(T[], Int32, Int32, IComparer<T>)
    Sort<T>(FastList<T>, IComparer<T>)
    Sort<T>(ConcurrentCollector<T>, IComparer<T>)
    | Improve this Doc View Source

    Fields


    MaxDegreeOfParallelism

    public static int MaxDegreeOfParallelism
    Field Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Methods


    For(Int32, Int32, Action<Int32>)

    public static void For(int fromInclusive, int toExclusive, Action<int> action)
    Parameters
    Type Name Description
    System.Int32 fromInclusive
    System.Int32 toExclusive
    System.Action<System.Int32> action

    For<TLocal>(Int32, Int32, Func<TLocal>, Action<Int32, TLocal>, Action<TLocal>)

    public static void For<TLocal>(int fromInclusive, int toExclusive, Func<TLocal> initializeLocal, Action<int, TLocal> action, Action<TLocal> finalizeLocal = null)
    Parameters
    Type Name Description
    System.Int32 fromInclusive
    System.Int32 toExclusive
    System.Func<TLocal> initializeLocal
    System.Action<System.Int32, TLocal> action
    System.Action<TLocal> finalizeLocal
    Type Parameters
    Name Description
    TLocal

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

    public static void ForEach<T>(FastCollection<T> collection, Action<T> action)
    Parameters
    Type Name Description
    FastCollection<T> collection
    System.Action<T> action
    Type Parameters
    Name Description
    T

    ForEach<T>(FastList<T>, Dispatcher.ValueAction<T>)

    public static void ForEach<T>(FastList<T> collection, Dispatcher.ValueAction<T> action)
    Parameters
    Type Name Description
    FastList<T> collection
    Dispatcher.ValueAction<T> action
    Type Parameters
    Name Description
    T

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

    public static void ForEach<T>(FastList<T> collection, Action<T> action)
    Parameters
    Type Name Description
    FastList<T> collection
    System.Action<T> action
    Type Parameters
    Name Description
    T

    ForEach<T>(ConcurrentCollector<T>, Dispatcher.ValueAction<T>)

    public static void ForEach<T>(ConcurrentCollector<T> collection, Dispatcher.ValueAction<T> action)
    Parameters
    Type Name Description
    ConcurrentCollector<T> collection
    Dispatcher.ValueAction<T> action
    Type Parameters
    Name Description
    T

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

    public static void ForEach<T>(ConcurrentCollector<T> collection, Action<T> action)
    Parameters
    Type Name Description
    ConcurrentCollector<T> collection
    System.Action<T> action
    Type Parameters
    Name Description
    T

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

    public static void ForEach<T>(IReadOnlyList<T> collection, Action<T> action)
    Parameters
    Type Name Description
    System.Collections.Generic.IReadOnlyList<T> collection
    System.Action<T> action
    Type Parameters
    Name Description
    T

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

    public static void ForEach<T>(List<T> collection, Action<T> action)
    Parameters
    Type Name Description
    System.Collections.Generic.List<T> collection
    System.Action<T> action
    Type Parameters
    Name Description
    T

    ForEach<TKey, TValue>(Dictionary<TKey, TValue>, Action<KeyValuePair<TKey, TValue>>)

    public static void ForEach<TKey, TValue>(Dictionary<TKey, TValue> collection, Action<KeyValuePair<TKey, TValue>> action)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<TKey, TValue> collection
    System.Action<System.Collections.Generic.KeyValuePair<TKey, TValue>> action
    Type Parameters
    Name Description
    TKey
    TValue

    ForEach<TItem, TLocal>(IReadOnlyList<TItem>, Func<TLocal>, Action<TItem, TLocal>, Action<TLocal>)

    public static void ForEach<TItem, TLocal>(IReadOnlyList<TItem> collection, Func<TLocal> initializeLocal, Action<TItem, TLocal> action, Action<TLocal> finalizeLocal = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IReadOnlyList<TItem> collection
    System.Func<TLocal> initializeLocal
    System.Action<TItem, TLocal> action
    System.Action<TLocal> finalizeLocal
    Type Parameters
    Name Description
    TItem
    TLocal

    ForEach<TKey, TValue, TLocal>(Dictionary<TKey, TValue>, Func<TLocal>, Action<KeyValuePair<TKey, TValue>, TLocal>, Action<TLocal>)

    public static void ForEach<TKey, TValue, TLocal>(Dictionary<TKey, TValue> collection, Func<TLocal> initializeLocal, Action<KeyValuePair<TKey, TValue>, TLocal> action, Action<TLocal> finalizeLocal = null)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<TKey, TValue> collection
    System.Func<TLocal> initializeLocal
    System.Action<System.Collections.Generic.KeyValuePair<TKey, TValue>, TLocal> action
    System.Action<TLocal> finalizeLocal
    Type Parameters
    Name Description
    TKey
    TValue
    TLocal

    Sort<T>(T[], Int32, Int32, IComparer<T>)

    public static void Sort<T>(T[] collection, int index, int length, IComparer<T> comparer)
    Parameters
    Type Name Description
    T[] collection
    System.Int32 index
    System.Int32 length
    System.Collections.Generic.IComparer<T> comparer
    Type Parameters
    Name Description
    T

    Sort<T>(FastList<T>, IComparer<T>)

    public static void Sort<T>(FastList<T> collection, IComparer<T> comparer)
    Parameters
    Type Name Description
    FastList<T> collection
    System.Collections.Generic.IComparer<T> comparer
    Type Parameters
    Name Description
    T

    Sort<T>(ConcurrentCollector<T>, IComparer<T>)

    public static void Sort<T>(ConcurrentCollector<T> collection, IComparer<T> comparer)
    Parameters
    Type Name Description
    ConcurrentCollector<T> collection
    System.Collections.Generic.IComparer<T> comparer
    Type Parameters
    Name Description
    T

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation