/// <summary>
 /// Returns a collection of FileProjectItems that match using the
 /// IsFileNameMatch delegate.
 /// </summary>
 ReadOnlyCollection<FileProjectItem> GetMatchingFiles(IsFileNameMatch match)
 {
     List<FileProjectItem> items = new List<FileProjectItem>();
     foreach (ProjectItem projectItem in Items) {
         FileProjectItem fileProjectItem = projectItem as FileProjectItem;
         if (fileProjectItem != null) {
             if (match(fileProjectItem.FileName)) {
                 items.Add(fileProjectItem);
             }
         }
     }
     return new ReadOnlyCollection<FileProjectItem>(items);
 }
Example #2
0
		/// <summary>
		/// Returns a collection of FileProjectItems that match using the
		/// IsFileNameMatch delegate.
		/// </summary>
		ReadOnlyCollection<FileProjectItem> GetMatchingFiles(IsFileNameMatch match)
		{
			List<FileProjectItem> items = new List<FileProjectItem>();
			foreach (ProjectItem projectItem in Items) {
				FileProjectItem fileProjectItem = projectItem as FileProjectItem;
				if (fileProjectItem != null) {
					if (match(fileProjectItem.FileName)) {
						items.Add(fileProjectItem);
					}
				}
			}
			return new ReadOnlyCollection<FileProjectItem>(items);
		}