mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 20:33:40 +01:00
fix: Create() => CreateAsync(), fix custom plugin IoC
This commit is contained in:
parent
fc6aa528c9
commit
5870c91bb4
3 changed files with 3 additions and 3 deletions
|
|
@ -361,7 +361,7 @@ namespace Dalamud.Plugin
|
|||
realScopedObjects[0] = this;
|
||||
Array.Copy(scopedObjects, 0, realScopedObjects, 1, scopedObjects.Length);
|
||||
|
||||
return svcContainer.Create(typeof(T), realScopedObjects) as T;
|
||||
return (T)svcContainer.CreateAsync(typeof(T), realScopedObjects).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ internal class LocalPlugin : IDisposable
|
|||
this.DalamudInterface = new DalamudPluginInterface(this.pluginAssembly.GetName().Name!, this.DllFile, reason, this.IsDev);
|
||||
|
||||
var ioc = Service<ServiceContainer>.Get();
|
||||
this.instance = ioc.Create(this.pluginType, this.DalamudInterface).GetAwaiter().GetResult() as IDalamudPlugin;
|
||||
this.instance = ioc.CreateAsync(this.pluginType, this.DalamudInterface).GetAwaiter().GetResult() as IDalamudPlugin;
|
||||
if (this.instance == null)
|
||||
{
|
||||
this.State = PluginState.LoadError;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue