/// <summary> /// Initializes a new instance of the <see cref="Node"/> struct with the specified node data. /// </summary> /// <param name="ptr">Pointer to an array of <see cref="NativeMethods.svm_node"/>.</param> internal unsafe Node(NativeMethods.svm_node *ptr) { if ((IntPtr)ptr == IntPtr.Zero) { throw new ArgumentException($"{nameof(ptr)} should not be IntPtr.Zero"); } this.Index = ptr->index; this.Value = ptr->value; }
internal unsafe NodeArray(NativeMethods.svm_node *ptr, int length) { this.NativePtr = (IntPtr)ptr; this._UnsafePtr = ptr; this.Length = length; }