Esempio n. 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(IPrecursorInstruction node, object data)
        {
            IResultException ResolvedException = ((Tuple <IResultException, IFeatureCall>)data).Item1;
            IFeatureCall     FeatureCall       = ((Tuple <IResultException, IFeatureCall>)data).Item2;

            node.ResolvedException.Item = ResolvedException;
            node.FeatureCall.Item       = FeatureCall;

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

            Debug.Assert(ResolvedFeature != null);
            ResolvedFeature.MarkAsCallingPrecursor();
        }
Esempio n. 2
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();
        }
        /// <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();
        }