Cosmos/source/Cosmos.IL2CPU/Extensions/MethodExtensions.cs
Charles Betros aa08e48366 Get locals
2017-01-28 16:39:30 -06:00

30 lines
793 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Metadata;
using System.Threading.Tasks;
using Cosmos.Assembler;
using Cosmos.Debug.Symbols;
namespace Cosmos.IL2CPU.Extensions
{
public static class MethodExtensions
{
public static string GetFullName(this MethodBase aMethod)
{
return LabelName.GetFullName(aMethod);
}
public static IList<Type> GetLocalVariables(this MethodBase aThis)
{
return DebugSymbolReader.GetLocalVariableInfos(aThis);
}
public static MethodBodyBlock GetMethodBody(this MethodBase aThis)
{
return DebugSymbolReader.GetMethodBodyBlock(aThis.Module, aThis.MetadataToken);
}
}
}