// --------------------------------------------------------------------------------------------------------------------
//
// Copyright (c) 2014 OxyPlot contributors
//
//
// Provides extension methods for exporters.
//
// --------------------------------------------------------------------------------------------------------------------
namespace OxyPlot.Wpf
{
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);
}
}
}