Beispiel #1
0
        /// <summary>
        /// Applies the rule.
        /// </summary>
        /// <param name="node">The node instance to modify.</param>
        /// <param name="data">Private data from CheckConsistency().</param>
        public override void Apply(IOldExpression node, object data)
        {
            ResolvedExpression ResolvedExpression = (ResolvedExpression)data;

            node.ResolvedException.Item    = ResolvedExpression.ResolvedException;
            node.ResolvedFinalFeature.Item = ResolvedExpression.ResolvedFinalFeature;
        }
        /// <summary>
        /// Applies the rule.
        /// </summary>
        /// <param name="node">The node instance to modify.</param>
        /// <param name="data">Private data from CheckConsistency().</param>
        public override void Apply(IQueryExpression node, object data)
        {
            ResolvedExpression ResolvedExpression = (ResolvedExpression)data;

            node.ResolvedResult.Item = ResolvedExpression.ResolvedResult;

            node.ConstantSourceList.AddRange(ResolvedExpression.ConstantSourceList);
            node.ConstantSourceList.Seal();

            if (node.ConstantSourceList.Count == 0)
            {
                node.ExpressionConstant.Item = ResolvedExpression.ExpressionConstant;
            }

            Debug.Assert(ResolvedExpression.ResolvedFinalFeature != null || ResolvedExpression.ResolvedFinalDiscrete != null);

            if (ResolvedExpression.ResolvedFinalFeature != null)
            {
                node.ResolvedFinalFeature.Item = ResolvedExpression.ResolvedFinalFeature;
            }

            if (ResolvedExpression.ResolvedFinalDiscrete != null)
            {
                node.ResolvedFinalDiscrete.Item = ResolvedExpression.ResolvedFinalDiscrete;
            }
        }
        /// <summary>
        /// Applies the rule.
        /// </summary>
        /// <param name="node">The node instance to modify.</param>
        /// <param name="data">Private data from CheckConsistency().</param>
        public override void Apply(IOldExpression node, object data)
        {
            ResolvedExpression ResolvedExpression = (ResolvedExpression)data;

            node.ResolvedResult.Item = ResolvedExpression.ResolvedResult;
            node.ConstantSourceList.AddRange(ResolvedExpression.ConstantSourceList);
            node.ConstantSourceList.Seal();
            node.ExpressionConstant.Item = ResolvedExpression.ExpressionConstant;
        }
Beispiel #4
0
        /// <summary>
        /// Applies the rule.
        /// </summary>
        /// <param name="node">The node instance to modify.</param>
        /// <param name="data">Private data from CheckConsistency().</param>
        public override void Apply(IIndexQueryExpression node, object data)
        {
            ResolvedExpression ResolvedExpression = (ResolvedExpression)data;

            Debug.Assert(ResolvedExpression.ConstantSourceList.Count > 0);

            node.ResolvedResult.Item = ResolvedExpression.ResolvedResult;
            node.ConstantSourceList.AddRange(ResolvedExpression.ConstantSourceList);
            node.ConstantSourceList.Seal();
        }
Beispiel #5
0
        /// <summary>
        /// Applies the rule.
        /// </summary>
        /// <param name="node">The node instance to modify.</param>
        /// <param name="data">Private data from CheckConsistency().</param>
        public override void Apply(IIndexQueryExpression node, object data)
        {
            ResolvedExpression ResolvedExpression = (ResolvedExpression)data;

            node.ResolvedException.Item = ResolvedExpression.ResolvedException;

            Debug.Assert(ResolvedExpression.ResolvedFinalFeature is IIndexerFeature);
            node.ResolvedIndexer.Item = ResolvedExpression.ResolvedFinalFeature as IIndexerFeature;

            node.FeatureCall.Item = ResolvedExpression.FeatureCall;
        }
