Exemplo n.º 1
0
Arquivo: Lookup.cs Projeto: 3F/IeXod
        internal Lookup(Hashtable itemsByName, BuildItemGroup projectItems, BuildPropertyGroup properties, ItemDefinitionLibrary itemDefinitionLibrary)
        {
            ErrorUtilities.VerifyThrow(itemDefinitionLibrary != null, "Expect library");

            this.projectItems          = projectItems;
            this.itemDefinitionLibrary = itemDefinitionLibrary;
            LookupEntry entry = new LookupEntry(itemsByName, properties);

            lookupEntries.AddFirst(entry);
        }
Exemplo n.º 2
0
Arquivo: Lookup.cs Projeto: 3F/IeXod
        /// <summary>
        /// Copy constructor (called via Clone() - clearer semantics)
        /// </summary>
        private Lookup(Lookup that)
        {
            // Add the same tables from the original
            foreach (LookupEntry entry in that.lookupEntries)
            {
                this.lookupEntries.AddLast(entry);
            }
            this.projectItems          = that.projectItems;
            this.itemDefinitionLibrary = that.itemDefinitionLibrary;

            // Clones need to share an (item)clone table; the batching engine asks for items from the lookup,
            // then populates buckets with them, which have clone lookups.
            this.cloneTable = that.cloneTable;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Creates an IntrinsicTask object around a "task" node
        /// </summary>
        internal IntrinsicTask(XmlElement taskNodeXmlElement, EngineLoggingServices loggingServices, BuildEventContext eventContext, string executionDirectory, ItemDefinitionLibrary itemDefinitionLibrary)
        {
            this.taskNodeXmlElement    = taskNodeXmlElement;
            this.conditionAttribute    = taskNodeXmlElement.Attributes[XMakeAttributes.condition];
            this.loggingServices       = loggingServices;
            this.buildEventContext     = eventContext;
            this.executionDirectory    = executionDirectory;
            this.itemDefinitionLibrary = itemDefinitionLibrary;

            ErrorUtilities.VerifyThrow(IsIntrinsicTaskName(taskNodeXmlElement.Name), "Only PropertyGroup and ItemGroup are known intrinsic tasks");

            switch (taskNodeXmlElement.Name)
            {
            case XMakeElements.propertyGroup:
                backingType = BackingType.PropertyGroup;
                // If the backing type is a property group, we can just use a property group object; its semantics aren't
                // tangled up with the project object. Put another way, we only really need the code that understands the XML
                // format of a property group, and we can get that without the rest of BuildPropertyGroup getting in the way.
                // Specify that these properties are output properties, so they get reverted when the project is reset.
                backingPropertyGroup = new BuildPropertyGroup(null /* no parent project */, taskNodeXmlElement, PropertyType.OutputProperty);
                break;

            case XMakeElements.itemGroup:
                backingType = BackingType.ItemGroup;
                // If the backing type is an item group, we just re-use the code that understands the XML format of an item group;
                // the semantics of BuildItemGroup are too coupled to its current use in the Project object for us to re-use it.
                backingItemGroupXml = new BuildItemGroupXml(taskNodeXmlElement);
                List <XmlElement> children = backingItemGroupXml.GetChildren();
                backingBuildItemGroupChildren = new List <BuildItemGroupChildXml>(children.Count);

                foreach (XmlElement child in children)
                {
                    BuildItemGroupChildXml childXml = new BuildItemGroupChildXml(child, ChildType.Any);
                    backingBuildItemGroupChildren.Add(childXml);
                }
                break;
            }
        }
Exemplo n.º 4
0
Arquivo: Lookup.cs Projeto: 3F/IeXod
 internal Lookup(Hashtable itemsByName, BuildPropertyGroup properties, ItemDefinitionLibrary itemDefinitionLibrary)
     : this(itemsByName, new BuildItemGroup(), properties, itemDefinitionLibrary)
 {
 }
Exemplo n.º 5
0
 /// <summary>
 /// Constructor
 /// </summary>
 internal SpecificItemDefinitionLibrary(string itemType, ItemDefinitionLibrary itemDefinitionLibrary)
 {
     this.itemType = itemType;
     this.itemDefinitionLibrary = itemDefinitionLibrary;
 }