public void AddFile( FileElement e )
 {
     _elements.Add(e);
 }
Beispiel #2
0
 private void CreateIndexFiles ( DataTable origin, Dictionary<uint, FileElement> dest )
 {
     foreach(DataRow row in origin.Rows)
     {
         bool include = false;
         // If there is no include... include all (.*)
         if (__includeFiles.Count < 1)
             __includeFiles.Add(".*");
         // Check if the filename is included
         String fname = (string)row["SourceFileName"];
         foreach (string entry in __includeFiles)
         {
             if (TestRegex(fname, entry)) 
             {
                 include = true;
                 break;
             }
         }
         // Check if the namespace is excluded
         foreach (string entry in __excludeFiles)
         {
             if (TestRegex(fname, entry)) 
             {
                 include = false;
                 break;
             }
         }
         // If the file passed all the filters, then we must
         // add it to the dictionary
         if (include)
         {
             FileInfo info = new FileInfo(fname);
             FileElement fe = new FileElement (info.Name, info.FullName);
             dest.Add((uint)row["SourceFileID"], fe);
         }
     }
 }
 public void AddFile(FileElement e)
 {
     _elements.Add(e);
 }