MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ForEach

Method ForEach

Source/Engine/Utilities/Extensions.cs:148–158  ·  view source on GitHub ↗

Performs the specified action on each element of the . The type of the elements of the input sequence. The sequence of elements to execute the . The delegate to perform on each element of the <see cref="IEnumerable{T}

(this IEnumerable<T> source, Action<T> action)

Source from the content-addressed store, hash-verified

146 /// <param name="action">The <see cref="Action{T}"/> delegate to perform on each element of the <see cref="IEnumerable{T}"/>1.</param>
147 /// <exception cref="ArgumentException"><paramref name="source"/> or <paramref name="action"/> is <see langword="null"/>.</exception>
148 public static void ForEach<T>(this IEnumerable<T> source, Action<T> action)
149 {
150 if (source == null)
151 throw new ArgumentNullException(nameof(source));
152 if (action == null)
153 throw new ArgumentNullException(nameof(action));
154 foreach (var item in source)
155 {
156 action(item);
157 }
158 }
159
160 /// <summary>
161 /// Chooses a random item from the collection.

Callers 12

DisposeMethod · 0.80
BuildCSGMethod · 0.80
ProcessSceneNodesMethod · 0.80
OnExitMethod · 0.80
OnDragLeaveMethod · 0.80
OnSelectionChangedMethod · 0.80
OnSelectionChangedMethod · 0.80
PackageMethod · 0.80
BuildMethod · 0.80
BuildMethod · 0.80
BuildMethod · 0.80
RunAOTMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected