コード例 #1
0
ファイル: IntrinsicTask.cs プロジェクト: yxbdali/msbuild
        /// <summary>
        /// Add items to the world. This is the in-target equivalent of an item include expression outside of a target.
        /// </summary>
        private void ExecuteAdd(BuildItemGroupChildXml child, ItemBucket bucket)
        {
            // By making the items "not persisted", we ensure they are cleaned away when the project is reset
            BuildItem item = new BuildItem(child.Element, false /* not imported */, false /* not persisted */, itemDefinitionLibrary);

            // If the condition on the item is false, Evaluate returns an empty group
            BuildItemGroup itemsToAdd = item.Evaluate(bucket.Expander, executionDirectory, true /* expand metadata */, ParserOptions.AllowAll, loggingServices, buildEventContext);

            bucket.Lookup.AddNewItems(itemsToAdd);
        }
コード例 #2
0
ファイル: IntrinsicTask.cs プロジェクト: nikson/msbuild
        /// <summary>
        /// Add items to the world. This is the in-target equivalent of an item include expression outside of a target.
        /// </summary>
        private void ExecuteAdd(BuildItemGroupChildXml child, ItemBucket bucket)
        {
            // By making the items "not persisted", we ensure they are cleaned away when the project is reset
            BuildItem item = new BuildItem(child.Element, false /* not imported */, false /* not persisted */, itemDefinitionLibrary);

            // If the condition on the item is false, Evaluate returns an empty group
            BuildItemGroup itemsToAdd = item.Evaluate(bucket.Expander, executionDirectory, true /* expand metadata */, ParserOptions.AllowAll, loggingServices, buildEventContext);

            bucket.Lookup.AddNewItems(itemsToAdd);
        }