Пример #1
0
            public ItemExpressionFragment(
                ExpressionShredder.ItemExpressionCapture capture,
                string textFragment,
                ItemSpec <P, I> containingItemSpec,
                string projectDirectory)
                : base(textFragment, projectDirectory)
            {
                Capture = capture;

                _containingItemSpec = containingItemSpec;
                _expander           = _containingItemSpec.Expander;
            }
Пример #2
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);
         }
     }
 }
Пример #3
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);
            }
        }