using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace RainmeterStudio.Core.Utils
{
///
/// Linq extensions
///
public static class LinqExtensions
{
///
/// Applies action on every item from the container
///
/// Enumerable type
/// Container
/// Action
public static void ForEach (this IEnumerable container, Action action)
{
foreach (var obj in container)
action(obj);
}
///
/// Appends an item at the end of the container
///
/// Enumerable type
/// Container
/// Item to append
public static IEnumerable Append (this IEnumerable container, T item)
{
foreach (var i in container)
yield return i;
yield return item;
}
}
}