示例#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);
         }
     }
 }
示例#2
0
 public void AddPackage(PackageElement e)
 {
     _elements.Add(e);
 }
 public void AddPackage( PackageElement e )
 {
     _elements.Add(e);
 }