Example #1
0
  public static void dumpAssembly(Assembly assem) {
    Module[] modules = assem.GetModules();
    // 	System.out.println("Modules in assembly " + assem +
    // 			   " (" + modules.length + ")");
    // 	for (int i = 0; i < modules.length; i++) {
    // 	    System.out.println("\t" + modules[i]);
    // 	}

    Type[] types = modules[0].GetTypes();
    // 	System.out.println("Types in assembly " + assem +
    // 			   " (" + types.length + ")");
    for (int i = 0; i < types.length; i++) {
      System.out.println("#" + i + " -> " + types[i]);
      types[i].completeType();
    }
  }
Example #2
0
  public static void main(String[] args) {
    if (args.length < 1) {
      System.err.println("You must supply a filename!");
      System.exit(1);
    }

    Assembly assem = Assembly.LoadFrom(args[0]);
    Type.initMSCORLIB(assem);

    // "System.Collections.ArrayList"
    if (args.length >= 2) {
      Type t = Type.GetType(args[1]);
      dumpType(System.out, t);
    } else {
      dumpAssembly(assem);
    }
  }