Made the LocalDatabase constructor protected to ensure that derived classes won't call the obsolete warning throwing constructor.
This commit is contained in:
@@ -90,7 +90,7 @@ namespace Duplicati.Library.Main.Database
|
||||
public bool ShouldCloseConnection { get; set; }
|
||||
|
||||
// Constructor is private to force use of CreateLocalDatabaseAsync
|
||||
private LocalDatabase() { }
|
||||
protected LocalDatabase() { }
|
||||
|
||||
// Arguments are not used, but are required to match the constructor signatures
|
||||
[Obsolete("Calling the constructor will throw an exception. Use the CreateLocalDatabaseAsync or CreateLocalDatabase functions instead")]
|
||||
|
||||
@@ -59,8 +59,6 @@ namespace Duplicati.Library.Main.Database
|
||||
|
||||
public DateTime RestoreTime { get { return m_restoreTime; } }
|
||||
|
||||
private LocalRestoreDatabase() { }
|
||||
|
||||
public static async Task<LocalRestoreDatabase> CreateAsync(string path, long pagecachesize)
|
||||
{
|
||||
var db = new LocalRestoreDatabase();
|
||||
|
||||
Reference in New Issue
Block a user