// -------------------------------------------------------------------------------------------------------------------- // // Copyright (c) 2014 OxyPlot contributors // // // Provides extension methods for exporters. // // -------------------------------------------------------------------------------------------------------------------- #if OXYPLOT_COREDRAWING namespace OxyPlot.Core.Drawing #else namespace OxyPlot.WindowsForms #endif { using System.IO; /// /// Provides extension methods for exporters. /// public static class ExporterExtensions { /// /// Exports the specified to a file. /// /// The exporter. /// The model to export. /// The path to the file. public static void ExportToFile(this IExporter exporter, IPlotModel model, string path) { using (var stream = File.OpenWrite(path)) { exporter.Export(model, stream); } } } }