Esempio n. 1
0
        public object EvalFile(string fileName, Type returnType)
        {
            var resolvedPath = ResolveFilePath("", fileName);

            if (resolvedPath != null)
            {
                var source = _fileSystem.ReadAllBytes(resolvedPath);
                return(_mainContext.EvalSource(source, resolvedPath, returnType));
            }
            else
            {
                throw new Exception("can not resolve file path");
            }
        }