mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Work on documents, separated UI from Main
This commit is contained in:
25
RainmeterStudio/Utils/LinqExtension.cs
Normal file
25
RainmeterStudio/Utils/LinqExtension.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace RainmeterStudio.Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Linq extensions
|
||||
/// </summary>
|
||||
public static class LinqExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Applies action on every item from the container
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Enumerable type</typeparam>
|
||||
/// <param name="container">Container</param>
|
||||
/// <param name="action">Action</param>
|
||||
public static void ForEach<T> (this IEnumerable<T> container, Action<T> action)
|
||||
{
|
||||
foreach (var obj in container)
|
||||
action(obj);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user