コード例 #1
0
 protected virtual unsafe MethodBuilder DefineMethod(TypeBuilder typeBuilder, BCSYM_Proc* pProc)
 {
     string name = new string(*((char**) (pProc + 12)));
     BCSYM* pSymbol = BCSYM.DigThroughNamedType(*((BCSYM* modopt(IsConst) modopt(IsConst)*) (pProc + 80)));
     Type returnType = this.GetType(typeBuilder, pSymbol);
     MethodAttributes methodAttributes = GetMethodAttributes(pProc);
     Type[] parameterTypes = this.GetParameterTypes(typeBuilder, pProc);
     return typeBuilder.DefineMethod(name, methodAttributes, returnType, parameterTypes);
 }
コード例 #2
0
 protected virtual unsafe ConstructorBuilder DefineConstructor(TypeBuilder typeBuilder, BCSYM_Proc* pProc)
 {
     MethodAttributes methodAttributes = GetMethodAttributes(pProc);
     Type[] parameterTypes = this.GetParameterTypes(typeBuilder, pProc);
     return typeBuilder.DefineConstructor(methodAttributes, CallingConventions.Standard, parameterTypes);
 }