public void GetMethodInfo(SerializedDnToken key, out Parameter[] parameters, out Local[] locals, out IILVariable[] decLocals) { parameters = null; locals = null; decLocals = null; foreach (var tab in fileTabManager.VisibleFirstTabs) { if (parameters != null && decLocals != null) break; var uiContext = tab.UIContext as ITextEditorUIContext; var cm = uiContext.TryGetCodeMappings(); if (cm == null) continue; var mapping = cm.TryGetMapping(key); if (mapping == null) continue; var method = mapping.Method; if (mapping.LocalVariables != null && method.Body != null) { locals = method.Body.Variables.ToArray(); decLocals = new IILVariable[method.Body.Variables.Count]; foreach (var v in mapping.LocalVariables) { if (v.GeneratedByDecompiler) continue; if (v.OriginalVariable == null) continue; if ((uint)v.OriginalVariable.Index >= decLocals.Length) continue; decLocals[v.OriginalVariable.Index] = v; } } parameters = method.Parameters.ToArray(); } }
public static void Set(this ILGenerator gen, IILVariable variable, IILPointer value) { if (value == null) { value = ILPointer.Null; } variable.PreSet(gen); value.Load(gen); variable.Set(gen); }
public void GetMethodInfo(SerializedDnToken key, out Parameter[] parameters, out Local[] locals, out IILVariable[] decLocals) { parameters = null; locals = null; decLocals = null; foreach (var tab in fileTabManager.VisibleFirstTabs) { if (parameters != null && decLocals != null) { break; } var uiContext = tab.UIContext as ITextEditorUIContext; var cm = uiContext.TryGetCodeMappings(); if (cm == null) { continue; } var mapping = cm.TryGetMapping(key); if (mapping == null) { continue; } var method = mapping.Method; if (mapping.LocalVariables != null && method.Body != null) { locals = method.Body.Variables.ToArray(); decLocals = new IILVariable[method.Body.Variables.Count]; foreach (var v in mapping.LocalVariables) { if (v.GeneratedByDecompiler) { continue; } if (v.OriginalVariable == null) { continue; } if ((uint)v.OriginalVariable.Index >= decLocals.Length) { continue; } decLocals[v.OriginalVariable.Index] = v; } } parameters = method.Parameters.ToArray(); } }
object Create(IToolTipContentCreatorContext context, IILVariable local) { return Create(context, local.OriginalVariable, local.Name); }
object Create(IToolTipContentCreatorContext context, IILVariable local) { return(Create(context, local.OriginalVariable, local.Name)); }