Neuerstellung

- Quelle: https://github.com/oxyplot/oxyplot
This commit is contained in:
2023-09-02 09:24:59 +02:00
commit 9520c1fa4a
810 changed files with 117869 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ExporterExtensions.cs" company="OxyPlot">
// Copyright (c) 2014 OxyPlot contributors
// </copyright>
// <summary>
// Provides extension methods for exporters.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
#if OXYPLOT_COREDRAWING
namespace OxyPlot.Core.Drawing
#else
namespace OxyPlot.WindowsForms
#endif
{
using System.IO;
/// <summary>
/// Provides extension methods for exporters.
/// </summary>
public static class ExporterExtensions
{
/// <summary>
/// Exports the specified <see cref="PlotModel" /> to a file.
/// </summary>
/// <param name="exporter">The exporter.</param>
/// <param name="model">The model to export.</param>
/// <param name="path">The path to the file.</param>
public static void ExportToFile(this IExporter exporter, IPlotModel model, string path)
{
using (var stream = File.OpenWrite(path))
{
exporter.Export(model, stream);
}
}
}
}