Exemplo n.º 1
0
        public string Execute()
        {
            State = new Runtime(text, fileCache)
            {
                UIConsole     = console,
                ModuleFolders = ModuleFolders.Select(f => (FolderName)f).ToArray()
            };
            block.AutoRegister = false;
            var result = block.Evaluate();

            if (result != null)
            {
                LastValue = result.ToString();
                LastType  = result.Type.ToString();
            }
            else
            {
                LastValue = "";
                LastType  = "";
            }

            var buffer = State.PrintBuffer;

            Regions.Dispose();
            return(buffer.IsNotEmpty() ? buffer : "");
        }