public RepositoryContext(RepositoryParameters parameters, RepositoryDependencies dependencies, RepositoryHooks hooks, RepositoryConfiguration configuration) { this.parameters = parameters; this.dependencies = dependencies; this.hooks = hooks; this.configuration = configuration; bitfile = new BitfileService(parameters.Hash, Path.Combine(parameters.MetaDestination, $"{parameters.Hash}.bitfield")); queue = new RepositoryTaskQueue(this); }
public void Block(RepositoryTaskQueue queue) { }
public void Release(RepositoryTaskQueue queue) { queue.Release(index.Piece); }
public void Release(RepositoryTaskQueue queue) { }
public bool CanExecute(RepositoryTaskQueue queue) { return(true); }
public void Block(RepositoryTaskQueue queue) { queue.Block(index.Piece); }
public bool CanExecute(RepositoryTaskQueue queue) { return(queue.IsBlocked(index.Piece) == false); }
public void Release(RepositoryTaskQueue queue) { queue.Release("all"); }
public void Block(RepositoryTaskQueue queue) { queue.Block("all"); }
public bool CanExecute(RepositoryTaskQueue queue) { return(queue.IsBlocked("all") == false); }