コード例 #1
0
        void ProcessSingleItemVectorExpressionForInclude(string expression, OperationBuilder operationBuilder, IElementLocation elementLocation, out bool isItemListExpression)
        {
            isItemListExpression = false;

            //  Code corresponds to Expander.ExpandSingleItemVectorExpressionIntoItems
            if (expression.Length == 0)
            {
                return;
            }
            else
            {
                ExpressionShredder.ItemExpressionCapture match = Expander <P, I> .ExpandSingleItemVectorExpressionIntoExpressionCapture(
                    expression, ExpanderOptions.ExpandItems, elementLocation);

                if (match == null)
                {
                    return;
                }

                isItemListExpression = true;

                operationBuilder.Operations.Add(Tuple.Create(ItemOperationType.Expression, (object)match));

                AddReferencedItemLists(operationBuilder, match);
            }
        }
コード例 #2
0
        public ItemExpressionFragment(ExpressionShredder.ItemExpressionCapture capture, string itemSpecFragment, ItemSpec <P, I> containingItemSpec)
            : base(itemSpecFragment, containingItemSpec.ItemSpecLocation.File)
        {
            Capture = capture;

            _containingItemSpec = containingItemSpec;
            _expander           = _containingItemSpec.Expander;
        }
コード例 #3
0
ファイル: ItemSpec.cs プロジェクト: xetrocoen/msbuild
        public ItemExpressionFragment(ExpressionShredder.ItemExpressionCapture capture, string itemSpecFragment, ItemSpec <P, I> containingItemSpec)
        {
            Capture          = capture;
            ItemSpecFragment = itemSpecFragment;

            _containingItemSpec = containingItemSpec;
            _expander           = _containingItemSpec.Expander;
        }
コード例 #4
0
        public ItemExpressionFragment(ExpressionShredder.ItemExpressionCapture capture, string itemSpecFragment, ItemSpec <P, I> containingItemSpec, string projectDirectory)
            : base(itemSpecFragment, projectDirectory)
        {
            Capture = capture;

            _containingItemSpec = containingItemSpec;
            _expander           = _containingItemSpec.Expander;
        }
コード例 #5
0
 private void AddReferencedItemLists(OperationBuilder operationBuilder, ExpressionShredder.ItemExpressionCapture match)
 {
     if (match.ItemType != null)
     {
         AddReferencedItemList(match.ItemType, operationBuilder.ReferencedItemLists);
     }
     if (match.Captures != null)
     {
         foreach (var subMatch in match.Captures)
         {
             AddReferencedItemLists(operationBuilder, subMatch);
         }
     }
 }
コード例 #6
0
 void AddReferencedItemLists(OperationBuilder operationBuilder, ExpressionShredder.ItemExpressionCapture match)
 {
     if (match.ItemType != null)
     {
         var itemList = GetItemList(match.ItemType);
         if (itemList != null)
         {
             operationBuilder.ReferencedItemLists[match.ItemType] = itemList;
         }
     }
     if (match.Captures != null)
     {
         foreach (var subMatch in match.Captures)
         {
             AddReferencedItemLists(operationBuilder, subMatch);
         }
     }
 }
コード例 #7
0
        private void AddItemReferences(string expression, OperationBuilder operationBuilder, IElementLocation elementLocation)
        {
            if (expression.Length == 0)
            {
                return;
            }
            else
            {
                ExpressionShredder.ItemExpressionCapture match = Expander <P, I> .ExpandSingleItemVectorExpressionIntoExpressionCapture(
                    expression, ExpanderOptions.ExpandItems, elementLocation);

                if (match == null)
                {
                    return;
                }

                AddReferencedItemLists(operationBuilder, match);
            }
        }