mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Added constructors from List<T>.
This commit is contained in:
@@ -44,6 +44,11 @@ namespace Extents
|
|||||||
backend = new List<Tuple<byte, byte>>();
|
backend = new List<Tuple<byte, byte>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ExtentsByte(List<Tuple<byte, byte>> list)
|
||||||
|
{
|
||||||
|
backend = list.OrderBy(t => t.Item1).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
public int Count { get { return backend.Count; } }
|
public int Count { get { return backend.Count; } }
|
||||||
|
|
||||||
public void Add(byte item)
|
public void Add(byte item)
|
||||||
|
|||||||
@@ -44,6 +44,11 @@ namespace Extents
|
|||||||
backend = new List<Tuple<int, int>>();
|
backend = new List<Tuple<int, int>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ExtentsInt(List<Tuple<int, int>> list)
|
||||||
|
{
|
||||||
|
backend = list.OrderBy(t => t.Item1).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
public int Count { get { return backend.Count; } }
|
public int Count { get { return backend.Count; } }
|
||||||
|
|
||||||
public void Add(int item)
|
public void Add(int item)
|
||||||
|
|||||||
@@ -44,6 +44,11 @@ namespace Extents
|
|||||||
backend = new List<Tuple<long, long>>();
|
backend = new List<Tuple<long, long>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ExtentsLong(List<Tuple<long, long>> list)
|
||||||
|
{
|
||||||
|
backend = list.OrderBy(t => t.Item1).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
public int Count { get { return backend.Count; } }
|
public int Count { get { return backend.Count; } }
|
||||||
|
|
||||||
public void Add(long item)
|
public void Add(long item)
|
||||||
|
|||||||
@@ -44,6 +44,11 @@ namespace Extents
|
|||||||
backend = new List<Tuple<sbyte, sbyte>>();
|
backend = new List<Tuple<sbyte, sbyte>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ExtentsSByte(List<Tuple<sbyte, sbyte>> list)
|
||||||
|
{
|
||||||
|
backend = list.OrderBy(t => t.Item1).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
public int Count { get { return backend.Count; } }
|
public int Count { get { return backend.Count; } }
|
||||||
|
|
||||||
public void Add(sbyte item)
|
public void Add(sbyte item)
|
||||||
|
|||||||
@@ -44,6 +44,11 @@ namespace Extents
|
|||||||
backend = new List<Tuple<short, short>>();
|
backend = new List<Tuple<short, short>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ExtentsShort(List<Tuple<short, short>> list)
|
||||||
|
{
|
||||||
|
backend = list.OrderBy(t => t.Item1).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
public int Count { get { return backend.Count; } }
|
public int Count { get { return backend.Count; } }
|
||||||
|
|
||||||
public void Add(short item)
|
public void Add(short item)
|
||||||
|
|||||||
@@ -44,6 +44,11 @@ namespace Extents
|
|||||||
backend = new List<Tuple<uint, uint>>();
|
backend = new List<Tuple<uint, uint>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ExtentsUInt(List<Tuple<uint, uint>> list)
|
||||||
|
{
|
||||||
|
backend = list.OrderBy(t => t.Item1).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
public int Count { get { return backend.Count; } }
|
public int Count { get { return backend.Count; } }
|
||||||
|
|
||||||
public void Add(uint item)
|
public void Add(uint item)
|
||||||
|
|||||||
@@ -44,6 +44,11 @@ namespace Extents
|
|||||||
backend = new List<Tuple<ulong, ulong>>();
|
backend = new List<Tuple<ulong, ulong>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ExtentsULong(List<Tuple<ulong, ulong>> list)
|
||||||
|
{
|
||||||
|
backend = list.OrderBy(t => t.Item1).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
public int Count { get { return backend.Count; } }
|
public int Count { get { return backend.Count; } }
|
||||||
|
|
||||||
public void Add(ulong item)
|
public void Add(ulong item)
|
||||||
|
|||||||
@@ -44,6 +44,11 @@ namespace Extents
|
|||||||
backend = new List<Tuple<ushort, ushort>>();
|
backend = new List<Tuple<ushort, ushort>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ExtentsUShort(List<Tuple<ushort, ushort>> list)
|
||||||
|
{
|
||||||
|
backend = list.OrderBy(t => t.Item1).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
public int Count { get { return backend.Count; } }
|
public int Count { get { return backend.Count; } }
|
||||||
|
|
||||||
public void Add(ushort item)
|
public void Add(ushort item)
|
||||||
|
|||||||
Reference in New Issue
Block a user