Beispiel #1
0
        internal async Task ReadProxiesFromFileAsync(string path, CancellationToken cancellationToken)
        {
            string content;

            using (var sr = new StreamReader(path))
            {
                content = await sr.ReadToEndAsync();
            }

            foreach (var proxy in proxyFactory.RetrieveProxies(content))
            {
                buffer.Post(proxy);
            }
        }