Exemple #1
0
        private string ReadSourceFile(string pFile)
        {
            if (!System.IO.File.Exists(pFile))
            {
                CompilerErrors.FileNotFound(pFile);
            }

            string source;

            try
            {
                source = System.IO.File.ReadAllText(pFile);
            }
            catch (Exception)
            {
                CompilerErrors.UnableToReadFile(pFile);
                return(null);
            }

            CurrentDirectory = System.IO.Path.GetDirectoryName(pFile);
            return(source);
        }