Exemple #1
0
        /// <summary>
        /// Reads Folding@Home log line data asynchronously from the <see cref="FahLogReader"/>.
        /// </summary>
        /// <param name="reader">The <see cref="FahLogReader"/> that reads the Folding@Home log line data.</param>
        public async Task ReadAsync(FahLogReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException(nameof(reader));
            }

            LogLine logLine;

            while ((logLine = await reader.ReadLineAsync().ConfigureAwait(false)) != null)
            {
                OnLogLineRead(logLine);
            }
            OnClientRunFinished();
        }
Exemple #2
0
        /// <summary>
        /// Reads Folding@Home log line data from the <see cref="FahLogReader"/>.
        /// </summary>
        /// <param name="reader">The <see cref="FahLogReader"/> that reads the Folding@Home log line data.</param>
        public void Read(FahLogReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException(nameof(reader));
            }

            LogLine logLine;

            while ((logLine = reader.ReadLine()) != null)
            {
                OnLogLineRead(logLine);
            }
            OnClientRunFinished();
        }