Added constructors from List<T>.

This commit is contained in:
2017-06-08 19:05:35 +01:00
parent afa300a935
commit 6859d3cbb3
9 changed files with 81 additions and 0 deletions

View File

@@ -44,6 +44,11 @@ namespace Extents
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 void Add(byte item)

View File

@@ -44,6 +44,11 @@ namespace Extents
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 void Add(int item)

View File

@@ -44,6 +44,11 @@ namespace Extents
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 void Add(long item)

View File

@@ -44,6 +44,11 @@ namespace Extents
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 void Add(sbyte item)

View File

@@ -44,6 +44,11 @@ namespace Extents
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 void Add(short item)

View File

@@ -44,6 +44,11 @@ namespace Extents
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 void Add(uint item)

View File

@@ -44,6 +44,11 @@ namespace Extents
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 void Add(ulong item)

View File

@@ -44,6 +44,11 @@ namespace Extents
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 void Add(ushort item)

View File

@@ -0,0 +1,41 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : Resume.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Component
//
// --[ Description ] ----------------------------------------------------------
//
// Description
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2017 Natalia Portillo
// ****************************************************************************/
using System;
namespace DiscImageChef.Metadata
{
public class Resume
{
public Resume()
{
}
}
}