Ejemplo n.º 1
0
        private void CreateReportWithDefaultTemplate(GatheredResultSet result)
        {
            var fileName = Path.GetTempFileName();
            var fs       = new Filesystem();

            try
            {
                new ResourceWriter(fs).WriteResource("DefaultSparkTemplate.spark", fileName, true);
                var generator = new SparkReportGenerator <GatheredResultSetView>(_fileWriter, fileName);
                generator.Handle(result);
            }
            finally
            {
                fs.Delete(fileName);
            }
        }
Ejemplo n.º 2
0
        public void DeleteFile()
        {
            const string data = "test string";

            var handle = new WriteFileHandle(data);

            handle.OpenWrite(TestFilePath);

            Loop.Current.Run();

            var handle2 = new Filesystem();

            handle2.Delete(TestFilePath, (args) =>
            {
                Assert.IsTrue(args.Successful);
            });

            Loop.Current.Run();
        }