コード例 #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
ファイル: DatashareContext.cs プロジェクト: vnvizitiu/leak
        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
ファイル: DatashareService.cs プロジェクト: vnvizitiu/leak
 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));
 }