示例#1
0
        public NetworkClient(INetworkSettings settings, IUriSource uriSource,
                             ISpeedMeasurer speedMeasurer,
                             ILogger logger)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }
            if (uriSource == null)
            {
                throw new ArgumentNullException("uriSource");
            }
            if (speedMeasurer == null)
            {
                throw new ArgumentNullException("speedMeasurer");
            }
            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }

            this.networkSettings    = settings;
            this.uriSource          = uriSource;
            this.speedMeasurer      = speedMeasurer;
            this.logger             = logger;
            this.defaultTaskFactory = new TaskFactory(TaskScheduler.Default);
        }
示例#2
0
        public NetworkClient(INetworkSettings settings, IUriSource uriSource,
            ISpeedMeasurer speedMeasurer,
            ILogger logger)
        {
            if (settings == null)
                throw new ArgumentNullException("settings");
            if (uriSource == null)
                throw new ArgumentNullException("uriSource");
            if (speedMeasurer == null)
                throw new ArgumentNullException("speedMeasurer");
            if (logger == null)
                throw new ArgumentNullException("logger");

            this.networkSettings = settings;
            this.uriSource = uriSource;
            this.speedMeasurer = speedMeasurer;
            this.logger = logger;
            this.defaultTaskFactory = new TaskFactory(TaskScheduler.Default);
        }