Class FixedArray<T>
- Namespace
- WoWLib
- Assembly
- WoWLib.dll
The fixed-size sibling of Vector<T> — a C++ std::array behind the same element protocols, minus every size-changing operation. The extent is the instantiation's, read via Count.
public sealed class FixedArray<T> : IDisposable
Type Parameters
T
- Inheritance
-
FixedArray<T>
- Implements
- Inherited Members
Properties
Count
public int Count { get; }
Property Value
this[int]
public T this[int i] { get; set; }
Parameters
iint
Property Value
- T
Methods
AsSpan<TData>()
Reinterpret the contiguous native storage as ONE span of blittable record values — a single interop crossing for the whole buffer, where the live-view indexer pays per element. TData is the element's nested Data mirror (size-checked at runtime; the layout itself is asserted in the native build). Writes go straight to native memory. Valid until a size-changing operation or Dispose.
public Span<TData> AsSpan<TData>() where TData : unmanaged
Returns
- Span<TData>
Type Parameters
TData
CopyFrom(ReadOnlySpan<T>)
Overwrite the elements (scalar/enum elements only; src length must match Count).
public void CopyFrom(ReadOnlySpan<T> src)
Parameters
srcReadOnlySpan<T>
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GetEnumerator()
public FixedArray<T>.Enumerator GetEnumerator()
Returns
ToArray()
public T[] ToArray()
Returns
- T[]
Operators
implicit operator FixedArray<T>(T[])
public static implicit operator FixedArray<T>(T[] a)
Parameters
aT[]
Returns
- FixedArray<T>