public IntPtr Map(int subresource) { IntPtr mappedResource = NativeResource.Map(subresource); MappedResource = mappedResource; return(mappedResource); }
/// <summary> /// Maps the current resource to a specified subresource /// </summary> /// <param name="subresource">The index of the target subresource to map</param> /// <returns>An <see cref="IntPtr"/> for the newly mapped resource</returns> internal IntPtr Map(int subresource) { IntPtr mappedResource = NativeResource?.Map(subresource) ?? throw new InvalidOperationException("Missing resource"); MappedResource = mappedResource; return(mappedResource); }