mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Return the resulting service, not the Task
This commit is contained in:
parent
46dee9a483
commit
9001c96986
2 changed files with 3 additions and 3 deletions
|
|
@ -161,7 +161,7 @@ internal class ServiceContainer : IServiceProvider, IServiceType
|
||||||
public IServiceScope GetScope() => new ServiceScopeImpl(this);
|
public IServiceScope GetScope() => new ServiceScopeImpl(this);
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
object? IServiceProvider.GetService(Type serviceType) => this.GetSingletonService(serviceType);
|
public object? GetService(Type serviceType) => this.GetSingletonService(serviceType).Result;
|
||||||
|
|
||||||
private async Task<object> GetService(Type serviceType, ServiceScopeImpl? scope, object[] scopedObjects)
|
private async Task<object> GetService(Type serviceType, ServiceScopeImpl? scope, object[] scopedObjects)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -58,9 +58,9 @@ internal class ServiceScopeImpl : IServiceScope
|
||||||
public ServiceScopeImpl(ServiceContainer container) => this.container = container;
|
public ServiceScopeImpl(ServiceContainer container) => this.container = container;
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
object? IServiceProvider.GetService(Type serviceType)
|
public object? GetService(Type serviceType)
|
||||||
{
|
{
|
||||||
return ((IServiceProvider)this.container).GetService(serviceType);
|
return this.container.GetService(serviceType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue