add documentation note about preferring other APIs in ISharedImmediateTexture::RentAsync()

This commit is contained in:
goat 2024-06-29 11:44:02 +02:00
parent a20349cb23
commit 1a490e5f21

View file

@ -64,8 +64,17 @@ public interface ISharedImmediateTexture
/// <exception cref="InvalidOperationException">Thrown when called outside the UI thread.</exception>
bool TryGetWrap([NotNullWhen(true)] out IDalamudTextureWrap? texture, out Exception? exception);
/// <summary>Creates a new instance of <see cref="IDalamudTextureWrap"/> holding a new reference to this texture.
/// The returned texture is guaranteed to be available until <see cref="IDisposable.Dispose"/> is called.</summary>
/// <summary>
/// <para>
/// Creates a new instance of <see cref="IDalamudTextureWrap"/> holding a new reference to this texture.
/// The returned texture is guaranteed to be available until <see cref="IDisposable.Dispose"/> is called.
/// </para>
/// <para>
/// <b>WARNING!</b> Usually, this method should be a "last resort"/compatibility wrapper for old code that does not
/// directly support <see cref="ISharedImmediateTexture"/> directly. Prefer using any of the other methods if possible,
/// and <b>DO NOT CACHE</b> the resulting texture wrap from those functions.
/// </para>
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>A <see cref="Task{TResult}"/> containing the loaded texture on success.</returns>
/// <remarks>