src/Misc/EFTools/EntityDesign/VisualStudio/VsUtils.cs
// <summary>
//     Finds the first ProjectItem with the specified name in the given ProjectItems.
// </summary>
// <param name="projectItems">The ProjectItems to search</param>
// <param name="nameToMatch">The name to find.</param>
// <returns>ProjectItem if found, null otherwise</returns>
Finds the first ProjectItem with the specified name in the given ProjectItems.
Finds the first ProjectItem with the specified name in the given ProjectItems .
internal static ProjectItem FindFirstProjectItemWithName(ProjectItems projectItems, string nameToMatch)
        {
            if (null == projectItems)
            {
                throw new ArgumentNullException("projectItems");
            }
            return projectItems
                .Cast<ProjectItem>()
                .FirstOrDefault(
                    projectItem => String.Compare(
                        projectItem.Name.ToUpperInvariant(),
                        nameToMatch.ToUpperInvariant(),
                        StringComparison.Ordinal) == 0);
        }
internal static ProjectItem FindFirstProjectItemWithName ( ProjectItems projectItems , string nameToMatch ) { if ( null == projectItems ) { throw new ArgumentNullException ( " " ) ; } return projectItems . Cast < ProjectItem > ( ) . FirstOrDefault ( projectItem => String . Compare ( projectItem . Name . ToUpperInvariant ( ) , nameToMatch . ToUpperInvariant ( ) , StringComparison . Ordinal ) == 0 ) ; }
Finds the first ProjectItem with the specified name in the given ProjectItems.
Finds the first ProjectItem with the specified name in the given ProjectItems .
ProjectItem if found, null otherwise
ProjectItem if found null otherwise
projectItems
ProjectItems
The ProjectItems to search
The ProjectItems to search
nameToMatch
string
The name to find.
The name to find .