Class ArrayBase<T>
Abstract representation of an array.
Inheritance
System.Object
ArrayBase<T>
Implements
System.IDisposable
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.Arrays
Assembly: Mars.IO.dll
Syntax
public abstract class ArrayBase<T> : IDisposable, ISerializableToStream, IEnumerable<T>, IEnumerable
Type Parameters
Name | Description |
---|---|
T |
Properties
| Improve this Doc View SourceCanResize
Returns true if this array can be resized.
Declaration
public abstract bool CanResize { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Item[Int64]
Gets or sets the element at the given index.
Declaration
public abstract T this[long idx] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | idx |
Property Value
Type | Description |
---|---|
T |
Length
Returns the length of this array.
Declaration
public abstract long Length { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Methods
| Improve this Doc View SourceCopyFrom(Stream)
Copies an array from the given stream.
Declaration
public void CopyFrom(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream |
CopyTo(Stream)
Copies an array to the given stream.
Declaration
public long CopyTo(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream |
Returns
Type | Description |
---|---|
System.Int64 |
CreateFor(MemoryMap, Int64, ArrayProfile)
Creates a mapped array with the given size.
Declaration
public static ArrayBase<T> CreateFor(MemoryMap map, long size, ArrayProfile profile)
Parameters
Type | Name | Description |
---|---|---|
MemoryMap | map | |
System.Int64 | size | |
ArrayProfile | profile |
Returns
Type | Description |
---|---|
ArrayBase<T> |
Dispose()
Disposes of all resources associated with this array.
Declaration
public abstract void Dispose()
GetEnumerator()
Implements the enumerator for System.Collections.Generic.IEnumerable<T>
Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<T> |
Resize(Int64)
Resizes this array.
Declaration
public abstract void Resize(long size)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | size |
Explicit Interface Implementations
| Improve this Doc View SourceISerializableToStream.CopyTo(Stream)
Abstract representation of an array.
Declaration
long ISerializableToStream.CopyTo(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream |
Returns
Type | Description |
---|---|
System.Int64 |
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Implements
System.IDisposable
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable