Files
duplicati/Duplicati/Library/Main/Operation/VacuumHandler.cs
T
Kenneth Hsu f12858e6a5 Mark fields that shouldn't be reassigned as readonly.
This makes it explicit at compile-time that these fields should not be
reassigned outside the constructor.
2018-05-25 10:04:52 -07:00

30 lines
730 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Duplicati.Library.Main.Operation
{
internal class VacuumHandler
{
private readonly Options m_options;
private readonly VacuumResult m_result;
public VacuumHandler(Options options, VacuumResult result)
{
m_options = options;
m_result = result;
}
public virtual void Run()
{
using (var db = new Database.LocalDatabase(m_options.Dbpath, "Vacuum", false))
{
m_result.SetDatabase(db);
db.Vacuum();
}
}
}
}