Ejemplo n.º 1
0
 public override void Dispose()
 {
     if (items != null)
     {
         foreach (SolutionItem e in items)
         {
             e.Dispose();
         }
         items = null;
     }
     files = null;
     base.Dispose();
 }
Ejemplo n.º 2
0
 protected override void OnDispose()
 {
     if (items != null)
     {
         foreach (SolutionFolderItem e in items)
         {
             e.Dispose();
         }
         items = null;
     }
     files = null;
     base.OnDispose();
 }
Ejemplo n.º 3
0
 static SolutionItem FindSolutionItemRecursive(SolutionFolderItemCollection items, string fullPath)
 {
     foreach (SolutionFolderItem it in items)
     {
         if (it is SolutionFolder sf)
         {
             SolutionItem r = FindSolutionItemRecursive(sf.Items, fullPath);
             if (r != null)
             {
                 return(r);
             }
         }
         else if (it is SolutionItem se)
         {
             if (!string.IsNullOrEmpty(se.FileName) && fullPath == Path.GetFullPath(se.FileName))
             {
                 return((SolutionItem)it);
             }
         }
     }
     return(null);
 }