Example #1
0
        internal string ResolveModuleContent(string identifer)
        {
            if (!loader.FileExists(identifer))
            {
                return(null);
            }

            string debugPath;

            return(loader.ReadFile(identifer, out debugPath));
        }
Example #2
0
 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();
         }
     }
 }
Example #3
0
 void ExecuteFile(string filename)
 {
     if (loader.FileExists(filename))
     {
         string debugPath;
         var    context = loader.ReadFile(filename, out debugPath);
         Eval(context, debugPath);
     }
 }
Example #4
0
 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);
     }
 }