public UdpPeerDiscoveryListener(ILoggerFactory loggerFactory, CompatibilityChecker compatibilityChecker, IPeerRegistry registry, NetworkSettings settings, DiscoveryAnnounceMessage announce) { this.logger = (loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory))).CreateLogger <UdpPeerDiscoveryListener>(); this.compatibilityChecker = compatibilityChecker ?? throw new ArgumentNullException(nameof(compatibilityChecker)); this.registry = registry ?? throw new ArgumentNullException(nameof(registry)); this.settings = settings ?? throw new ArgumentNullException(nameof(settings)); this.announce = announce ?? throw new ArgumentNullException(nameof(announce)); this.announceBytes = settings.MessageSerializer.Serialize(announce); }
public PackageStatusUpdater(ILoggerFactory loggerFactory, NetworkSettings settings, HttpApiClient client) { this.loggerFactory = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory)); logger = loggerFactory.CreateLogger <PackageStatusUpdater>(); stopwatch = Stopwatch.StartNew(); states = new Dictionary <Hash, PackagePeersStatus>(); peers = new Dictionary <Hash, PeerOverallStatus>(); statusTimer = new Timer(StatusTimeoutCallback, null, statusTimerInterval, Timeout.InfiniteTimeSpan); this.settings = settings ?? throw new ArgumentNullException(nameof(settings)); this.client = client ?? throw new ArgumentNullException(nameof(client)); }
public PeerClusterStatus(IClock clock, NetworkSettings settings) { this.clock = clock ?? throw new ArgumentNullException(nameof(clock)); this.settings = settings ?? throw new ArgumentNullException(nameof(settings)); }