REFACTOR: Reformat code.

This commit is contained in:
2017-12-19 20:33:03 +00:00
parent 77edc7c91c
commit e6f6ace80b
704 changed files with 82627 additions and 83641 deletions

View File

@@ -41,29 +41,26 @@ namespace DiscImageChef.Metadata
{
public static ExtentType[] ToMetadata(ExtentsULong extents)
{
if(extents == null)
return null;
if(extents == null) return null;
Tuple<ulong, ulong>[] tuples = extents.ToArray();
ExtentType[] array = new ExtentType[tuples.Length];
for(ulong i = 0; i < (ulong)array.LongLength; i++)
array[i] = new ExtentType { Start = tuples[i].Item1, End = tuples[i].Item2 };
array[i] = new ExtentType {Start = tuples[i].Item1, End = tuples[i].Item2};
return array;
}
public static ExtentsULong FromMetadata(ExtentType[] extents)
{
if(extents == null)
return null;
if(extents == null) return null;
List<Tuple<ulong, ulong>> tuples = new List<Tuple<ulong, ulong>>();
foreach(ExtentType extent in extents)
tuples.Add(new Tuple<ulong, ulong>(extent.Start, extent.End));
foreach(ExtentType extent in extents) tuples.Add(new Tuple<ulong, ulong>(extent.Start, extent.End));
return new ExtentsULong(tuples);
}
}
}
}