Ejemplo n.º 1
0
        public void TestOpen()
        {
            var file = _fileSystem.Open("testfile.txt", FileMode.Open, FileAccess.Read);

            Assert.True(file != null);
            file.Close();

            var file2 = _fileSystem.Open("../inaccessible.txt", FileMode.Open, FileAccess.Read);

            Assert.True(file2 == null);
        }
Ejemplo n.º 2
0
        static async Task Main(string[] args)
        {
            var fileSystem = new NativeFileSystem(".");

            using (var stream = fileSystem.Open("Program.cs", FileMode.Open, FileAccess.Read))
            {
                using (var sr = new StreamReader(stream))
                {
                    Console.Write(sr.ReadToEnd());
                }
            }

            //var manager = new ScriptModuleManager();
            //await manager.ReloadAllAsync();
        }