internal string ResolveModuleContent(string identifer) { if (!loader.FileExists(identifer)) { return(null); } string debugPath; return(loader.ReadFile(identifer, out debugPath)); }
public void ProcessMain() { if (this.filePath != null || this.readPath != null) { try { locker.AcquireWriterLock(lockTimeout); if (this.filePath != null) { this.fileExists = loader.FileExists(this.filePath); this.filePath = null; } if (this.readPath != null) { this.readContent = loader.ReadFile(this.readPath, out this.debugpath); this.readPath = null; } } catch (Exception e) { this.filePath = null; this.fileExists = false; this.readPath = null; this.readContent = null; this.debugpath = null; throw e; } finally { locker.ReleaseWriterLock(); } } }
void ExecuteFile(string filename) { if (loader.FileExists(filename)) { string debugPath; var context = loader.ReadFile(filename, out debugPath); Eval(context, debugPath); } }
void ExecuteFile(string filename) { if (loader.FileExists(filename)) { string debugPath; var context = loader.ReadFile(filename, out debugPath); Eval(context, debugPath); } else { throw new InvalidProgramException("can not find " + filename); } }