コード例 #1
0
    static void ConstructClassHierarchyForSources(string[] sources, ClassHierarchyResultDelegate resultDelegate) {
      // Each source is assumed to refer to all the sources before it

      CompileSourcesAndRun(sources, ".dll", compilerResult => {
        WholeProgram wholeProgram = new WholeProgram(new IAssembly[] { compilerResult.MainAssembly }, compilerResult.Host);

        ClassHierarchy classHierarchy = new ClassHierarchy(wholeProgram.AllDefinedTypes(), compilerResult.Host);

        resultDelegate(compilerResult, classHierarchy);
      });
    }
コード例 #2
0
 static void ConstructClassHierarchyForSource(string source, ClassHierarchyResultDelegate resultDelegate) {
   ConstructClassHierarchyForSources(new string[] { source }, resultDelegate);
 }