IDependencyResolver
Represents a dependency resolver.
using Stashbox.Resolution;
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
namespace Stashbox
{
[NullableContext(1)]
public interface IDependencyResolver : IServiceProvider, IAsyncDisposable, IDisposable
{
object Resolve(Type typeFrom);
object Resolve(Type typeFrom, [Nullable(2)] object name, [Nullable(new byte[] {
2,
1
})] object[] dependencyOverrides, ResolutionBehavior resolutionBehavior = ResolutionBehavior.Default);
[return: Nullable(2)]
object ResolveOrDefault(Type typeFrom);
[NullableContext(2)]
object ResolveOrDefault([Nullable(1)] Type typeFrom, object name, [Nullable(new byte[] {
2,
1
})] object[] dependencyOverrides, ResolutionBehavior resolutionBehavior = ResolutionBehavior.Default);
Delegate ResolveFactory(Type typeFrom, [Nullable(2)] object name = null, ResolutionBehavior resolutionBehavior = ResolutionBehavior.Default, params Type[] parameterTypes);
[return: Nullable(2)]
Delegate ResolveFactoryOrDefault(Type typeFrom, [Nullable(2)] object name = null, ResolutionBehavior resolutionBehavior = ResolutionBehavior.Default, params Type[] parameterTypes);
IDependencyResolver BeginScope([Nullable(2)] object name = null, bool attachToParent = false);
void PutInstanceInScope(Type typeFrom, object instance, bool withoutDisposalTracking = false, [Nullable(2)] object name = null);
TTo BuildUp<TTo>(TTo instance, ResolutionBehavior resolutionBehavior = ResolutionBehavior.Default) where TTo : class;
object Activate(Type type, ResolutionBehavior resolutionBehavior, params object[] arguments);
ValueTask InvokeAsyncInitializers(CancellationToken token = default(CancellationToken));
bool CanResolve(Type typeFrom, [Nullable(2)] object name = null, ResolutionBehavior resolutionBehavior = ResolutionBehavior.Default);
IEnumerable<DelegateCacheEntry> GetDelegateCacheEntries();
}
}