Ejemplo n.º 1
0
        private void FillQueue(long start, long end)
        {
            for (long i = start; i <= end; i++)
            {
                _cancelTokenSource.Token.ThrowIfCancellationRequested();

                var item = new CheckingResult {
                    Ip = IpConverter.LongToString(i)
                };
                _result.Add(item);
            }
        }
Ejemplo n.º 2
0
        private void FillQueue(long start, long end, CancellationToken cancellationToken)
        {
            for (long i = start; i <= end; i++)
            {
                cancellationToken.ThrowIfCancellationRequested();

                _availabilityQueue.Add(new CheckingResult
                {
                    Ip = IpConverter.LongToString(i)
                });
            }
        }
Ejemplo n.º 3
0
        private void CreateCheckingResult(long ip)
        {
            _cancelTokenSource.Token.ThrowIfCancellationRequested();

            var item = new CheckingResult {
                Ip = IpConverter.LongToString(ip)
            };

            lock (_result)
            {
                _result.Add(item);
            }
        }