private static Hashtable myAssemblies = new Hashtable();
// Key: 腳本原始碼文字, Value: 編譯後組件
編譯前先查快取,命中則跳過編譯直接使用。
private CompilerParameters myCompilerParameters = new CompilerParameters();
public StringCollection ReferencedAssemblies => myCompilerParameters.ReferencedAssemblies;
private StringCollection myVBCompilerImports = new StringCollection();
public StringCollection VBCompilerImports => myVBCompilerImports;
/imports 參數,注入全域命名空間Microsoft.VisualBasicmyAssemblies[strRuntimeSource]CompilerParameters(記憶體組件、偵錯資訊、Imports 選項)VBCodeProvider 執行編譯CompiledAssembly