Class VariableArray<T>
A memory mapped array with elements of variable size.
Inherited Members
Namespace: Mars.Common.IO.Mapped.Arrays
Assembly: Mars.IO.dll
Syntax
public class VariableArray<T> : ArrayBase<T>, ISerializableToStream, IEnumerable<T>
Type Parameters
Name | Description |
---|---|
T |
Constructors
VariableArray(MemoryMap, Int64)
Creates a new array.
Declaration
public VariableArray(MemoryMap map, long size)
Parameters
Type | Name | Description |
---|---|---|
MemoryMap | map | |
System.Int64 | size |
Properties
CanResize
Returns true if this array can resize.
Declaration
public override bool CanResize { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Mars.Common.IO.Mapped.Arrays.ArrayBase<T>.CanResize
Item[Int64]
Gets or sets the element at the given index.
Declaration
public override sealed T this[long idx] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | idx |
Property Value
Type | Description |
---|---|
T |
Overrides
Mars.Common.IO.Mapped.Arrays.ArrayBase<T>.Item[System.Int64]
Length
Returns the length of this array.
Declaration
public override sealed long Length { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Overrides
Mars.Common.IO.Mapped.Arrays.ArrayBase<T>.Length
Methods
Dispose()
Disposes of all resources associated with this array.
Declaration
public override void Dispose()
Overrides
Mars.Common.IO.Mapped.Arrays.ArrayBase<T>.Dispose()
Resize(Int64)
Resizes this array.
Declaration
public override sealed void Resize(long size)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | size |
Overrides
Mars.Common.IO.Mapped.Arrays.ArrayBase<T>.Resize(System.Int64)
Implements
IEnumerable<>