code cleanup
This commit is contained in:
@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
|
||||
namespace SmallInjector
|
||||
|
@ -1,27 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SmallInjector
|
||||
{
|
||||
/// <summary>
|
||||
/// Wrapper for Service Locator
|
||||
/// </summary>
|
||||
public class ServiceLocatorWrapper : CommonServiceLocator.ServiceLocatorImplBase
|
||||
{
|
||||
private readonly IContainer _container;
|
||||
|
||||
/// <summary>
|
||||
/// Creates new <see cref="ServiceLocatorWrapper"/> instance
|
||||
/// </summary>
|
||||
public ServiceLocatorWrapper(IContainer container)
|
||||
{
|
||||
_container = container;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override object DoGetInstance(Type serviceType, string key) => _container.Resolve(serviceType);
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override IEnumerable<object> DoGetAllInstances(Type serviceType) => _container.ResolveAny(serviceType);
|
||||
}
|
||||
}
|
@ -2,18 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DocumentationFile>bin\debug\SmallInjector.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<DocumentationFile>bin\release\SmallInjector.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommonServiceLocator" Version="2.0.4" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
Reference in New Issue
Block a user