Skip to content

Instantly share code, notes, and snippets.

@philipproplesch
Created July 29, 2015 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philipproplesch/88540038e0d446c93769 to your computer and use it in GitHub Desktop.
Save philipproplesch/88540038e0d446c93769 to your computer and use it in GitHub Desktop.
FindProjectItem
using System;
using System.Collections;
using System.Linq;
using EnvDTE;
namespace NodeStudio.VisualStudio.Wizards.Extensions
{
public static class ProjectItemsExtensions
{
public static ProjectItem FindProjectItem(
this IEnumerable instance,
Func<ProjectItem, bool> predicate)
{
return instance.Cast<ProjectItem>().FirstOrDefault(predicate);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment