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); }); }
static void ConstructClassHierarchyForSource(string source, ClassHierarchyResultDelegate resultDelegate) { ConstructClassHierarchyForSources(new string[] { source }, resultDelegate); }