Ejemplo n.º 1
0
 private void CreateIndexPackages ( ProjectElement project, DataTable origin, Dictionary<String, PackageElement> dest )
 {
     foreach(DataRow row in origin.Rows)
     {
         bool include = false;
         // If there is no include... include all (.*)
         if (__includeNamespaces.Count < 1)
             __includeNamespaces.Add(".*");
         // Check if the namespace is included
         String nsname = (string)row["NamespaceName"];
         foreach (string entry in __includeNamespaces)
         {
             if (TestRegex(nsname, entry)) 
             {
                 include = true;
                 break;
             }
         }
         // Check if the namespace is excluded
         foreach (string entry in __excludeNamespaces)
         {
             if (TestRegex(nsname, entry)) 
             {
                 include = false;
                 break;
             }
         }
         // If the namespace passed all the filters, then we must
         // add it to the project
         if (include)
         {
             PackageElement pe = new PackageElement (nsname);
             dest.Add((string)row["NamespaceKeyName"], pe);
             project.AddPackage(pe);
         }
     }
 }
Ejemplo n.º 2
0
 public void AddPackage(PackageElement e)
 {
     _elements.Add(e);
 }
Ejemplo n.º 3
0
 public void AddPackage( PackageElement e )
 {
     _elements.Add(e);
 }