private static void VerifyDebugInfoExpression(DebugInfoExpression ex, SymbolDocumentInfo document, int startLine, int startColumn, int endLine, int endColumn, bool isClear)
        {
            Assert.Same(document, ex.Document);
            Assert.Equal(startLine, ex.StartLine);
            Assert.Equal(startColumn, ex.StartColumn);
            Assert.Equal(endLine, ex.EndLine);
            Assert.Equal(endColumn, ex.EndColumn);

            Assert.Equal(ExpressionType.DebugInfo, ex.NodeType);
            Assert.Equal(typeof(void), ex.Type);
            Assert.Equal(isClear, ex.IsClear);
        }
 /// <summary>
 /// Visits the <see cref="System.Linq.Expressions.DebugInfoExpression"/>.
 /// </summary>
 /// <param name="node">The expression to visit.</param>
 /// <returns>The modified expression, if it or any subexpression was modified; otherwise, returns the original expression.</returns>
 protected override Expression VisitDebugInfo(DebugInfoExpression node)
 {
     InvalidExpression(node);
     return(null);
 }
示例#3
0
        internal void VisitDebugInfo(DebugInfoExpression node)
        {
            var s = string.Format(CultureInfo.CurrentCulture, "<DebugInfo({0}: {1}, {2}, {3}, {4})>", node.Document.FileName, node.StartLine, node.StartColumn, node.EndLine, node.EndColumn);

            Out(s);
        }
 /// <param name="node">The expression to visit.</param>
 /// <returns>The modified expression, if it or any subexpression was modified; otherwise, returns the original expression.</returns>
 protected override Expression VisitDebugInfo(DebugInfoExpression node)
 {
     throw new NotSupportedException(string.Format(Resources.EX_PROCESS_NODE_NOT_SUPPORT, node.GetType().Name));
 }
 internal virtual void MarkSequencePoint(LambdaExpression method, MethodBase methodBase, ILGenerator ilg, DebugInfoExpression sequencePoint) {
     MarkSequencePoint(method, ilg.ILOffset, sequencePoint);
 }
示例#6
0
 protected override Expression VisitDebugInfo(DebugInfoExpression node) => throw new ApplicationException();
示例#7
0
 /// <summary>
 /// Visits the <see cref="DebugInfoExpression" />.
 /// </summary>
 /// <param name="node">The expression to visit.</param>
 /// <returns>The modified expression, if it or any subexpression was modified;
 /// otherwise, returns the original expression.</returns>
 protected internal virtual Expression VisitDebugInfo(DebugInfoExpression node)
 {
     return(node);
 }
 public override void MarkSequencePoint(LambdaExpression method, int ilOffset, DebugInfoExpression sequencePoint) {
     throw Error.PdbGeneratorNeedsExpressionCompiler();
 }
示例#9
0
        protected override Expression VisitDebugInfo(DebugInfoExpression node)
        {
            this.ThrowUnsupportedNodeException(node);

            return(base.VisitDebugInfo(node));
        }
示例#10
0
 protected override Expression VisitDebugInfo(DebugInfoExpression node)
 {
     throw new ArgumentException($"Expecxting a path like x.Property.Value was {this.expression}", nameof(node));
 }
 public override void MarkSequencePoint(LambdaExpression lambda, int ilOffset, DebugInfoExpression expression)
 {
 }
示例#12
0
 protected override Expression VisitDebugInfo(DebugInfoExpression node)
 {
     throw new NotSupportedException("Debug info not supported by OData Query Filters.");
 }
示例#13
0
 protected override Expression VisitDebugInfo(DebugInfoExpression node)
 => context.Rewrite(node, base.VisitDebugInfo);
        protected override Expression VisitDebugInfo(DebugInfoExpression node)
        {
            Combine(node.Document.FileName);

            return(base.VisitDebugInfo(node));
        }
示例#15
0
 internal virtual void MarkSequencePoint(LambdaExpression method, MethodBase methodBase, ILGenerator ilg, DebugInfoExpression sequencePoint)
 {
     MarkSequencePoint(method, ilg.ILOffset, sequencePoint);
 }
示例#16
0
 protected override Expression VisitDebugInfo(DebugInfoExpression node)
 {
     return(this.GiveUp <DebugInfoExpression>(node));
 }
