/// <summary>
    /// Triggers full pruning.
    /// </summary>
    /// <returns>Status of triggering full pruning.</returns>
    public PruningStatus Trigger()
    {
        PruningTriggerEventArgs args = new PruningTriggerEventArgs();

        Prune?.Invoke(this, args);
        return(args.Status);
    }
        private void OnTick(object?sender, EventArgs e)
        {
            long size = GetDbSize();

            if (size >= _threshold)
            {
                Prune?.Invoke(this, new PruningTriggerEventArgs());
            }
        }
        private void OnTick(object?sender, EventArgs e)
        {
            string     driveName = _fileSystem.Path.GetPathRoot(_fileSystem.Path.GetFullPath(_path));
            IDriveInfo drive     = _fileSystem.DriveInfo.FromDriveName(driveName);

            if (drive.AvailableFreeSpace < _threshold)
            {
                Prune?.Invoke(this, new PruningTriggerEventArgs());
            }
        }
Example #4
0
 private void OnPrune(object?sender, PruningTriggerEventArgs e)
 {
     Prune?.Invoke(sender, e);
 }