private void addToListBoxAutoComplete(InstrospectiveClass ic, Type toExtractMembers) { if (ic == null) ic = new InstrospectiveClass(); foreach (String s in ic.getMembers(toExtractMembers, isStatic)) this.listBoxAutoComplete.Items.Add(s); }
private bool verifyIfTypeIsDefinedOnAssemblyReferences(String type) { if (isLoading) implicitCompilation(editorPane.Text); else implicitCompilation(removeCurrentLine()); var setup = new AppDomainSetup { ApplicationName = "secondApp", ApplicationBase = currentExecutableDirectory, ShadowCopyFiles = "true", ShadowCopyDirectories = currentExecutableDirectory, //CachePath = Directory.GetCurrentDirectory() }; //ic = new InstrospectiveClass(); ap = AppDomain.CreateDomain("compileDomain", null, setup); ic = (InstrospectiveClass)ap.CreateInstanceAndUnwrap( Assembly.GetExecutingAssembly().FullName, "CSharpEditor.InstrospectiveClass"); foreach (String s in referencedAssemblies) { ic.loadAssembly(s); if (ic.checkType(type)) return true; } //verificar tipos definidos no proprio editorPane; DirectoryInfo dirInfo = new DirectoryInfo(Directory.GetCurrentDirectory()); foreach (var file in dirInfo.GetFiles("*.exe")) { if(file.Name.Equals("tempFile.exe")) { ic.loadAssembly(file.FullName); if (ic.checkType(type)) return true; } } return false; }