Class MemoryBackedList<T>
A list of objects that can be accessed by index that uses a memory mapped array.
Inheritance
System.Object
MemoryBackedList<T>
Implements
System.IDisposable
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Common.IO.Mapped.Collections
Assembly: Mars.IO.dll
Syntax
[Serializable]
public class MemoryBackedList<T> : IDisposable, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
Type Parameters
Name | Description |
---|---|
T |
Constructors
| Improve this Doc View SourceMemoryBackedList()
Creates a new list.
Declaration
public MemoryBackedList()
MemoryBackedList(MemoryMap, Int64, ArrayProfile)
Creates a new list.
Declaration
public MemoryBackedList(MemoryMap map, long capacity, ArrayProfile arrayProfile)
Parameters
Type | Name | Description |
---|---|---|
MemoryMap | map | |
System.Int64 | capacity | |
ArrayProfile | arrayProfile |
MemoryBackedList(MemoryMap, Int64)
Creates a new list.
Declaration
public MemoryBackedList(MemoryMap map, long capacity)
Parameters
Type | Name | Description |
---|---|---|
MemoryMap | map | |
System.Int64 | capacity |
MemoryBackedList(MemoryMap)
Creates a new list.
Declaration
public MemoryBackedList(MemoryMap map)
Parameters
Type | Name | Description |
---|---|---|
MemoryMap | map |
Properties
| Improve this Doc View SourceCount
Returns the number of elements in this list.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsReadOnly
Returns true if this list is readonly.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Item[Int32]
Gets or sets the element at the given index.
Declaration
public T this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
T |
Item[Int64]
Gets or sets the element at the given index.
Declaration
public T this[long index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | index |
Property Value
Type | Description |
---|---|
T |
Methods
| Improve this Doc View SourceAdd(T)
Adds a new item.
Declaration
public void Add(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item |
AddDontCare(Int32)
Adds a number of don't care elements.
Declaration
public void AddDontCare(int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | count |
Clear()
Clears all data.
Declaration
public void Clear()
Contains(T)
Returns true if the given item exists.
Declaration
public bool Contains(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item |
Returns
Type | Description |
---|---|
System.Boolean |
CopyTo(T[], Int32)
Copies the data from this list to the given array.
Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
T[] | array | |
System.Int32 | arrayIndex |
Dispose()
Disposes of all native resources associated with this list.
Declaration
public void Dispose()
GetEnumerator()
Gets the enumerator.
Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<T> |
IndexOf(T)
Determines the index of a specific item.
Declaration
public int IndexOf(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item |
Returns
Type | Description |
---|---|
System.Int32 |
Insert(Int32, T)
Inserts an item at the specified index.
Declaration
public void Insert(int index, T item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | |
T | item |
Remove(T)
Removes the first occurance of the given element.
Declaration
public bool Remove(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item |
Returns
Type | Description |
---|---|
System.Boolean |
RemoveAt(Int32)
Removes the item at the given index.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
A list of objects that can be accessed by index that uses a memory mapped array.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Implements
System.IDisposable
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable