Merge pull request #3161 from warwickmm/abstract_constructor_access

Make constructors for abstract classes protected
This commit is contained in:
Kenneth Skovhede
2018-04-08 12:32:17 +02:00
committed by GitHub
9 changed files with 13 additions and 13 deletions
@@ -60,7 +60,7 @@ namespace Duplicati.Library.DynamicLoader
/// Construcst a new instance of the dynamic loader,
/// does not load anything
/// </summary>
public DynamicLoader()
protected DynamicLoader()
{
}
@@ -174,7 +174,7 @@ namespace Duplicati.Library.Main.Database
protected abstract string INSERTCOMMAND { get; }
protected abstract int INSERTARGUMENTS { get; }
public Basiclist(System.Data.IDbConnection connection, string volumename)
protected Basiclist(System.Data.IDbConnection connection, string volumename)
{
m_connection = connection;
m_volumename = volumename;
+2 -2
View File
@@ -352,7 +352,7 @@ namespace Duplicati.Library.Main
public IEnumerable<string> Warnings { get { return m_parent == null ? m_warnings : m_parent.Warnings; } }
public IEnumerable<string> Errors { get { return m_parent == null ? m_errors : m_parent.Errors; } }
public BasicResults()
protected BasicResults()
{
this.BeginTime = DateTime.UtcNow;
this.m_parent = null;
@@ -367,7 +367,7 @@ namespace Duplicati.Library.Main
m_operationProgressUpdater = new OperationProgressUpdater();
}
public BasicResults(BasicResults p)
protected BasicResults(BasicResults p)
{
this.BeginTime = DateTime.UtcNow;
this.m_parent = p;
+1 -1
View File
@@ -150,7 +150,7 @@ namespace Duplicati.Library.Main.Volumes
protected readonly string m_blockhash;
protected readonly string m_filehash;
public VolumeBase(Options options)
protected VolumeBase(Options options)
{
m_blocksize = options.Blocksize;
m_blockhash = options.BlockHashAlgorithm;
@@ -34,7 +34,7 @@ namespace Duplicati.Library.Main.Volumes
return LoadCompressor(compressor, stream, options);
}
public VolumeReaderBase(string compressor, string file, Options options)
protected VolumeReaderBase(string compressor, string file, Options options)
: base(options)
{
m_compression = LoadCompressor(compressor, file, options, out m_stream);
@@ -43,7 +43,7 @@ namespace Duplicati.Library.Main.Volumes
m_disposeCompression = true;
}
public VolumeReaderBase(ICompression compression, Options options)
protected VolumeReaderBase(ICompression compression, Options options)
: base(options)
{
m_compression = compression;
@@ -24,7 +24,7 @@ namespace Duplicati.Library.Main.Volumes
m_volumename = name;
}
public VolumeWriterBase(Options options)
protected VolumeWriterBase(Options options)
: this(options, DateTime.UtcNow)
{
}
@@ -44,7 +44,7 @@ namespace Duplicati.Library.Main.Volumes
m_volumename = GenerateFilename(this.FileType, options.Prefix, GenerateGuid(options), timestamp, options.CompressionModule, options.NoEncryption ? null : options.EncryptionModule);
}
public VolumeWriterBase(Options options, DateTime timestamp)
protected VolumeWriterBase(Options options, DateTime timestamp)
: base(options)
{
if (!string.IsNullOrWhiteSpace(options.AsynchronousUploadFolder))
+2 -2
View File
@@ -41,7 +41,7 @@ namespace Duplicati.Library.Snapshots
/// Constructs a new backup snapshot, using all the required disks
/// </summary>
/// <param name="sources">The folders that are about to be backed up</param>
public NoSnapshot(string[] sources)
protected NoSnapshot(string[] sources)
: this(sources, new Dictionary<string, string>())
{
}
@@ -51,7 +51,7 @@ namespace Duplicati.Library.Snapshots
/// </summary>
/// <param name="sources">The folders that are about to be backed up</param>
/// <param name="options">A set of system options</param>
public NoSnapshot(string[] sources, Dictionary<string, string> options)
protected NoSnapshot(string[] sources, Dictionary<string, string> options)
{
m_sources = new string[sources.Length];
for (int i = 0; i < m_sources.Length; i++)
@@ -310,7 +310,7 @@ namespace Duplicati.Library.Utility
{
protected DirectStreamLink m_linkStream;
protected long m_knownLength = -1;
public LinkedSubStream(DirectStreamLink linkStream)
protected LinkedSubStream(DirectStreamLink linkStream)
{ this.m_linkStream = linkStream; }
public override bool CanSeek { get { return false; } }
+1 -1
View File
@@ -104,7 +104,7 @@ namespace Duplicati.Library.Utility
public bool IsFileBacked { get { return !(m_stream is MemoryStream); } }
public long SwitchToFileLimit { get; set; }
public FileBackedList()
protected FileBackedList()
{
m_file = null;
m_stream = new MemoryStream();