public CitpVisualizerService([NotNull] string nicIpAddress, bool useOriginalMulticastIp, [NotNull] ICitpVisualizerDevice device, bool isStreamingEnabled, ICitpLogService log = null) { if (nicIpAddress == null) { throw new ArgumentNullException(nameof(nicIpAddress)); } if (device == null) { throw new ArgumentNullException(nameof(device)); } _log = log ?? new CitpDebugLogger(CitpLoggerLevel.Info); _device = device; IpAddress ip; if (!IpAddress.TryParse(nicIpAddress, out ip)) { throw new ArgumentException("Not a valid IPv4 address", nameof(nicIpAddress)); } _networkService = new CitpNetworkService(_log, ip, useOriginalMulticastIp, _device); IsStreamingEnabled = isStreamingEnabled; if (isStreamingEnabled) { _streamingService = new CitpStreamingService(_log, _device, _networkService); } }
public CitpNetworkService(ICitpLogService log, IpAddress nicAddress, bool useOriginalMulticastIp, ICitpVisualizerDevice device) : this(log, nicAddress, useOriginalMulticastIp) { _device = device; _deviceType = CitpPeerType.Visualizer; }