Beispiel #6
0
        /// <summary>
        /// Applies the rule.
        /// </summary>
        /// <param name="node">The node instance to modify.</param>
        /// <param name="data">Private data from CheckConsistency().</param>
        public override void Apply(IPrecursorExpression node, object data)
        {
            ResolvedExpression ResolvedExpression = (ResolvedExpression)data;

            node.ResolvedResult.Item = ResolvedExpression.ResolvedResult;
            node.ConstantSourceList.AddRange(ResolvedExpression.ConstantSourceList);
            node.ConstantSourceList.Seal();
            node.ResolvedPrecursor.Item = ResolvedExpression.SelectedPrecursor;

            if (node.ConstantSourceList.Count == 0)
            {
                node.ExpressionConstant.Item = ResolvedExpression.ExpressionConstant;
            }
        }
Beispiel #7
0
        /// <summary>
        /// Applies the rule.
        /// </summary>
        /// <param name="node">The node instance to modify.</param>
        /// <param name="data">Private data from CheckConsistency().</param>
        public override void Apply(IPrecursorIndexExpression node, object data)
        {
            ResolvedExpression ResolvedExpression = (ResolvedExpression)data;

            node.ResolvedException.Item = ResolvedExpression.ResolvedException;

            Debug.Assert(ResolvedExpression.ResolvedFinalFeature is IIndexerFeature);
            node.ResolvedIndexer.Item = ResolvedExpression.ResolvedFinalFeature as IIndexerFeature;

            node.FeatureCall.Item = ResolvedExpression.FeatureCall;

            IFeature EmbeddingFeature             = node.EmbeddingFeature;
            IFeatureWithPrecursor ResolvedFeature = EmbeddingFeature.ResolvedFeature.Item as IFeatureWithPrecursor;

            Debug.Assert(ResolvedFeature != null);
            ResolvedFeature.MarkAsCallingPrecursor();
        }
Beispiel #8
0
        /// <summary>
        /// Applies the rule.
        /// </summary>
        /// <param name="node">The node instance to modify.</param>
        /// <param name="data">Private data from CheckConsistency().</param>
        public override void Apply(IQueryExpression node, object data)
        {
            ResolvedExpression ResolvedExpression = (ResolvedExpression)data;

            node.ResolvedException.Item = ResolvedExpression.ResolvedException;
            node.SelectedResultList.AddRange(ResolvedExpression.SelectedResultList);
            node.SelectedResultList.Seal();

            if (ResolvedExpression.SelectedOverload != null)
            {
                node.SelectedOverload.Item = ResolvedExpression.SelectedOverload;
            }

            if (ResolvedExpression.SelectedOverloadType != null)
            {
                node.SelectedOverloadType.Item = ResolvedExpression.SelectedOverloadType;
            }

            node.FeatureCall.Item       = ResolvedExpression.FeatureCall;
            node.InheritBySideAttribute = ResolvedExpression.InheritBySideAttribute;
        }
        /// <summary>
        /// Applies the rule.
        /// </summary>
        /// <param name="node">The node instance to modify.</param>
        /// <param name="data">Private data from CheckConsistency().</param>
        public override void Apply(IPrecursorExpression node, object data)
        {
            ResolvedExpression ResolvedExpression = (ResolvedExpression)data;

            node.ResolvedException.Item = ResolvedExpression.ResolvedException;

            if (ResolvedExpression.SelectedOverload != null)
            {
                node.SelectedOverload.Item = ResolvedExpression.SelectedOverload;
            }

            if (ResolvedExpression.SelectedOverloadType != null)
            {
                node.SelectedOverloadType.Item = ResolvedExpression.SelectedOverloadType;
            }

            node.FeatureCall.Item = ResolvedExpression.FeatureCall;

            IFeature EmbeddingFeature             = node.EmbeddingFeature;
            IFeatureWithPrecursor ResolvedFeature = EmbeddingFeature.ResolvedFeature.Item as IFeatureWithPrecursor;

            Debug.Assert(ResolvedFeature != null);
            ResolvedFeature.MarkAsCallingPrecursor();
        }