public static void CallBlockSent(this DataShareHooks hooks, FileHash hash, PeerHash peer, BlockIndex block) { hooks.OnBlockSent?.Invoke(new BlockSent { Hash = hash, Peer = peer, Block = block }); }
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); }
public DataShareService(DataShareParameters parameters, DataShareDependencies dependencies, DataShareConfiguration configuration, DataShareHooks hooks) { context = new DataShareContext(parameters, dependencies, configuration, hooks); }
public DataShareService Build(DataShareHooks hooks) { return(new DataShareService(parameters, dependencies, configuration, hooks)); }