mirror of
https://github.com/cyanfish/naps2.git
synced 2024-11-11 02:45:19 +03:00
37 lines
967 B
C#
37 lines
967 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using NAPS2.Util;
|
|
|
|
namespace NAPS2.ImportExport.Pdf
|
|
{
|
|
public abstract class PdfSettingsProvider
|
|
{
|
|
private static PdfSettingsProvider _default = Wrap(new PdfSettings());
|
|
|
|
public static PdfSettingsProvider Wrap(PdfSettings pdfSettings) => new Wrapper(pdfSettings);
|
|
|
|
public static PdfSettingsProvider Default
|
|
{
|
|
get
|
|
{
|
|
TestingContext.NoStaticDefaults();
|
|
return _default;
|
|
}
|
|
set => _default = value ?? throw new ArgumentNullException(nameof(value));
|
|
}
|
|
|
|
public abstract PdfSettings PdfSettings { get; }
|
|
|
|
private class Wrapper : PdfSettingsProvider
|
|
{
|
|
public Wrapper(PdfSettings pdfSettings)
|
|
{
|
|
PdfSettings = pdfSettings;
|
|
}
|
|
|
|
public override PdfSettings PdfSettings { get; }
|
|
}
|
|
}
|
|
}
|