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); } }
public ItemExpressionFragment(ExpressionShredder.ItemExpressionCapture capture, string itemSpecFragment, ItemSpec <P, I> containingItemSpec) : base(itemSpecFragment, containingItemSpec.ItemSpecLocation.File) { Capture = capture; _containingItemSpec = containingItemSpec; _expander = _containingItemSpec.Expander; }
public ItemExpressionFragment(ExpressionShredder.ItemExpressionCapture capture, string itemSpecFragment, ItemSpec <P, I> containingItemSpec) { Capture = capture; ItemSpecFragment = itemSpecFragment; _containingItemSpec = containingItemSpec; _expander = _containingItemSpec.Expander; }
public ItemExpressionFragment(ExpressionShredder.ItemExpressionCapture capture, string itemSpecFragment, ItemSpec <P, I> containingItemSpec, string projectDirectory) : base(itemSpecFragment, projectDirectory) { Capture = capture; _containingItemSpec = containingItemSpec; _expander = _containingItemSpec.Expander; }
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); } } }
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); } } }
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); } }