mirror of
https://github.com/AlexMacocian/Slim.git
synced 2026-07-15 15:19:59 +00:00
820b1c9c2e
Prepare integration project
27 lines
524 B
C#
27 lines
524 B
C#
using Slim.Resolvers;
|
|
using Slim.Tests.Models;
|
|
using System;
|
|
|
|
namespace Slim.Tests.Resolvers;
|
|
|
|
public class IndependentServiceResolver : IDependencyResolver
|
|
{
|
|
public int Called { get; private set; }
|
|
|
|
public bool CanResolve(Type type)
|
|
{
|
|
if (type == typeof(IIndependentService))
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
public object Resolve(IServiceProvider serviceProvider, Type type)
|
|
{
|
|
this.Called++;
|
|
return new IndependentService();
|
|
}
|
|
}
|