General cleanup and refactor.

This commit is contained in:
2022-03-07 07:36:32 +00:00
parent 27900ec144
commit 8d40f3e395
60 changed files with 1034 additions and 1156 deletions

View File

@@ -36,13 +36,12 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Extents;
using System;
using System.Collections.Generic;
using System.Linq;
using Schemas;
namespace Aaru.CommonTypes.Extents;
/// <summary>Converts extents</summary>
public static class ExtentsConverter
{
@@ -55,7 +54,7 @@ public static class ExtentsConverter
return null;
Tuple<ulong, ulong>[] tuples = extents.ToArray();
ExtentType[] array = new ExtentType[tuples.Length];
var array = new ExtentType[tuples.Length];
for(ulong i = 0; i < (ulong)array.LongLength; i++)
array[i] = new ExtentType
@@ -75,8 +74,7 @@ public static class ExtentsConverter
if(extents == null)
return null;
List<Tuple<ulong, ulong>> tuples =
extents.Select(extent => new Tuple<ulong, ulong>(extent.Start, extent.End)).ToList();
var tuples = extents.Select(extent => new Tuple<ulong, ulong>(extent.Start, extent.End)).ToList();
return new ExtentsULong(tuples);
}