示例#17
0
 public override void MarkSequencePoint(LambdaExpression method, int ilOffset, DebugInfoExpression node)
 {
     RubyMethodDebugInfo.GetOrCreate(method.Name).AddMapping(ilOffset, node.StartLine);
 }
示例#18
0
 protected override bool VisitDebugInfo(DebugInfoExpression node) => false;
 protected override Expression VisitDebugInfo(DebugInfoExpression node)
 {
     throw new NotImplementedException();
 }
示例#20
0
 public DebugInfoExpressionProxy(DebugInfoExpression node)
 {
     _node = node;
 }
示例#21
0
 protected override Expression VisitDebugInfo(DebugInfoExpression node)
 {
     return(GiveUp(node));
 }
 protected override Expression VisitDebugInfo(DebugInfoExpression node) =>
 GiveUp(node);
 /// <summary>
 /// Marks a sequence point.
 /// </summary>
 /// <param name="method">The lambda being generated.</param>
 /// <param name="ilOffset">IL offset where to mark the sequence point.</param>
 /// <param name="sequencePoint">Debug informaton corresponding to the sequence point.</param>
 public abstract void MarkSequencePoint(LambdaExpression method, int ilOffset, DebugInfoExpression sequencePoint);
示例#24
0
 protected override Expression MakeDebugInfo(DebugInfoExpression node) => node;
示例#25
0
 bool IEvaluatableExpressionFilter.IsEvaluatableDebugInfo(DebugInfoExpression node) => true;
 /// <summary>
 /// Visits the children of the DebugInfoExpression.
 /// </summary>
 /// <param name="node">Expression to visit.</param>
 /// <returns>Result of visiting the expression.</returns>
 protected override TExpression VisitDebugInfo(DebugInfoExpression node) => throw NotSupported(node);
 protected override Expression VisitDebugInfo(DebugInfoExpression node)
 {
     this.expressions.Add(node);
     return(base.VisitDebugInfo(node));
 }
示例#28
0
        public static void ToStringTest()
        {
            DebugInfoExpression e = Expression.DebugInfo(Expression.SymbolDocument("foo.cs"), 12, 23, 34, 45);

            Assert.Equal("<DebugInfo(foo.cs: 12, 23, 34, 45)>", e.ToString());
        }
示例#29
0
 protected override Expression VisitDebugInfo(DebugInfoExpression node)
 {
     return(base.VisitDebugInfo(node));
 }
示例#30
0
 protected override Expression VisitDebugInfo(DebugInfoExpression node)
 => throw new InvalidOperationException();
示例#31
0
 /// <summary>
 /// Marks a sequence point.
 /// </summary>
 /// <param name="method">The lambda being generated.</param>
 /// <param name="ilOffset">IL offset where to mark the sequence point.</param>
 /// <param name="sequencePoint">Debug informaton corresponding to the sequence point.</param>
 public abstract void MarkSequencePoint(LambdaExpression method, int ilOffset, DebugInfoExpression sequencePoint);
示例#32
0
            }             // ctor

            public override void MarkSequencePoint(LambdaExpression method, int ilOffset, DebugInfoExpression sequencePoint)
            {
                chunk.AddDebugInfo(method, ilOffset, sequencePoint);
            }     // proc MarkSequencePoint
示例#33
0
 protected override object GetResultFromDebugInfo(DebugInfoExpression exp)
 {
     throw new NotImplementedException("Never encountered any of these.");
 }
 private static Paths BuildPathsDebugInfo(DebugInfoExpression node, Context context)
 {
     throw new NotImplementedException();
 }
 public DebugInfoExpressionProxy(DebugInfoExpression node) {
     _node = node;
 }
 internal override void MarkSequencePoint(LambdaExpression method, MethodBase methodBase, ILGenerator ilg, DebugInfoExpression sequencePoint) {
     MethodBuilder builder = methodBase as MethodBuilder;
     if (builder != null) {
         ilg.MarkSequencePoint(GetSymbolWriter(builder, sequencePoint.Document), sequencePoint.StartLine, sequencePoint.StartColumn, sequencePoint.EndLine, sequencePoint.EndColumn);
     }
 }