Files
PCK-Studio/PCK-Studio/Extensions/EnumerableExtensions.cs
Miku-666 6f273008c9 Manage Pcks feature (#18)
* Add Console Installer Form

* Improved FTPClient constructor

* Add FTPClient.SetTimeoutLimit and made download and upload file accept a stream

* Add new Panels and move old for reference

* Update WiiU Install Panel

* Update FTPClient.ListDirectory

* Add Cemu Installer Panel

* CemuInstallPanel - Add path validation

* ConsoleInstaller - Removed PS3 support

* Rename 'Additional-Features' folder to 'Features'

* CemuInstallPanel - Add context item to add new custom pcks

* CemuInstallerPanel - Add function to remove pck from DLC folder

* CemuInstallPanel - Add directory exist check

* Rename 'ConsoleInstaller' to 'PckManager'

* Renamed Panels

* FTPClient.cs - Prefixed private class members with an underscore

* PckManager.cs - Renamed 'selectedPlatformComboBox' to 'supportedPlatformComboBox'

* CemuPanel.cs - Add better Directory name validation

* WiiUPanel.cs - Renamed some designer component names

* PS3Panel.cs - Removed unused text box

* PckManager.cs - Added message box for unimplemented panels

* CemuPanel.cs - Improved file path handling

* Removed PS3Panel.cs

* PckManager.cs - For now only Cemu is supported !

* Moved Features folder to project root and changed namespace of PckManager

* Removed StringExtensions and made method 'ContainsAny' generic and moved it to EnumerableExtensions
2023-05-07 16:29:37 +02:00

29 lines
700 B
C#

using System.Collections.Generic;
using System.Linq;
namespace PckStudio.Extensions
{
internal static class EnumerableExtensions
{
public static IEnumerable<(int index, T type)>enumerate<T>(this IEnumerable<T> array)
{
int i = 0;
foreach (var item in array)
{
yield return (i++, item);
}
yield break;
}
public static bool ContainsAny<T>(this IEnumerable<T> array, params T[] items)
{
foreach (var item in array)
{
if (items.Contains(item))
return true;
}
return false;
}
}
}