diff --git a/build/Source.ruleset b/build/Source.ruleset index 459e4e0..8994858 100644 --- a/build/Source.ruleset +++ b/build/Source.ruleset @@ -1,9 +1,11 @@ - - + + - - + + + + @@ -12,23 +14,45 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/Test.ruleset b/build/Test.ruleset index 3c26c01..b64a37a 100644 --- a/build/Test.ruleset +++ b/build/Test.ruleset @@ -1,16 +1,14 @@ - - + + - - - - + + - - - + - + + + @@ -20,37 +18,93 @@ - - - + - + - - - + + + + + - + - + - + + + - + - + - + - + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -58,11 +112,11 @@ - + - + - + @@ -82,6 +136,13 @@ + + + + + + + diff --git a/src/Autofac.Extras.CommonServiceLocator/Autofac.Extras.CommonServiceLocator.csproj b/src/Autofac.Extras.CommonServiceLocator/Autofac.Extras.CommonServiceLocator.csproj index 5ff7fd6..ad099a0 100644 --- a/src/Autofac.Extras.CommonServiceLocator/Autofac.Extras.CommonServiceLocator.csproj +++ b/src/Autofac.Extras.CommonServiceLocator/Autofac.Extras.CommonServiceLocator.csproj @@ -64,6 +64,10 @@ all + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/test/Autofac.Extras.CommonServiceLocator.Test/Autofac.Extras.CommonServiceLocator.Test.csproj b/test/Autofac.Extras.CommonServiceLocator.Test/Autofac.Extras.CommonServiceLocator.Test.csproj index 9e1624f..23abafc 100644 --- a/test/Autofac.Extras.CommonServiceLocator.Test/Autofac.Extras.CommonServiceLocator.Test.csproj +++ b/test/Autofac.Extras.CommonServiceLocator.Test/Autofac.Extras.CommonServiceLocator.Test.csproj @@ -7,6 +7,7 @@ true true ../../build/Test.ruleset + AllEnabledByDefault true false latest @@ -32,6 +33,10 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + all diff --git a/test/Autofac.Extras.CommonServiceLocator.Test/AutofacServiceLocatorTests.cs b/test/Autofac.Extras.CommonServiceLocator.Test/AutofacServiceLocatorTests.cs index ab9bf14..1421cbf 100644 --- a/test/Autofac.Extras.CommonServiceLocator.Test/AutofacServiceLocatorTests.cs +++ b/test/Autofac.Extras.CommonServiceLocator.Test/AutofacServiceLocatorTests.cs @@ -9,7 +9,7 @@ namespace Autofac.Extras.CommonServiceLocator.Test; public sealed class AutofacServiceLocatorTests { - private readonly IServiceLocator _locator; + private readonly AutofacServiceLocator _locator; public AutofacServiceLocatorTests() { @@ -72,7 +72,7 @@ public void GenericOverload_GetInstance_WithName() public void GetAllInstances() { var instances = _locator.GetAllInstances(); - IList list = new List(instances); + var list = new List(instances); Assert.Equal(2, list.Count); }