REFACTOR: Loop can be converted into LINQ-expression.

This commit is contained in:
2017-12-21 07:08:26 +00:00
parent 4d886dae25
commit 5592f147ac
71 changed files with 668 additions and 1131 deletions

View File

@@ -34,6 +34,7 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using DiscImageChef.CommonTypes;
using DiscImageChef.Console;
@@ -283,11 +284,7 @@ namespace DiscImageChef.DiscImages
DateTime blockTime = DateTime.Now;
bool foundDate = false;
foreach(string line in lines)
{
string[] kvp = line.Split('=');
if(kvp.Length != 2) continue;
foreach(string[] kvp in lines.Select(line => line.Split('=')).Where(kvp => kvp.Length == 2)) {
kvp[0] = kvp[0].Trim();
kvp[1] = kvp[1].Trim();
DicConsole.DebugWriteLine("KryoFlux plugin", "\"{0}\" = \"{1}\"", kvp[0], kvp[1]);