public Value GetLocalVariableThis() { DebugLocalVariableInfo thisVar = this.MethodInfo.GetLocalVariableThis(); if (thisVar != null) { return(thisVar.GetValue(this)); } return(null); }
/// <summary> Get local variable with given name </summary> /// <returns> Null if not found </returns> public Value GetLocalVariableValue(string name) { DebugLocalVariableInfo loc = this.MethodInfo.GetLocalVariable(this.IP, name); if (loc == null) { return(null); } return(loc.GetValue(this)); }
/// <summary> Get local variable with given name </summary> /// <returns> Null if not found </returns> public Value GetLocalVariableValue(string name) { var ip = this.IP; if (ip.IsInvalid) { return(null); } DebugLocalVariableInfo loc = this.MethodInfo.GetLocalVariable(ip.Offset, name); if (loc == null) { return(null); } return(loc.GetValue(this)); }
public static Expression GetExpression(this DebugLocalVariableInfo locVar) { return(new IdentifierExpression(locVar.Name).SetStaticType((DebugType)locVar.LocalType)); }