/// <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 CastExpression Decompile(NetworkState network, ProcessState proc, MethodState method, Statement statement, ICSharpCode.Decompiler.CSharp.Syntax.CastExpression expression) { var res = new CastExpression() { SourceResultType = ResolveExpressionType(network, proc, method, statement, expression), SourceExpression = expression, Expression = Decompile(network, proc, method, statement, expression.Expression), Parent = statement }; res.Expression.Parent = res; return(res); }