예제 #1
0
        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);
        }
예제 #2
0
 public void Block(RepositoryTaskQueue queue)
 {
 }
예제 #3
0
 public void Release(RepositoryTaskQueue queue)
 {
     queue.Release(index.Piece);
 }
예제 #4
0
 public void Release(RepositoryTaskQueue queue)
 {
 }
예제 #5
0
 public bool CanExecute(RepositoryTaskQueue queue)
 {
     return(true);
 }
예제 #6
0
 public void Block(RepositoryTaskQueue queue)
 {
     queue.Block(index.Piece);
 }
예제 #7
0
 public bool CanExecute(RepositoryTaskQueue queue)
 {
     return(queue.IsBlocked(index.Piece) == false);
 }
예제 #8
0
 public void Release(RepositoryTaskQueue queue)
 {
     queue.Release("all");
 }
예제 #9
0
 public void Block(RepositoryTaskQueue queue)
 {
     queue.Block("all");
 }
예제 #10
0
 public bool CanExecute(RepositoryTaskQueue queue)
 {
     return(queue.IsBlocked("all") == false);
 }