public DiscoveryMsgSerializersProvider(IMessageSerializationService messageSerializationService, ISigner signer, IPrivateKeyProvider privateKeyProvider, IDiscoveryMessageFactory messageFactory, INodeIdResolver nodeIdResolver, INodeFactory nodeFactory) { var pingSerializer = new PingMessageSerializer(signer, privateKeyProvider, messageFactory, nodeIdResolver, nodeFactory); var pongSerializer = new PongMessageSerializer(signer, privateKeyProvider, messageFactory, nodeIdResolver, nodeFactory); var findNodeSerializer = new FindNodeMessageSerializer(signer, privateKeyProvider, messageFactory, nodeIdResolver, nodeFactory); var neighborsSerializer = new NeighborsMessageSerializer(signer, privateKeyProvider, messageFactory, nodeIdResolver, nodeFactory); _messageSerializationService = messageSerializationService; _pingMessageSerializer = pingSerializer; _pongMessageSerializer = pongSerializer; _findNodeMessageSerializer = findNodeSerializer; _neighborsMessageSerializer = neighborsSerializer; }
public DiscoveryMsgSerializersProvider( IMessageSerializationService messageSerializationService, IEcdsa ecdsa, IPrivateKeyGenerator privateKeyGenerator, IDiscoveryMessageFactory messageFactory, INodeIdResolver nodeIdResolver) { PingMessageSerializer pingSerializer = new PingMessageSerializer(ecdsa, privateKeyGenerator, messageFactory, nodeIdResolver); PongMessageSerializer pongSerializer = new PongMessageSerializer(ecdsa, privateKeyGenerator, messageFactory, nodeIdResolver); FindNodeMessageSerializer findNodeSerializer = new FindNodeMessageSerializer(ecdsa, privateKeyGenerator, messageFactory, nodeIdResolver); NeighborsMessageSerializer neighborsSerializer = new NeighborsMessageSerializer(ecdsa, privateKeyGenerator, messageFactory, nodeIdResolver); _messageSerializationService = messageSerializationService; _pingMessageSerializer = pingSerializer; _pongMessageSerializer = pongSerializer; _findNodeMessageSerializer = findNodeSerializer; _neighborsMessageSerializer = neighborsSerializer; }