Ejemplo n.º 1
0
Archivo: Lookup.cs Proyecto: 3F/IeXod
        /// <summary>
        /// Removes items from the group from the table.
        /// Assumes all the items in the group have the same, provided, type.
        /// </summary>
        private void RemoveItemsFromTableWithBackup(Hashtable table, string name, BuildItemGroup group)
        {
            BuildItemGroup existing = (BuildItemGroup)table[name];

            if (existing != null)
            {
                existing.RemoveItemsWithBackup(group);
            }
        }
Ejemplo n.º 2
0
Archivo: Lookup.cs Proyecto: 3F/IeXod
        /// <summary>
        /// Merge the current scope down into the base scope. This means applying the adds, removes, modifies, and sets
        /// directly into the item and property tables in this scope.
        /// </summary>
        private void MergeScopeIntoLastScope()
        {
            // End of the line for this object: we are done with add tables, and we want to expose our
            // adds to the world
            if (PrimaryAddTable != null)
            {
                foreach (DictionaryEntry entry in PrimaryAddTable)
                {
                    SecondaryTable = Utilities.CreateTableIfNecessary(SecondaryTable);
                    ImportItemsIntoTable(SecondaryTable, (string)entry.Key, (BuildItemGroup)entry.Value);
                    projectItems.ImportItems((BuildItemGroup)entry.Value);
                }
            }

            if (PrimaryRemoveTable != null)
            {
                foreach (DictionaryEntry entry in PrimaryRemoveTable)
                {
                    SecondaryTable = Utilities.CreateTableIfNecessary(SecondaryTable);
                    RemoveItemsFromTableWithBackup(SecondaryTable, (string)entry.Key, (BuildItemGroup)entry.Value);
                    projectItems.RemoveItemsWithBackup((BuildItemGroup)entry.Value);
                }
            }

            if (PrimaryModifyTable != null)
            {
                foreach (KeyValuePair <string, Dictionary <BuildItem, Dictionary <string, string> > > entry in PrimaryModifyTable)
                {
                    SecondaryTable = Utilities.CreateTableIfNecessary(SecondaryTable);
                    ApplyModificationsToTable(SecondaryTable, entry.Key, entry.Value);
                    // Don't have to touch projectItems -- it contains the same set of items
                }
            }

            if (PrimaryPropertySets != null)
            {
                SecondaryProperties = CreatePropertyGroupIfNecessary(SecondaryProperties);

                // At present, this automatically does a backup of any
                // original persisted property because we're using Output properties.
                SecondaryProperties.ImportProperties(PrimaryPropertySets);
            }
        }