public static IList<PARAMETER> GetFunArguments(CorFunction function)
        {
            //IMetadataImport m_importer;

            MetaModule module = new MetaModule(function.Module.corModule);
            //MetadataMethodInfo method = module.FindMethod(function.Class.Token, function.Token);
            MetaType type = module.FindType(function.Class.Token);
            MetadataMethodInfo method = type.FindMethod((int)function.Token);
            return method.Arguments;
        }
        public static string GetFullName(CorFunction function)
        {
            //IMetadataImport m_importer;

            MetaModule module = new MetaModule(function.Module.corModule);
            //MetadataMethodInfo method = module.FindMethod(function.Class.Token, function.Token);
            MetaType type = module.FindType(function.Class.Token);
            MetadataMethodInfo method = type.FindMethod((int)function.Token);
            return method.Signature;
        }
        public static METHODSig GetMethodSig(CorFunction function)
        {
            METHODSig methodsig = new METHODSig();
            MetaModule module = new MetaModule(function.Module.corModule);
            //MetadataMethodInfo method = module.FindMethod(function.Class.Token, function.Token);
            MetaType type = module.FindType(function.Class.Token);
            if (type != null){
                MetadataMethodInfo method = type.FindMethod((int)function.Token);
                if (method != null){
                    methodsig.name = type.Name + "." + method.Name;
                    methodsig.isStatic = method.IsStatic;
                    methodsig.isGeneric = method.IsGenericMethod;
                    //methodsig.retuntype
                    //ParameterInfo[] paramaters = method.GetParameters();
                    //if ((paramaters != null) && (paramaters.Length > 0)){
                    //    List<PARAMETER> prms = new List<PARAMETER>();
                    //    foreach (ParameterInfo arg in paramaters){
                    //        PARAMETER param = new PARAMETER();
                    //        param.name = arg.Name;
                    //        //param.name = type???
                    //    }
                    //}
                }
            }

            return methodsig;
        }
 public CorFunction GetCorFuntion(uint token)
 {
     ICorDebugFunction fun = null;
     CorFunction corFun = null;
        corModule.GetFunctionFromToken(token,out fun);
        if (fun != null) {
        corFun = new CorFunction(fun);
        }
        return corFun;
 }