private AnalysisNet.IInstruction ProcessMethodCallIndirect(Cecil.Cil.Instruction op) { Cecil.FunctionPointerType cciFunctionPointer = op.Operand as Cecil.FunctionPointerType; AnalysisNet.Types.FunctionPointerType ourFunctionPointer = typeExtractor.ExtractType(cciFunctionPointer) as AnalysisNet.Types.FunctionPointerType; AnalysisNetBytecode.IndirectMethodCallInstruction instruction = new AnalysisNetBytecode.IndirectMethodCallInstruction((uint)op.Offset, ourFunctionPointer); return(instruction); }
private AnalysisNet.Types.FunctionPointerType ExtractType(Cecil.FunctionPointerType typeref) { AnalysisNet.Types.IType returnType = ExtractType(typeref.ElementType); AnalysisNet.Types.FunctionPointerType type = new AnalysisNet.Types.FunctionPointerType(returnType); //ExtractCustomAttributes(type.Attributes, typeref.Attr); ExtractParameters(type.Parameters, typeref.Parameters); //type.IsStatic = typeref.IsStatic; type.IsStatic = !(typeref.HasThis || typeref.ExplicitThis); return(type); }