Пример #1
0
 /// <summary>
 /// Decompile the specified expression, given the network, process, method, and statement
 /// </summary>
 /// <param name="network">The top-level network.</param>
 /// <param name="proc">The process where the method is located.</param>
 /// <param name="method">The method where the statement is found.</param>
 /// <param name="statement">The statement where the expression is found.</param>
 /// <param name="expression">The expression to decompile</param>
 protected PrimitiveExpression Decompile(NetworkState network, ProcessState proc, MethodState method, Statement statement, ICSharpCode.Decompiler.CSharp.Syntax.PrimitiveExpression expression)
 {
     return(new PrimitiveExpression()
     {
         SourceResultType = ResolveExpressionType(network, proc, method, statement, expression),
         SourceExpression = expression,
         Value = expression.Value,
         Parent = statement
     });
 }
Пример #2
0
        protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
        {
            PrimitiveExpression o = other as PrimitiveExpression;

            return(o != null && (this.Value == AnyValue || object.Equals(this.Value, o.Value)));
        }