Exemplo n.º 1
0
        internal string ResolveModuleContent(string identifer)
        {
            if (!loader.FileExists(identifer))
            {
                return(null);
            }

            string debugPath;

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