mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-22 07:47:45 +01:00
Add error handlings for UldWidget (#2011)
* Add error handlings for UldWidget * fixes
This commit is contained in:
parent
7e0c97f59e
commit
cddad72066
7 changed files with 444 additions and 213 deletions
|
|
@ -1,3 +1,6 @@
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Dalamud.Game;
|
||||
|
||||
using Lumina;
|
||||
|
|
@ -61,6 +64,16 @@ public interface IDataManager
|
|||
/// <returns>The <see cref="FileResource"/> of the file.</returns>
|
||||
public T? GetFile<T>(string path) where T : FileResource;
|
||||
|
||||
/// <summary>
|
||||
/// Get a <see cref="FileResource"/> with the given path, of the given type.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of resource.</typeparam>
|
||||
/// <param name="path">The path inside of the game files.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>A <see cref="Task{TResult}"/> containing the <see cref="FileResource"/> of the file on success.
|
||||
/// </returns>
|
||||
public Task<T> GetFileAsync<T>(string path, CancellationToken cancellationToken) where T : FileResource;
|
||||
|
||||
/// <summary>
|
||||
/// Check if the file with the given path exists within the game's index files.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
|
||||
namespace Dalamud.Game;
|
||||
|
||||
|
|
@ -153,4 +155,12 @@ public interface ISigScanner
|
|||
/// <param name="signature">The Signature.</param>
|
||||
/// <returns>The list of real offsets of the found elements based on signature.</returns>
|
||||
public nint[] ScanAllText(string signature);
|
||||
|
||||
/// <summary>
|
||||
/// Scan for all matching byte signatures in the .text section.
|
||||
/// </summary>
|
||||
/// <param name="signature">The Signature.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>Enumerable yielding the real offsets of the found elements based on signature.</returns>
|
||||
public IEnumerable<nint> ScanAllText(string signature, CancellationToken cancellationToken);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue