示例#1
0
 public static void CallBlockSent(this DataShareHooks hooks, FileHash hash, PeerHash peer, BlockIndex block)
 {
     hooks.OnBlockSent?.Invoke(new BlockSent
     {
         Hash  = hash,
         Peer  = peer,
         Block = block
     });
 }
示例#2
0
        public DataShareContext(DataShareParameters parameters, DataShareDependencies dependencies, DataShareConfiguration configuration, DataShareHooks hooks)
        {
            this.parameters    = parameters;
            this.dependencies  = dependencies;
            this.configuration = configuration;
            this.hooks         = hooks;

            collection = new DataShareCollection();
            queue      = new LeakQueue <DataShareContext>(this);
        }
示例#3
0
 public DataShareService(DataShareParameters parameters, DataShareDependencies dependencies, DataShareConfiguration configuration, DataShareHooks hooks)
 {
     context = new DataShareContext(parameters, dependencies, configuration, hooks);
 }
示例#4
0
 public DataShareService Build(DataShareHooks hooks)
 {
     return(new DataShareService(parameters, dependencies, configuration, hooks));
 }