mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-31 21:03:43 +01:00
cleanup
This commit is contained in:
parent
db3e9a4171
commit
a725bbf8e0
4 changed files with 14 additions and 23 deletions
|
|
@ -487,7 +487,7 @@ internal sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposa
|
|||
/// <inheritdoc/>
|
||||
public bool Inject(object instance, params object[] scopedObjects)
|
||||
{
|
||||
var t = this.InjectAsync(instance, scopedObjects).AsTask();
|
||||
var t = this.InjectAsync(instance, scopedObjects);
|
||||
t.Wait();
|
||||
|
||||
if (t.Exception is { } e)
|
||||
|
|
@ -504,7 +504,7 @@ internal sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposa
|
|||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ValueTask InjectAsync(object instance, params object[] scopedObjects) =>
|
||||
public Task InjectAsync(object instance, params object[] scopedObjects) =>
|
||||
this.plugin.ServiceScope!.InjectPropertiesAsync(instance, this.GetPublicIocScopes(scopedObjects));
|
||||
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ public interface IDalamudPluginInterface
|
|||
/// </summary>
|
||||
/// <param name="instance">The instance to inject services into.</param>
|
||||
/// <param name="scopedObjects">Objects to inject additionally.</param>
|
||||
/// <returns>Whether or not the injection succeeded.</returns>
|
||||
/// <returns>Whether the injection succeeded.</returns>
|
||||
bool Inject(object instance, params object[] scopedObjects);
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -330,5 +330,5 @@ public interface IDalamudPluginInterface
|
|||
/// <param name="instance">The instance to inject services into.</param>
|
||||
/// <param name="scopedObjects">Objects to inject additionally.</param>
|
||||
/// <returns>A <see cref="ValueTask"/> representing the status of the operation.</returns>
|
||||
ValueTask InjectAsync(object instance, params object[] scopedObjects);
|
||||
Task InjectAsync(object instance, params object[] scopedObjects);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue