@@ -13,27 +13,20 @@ namespace Unity.Benchmarks
13
13
public partial class ResolutionBenchmarks
14
14
{
15
15
16
- [ Benchmark ( Description = "IUnityContainer.Resolve <object>()" ) ]
16
+ [ Benchmark ( Description = "IUnityContainer<object>()" ) ]
17
17
[ BenchmarkCategory ( "resolve" , "object" , "IUnityContainer" ) ]
18
18
public object Resolve_Object_IUnityContainer ( )
19
19
=> Container . Resolve ( typeof ( object ) , null ) ;
20
20
21
- [ Benchmark ( Description = "IServiceProvider.Resolve<object>()" ) ]
21
+ #if ! NET462 && ! NET472
22
+
23
+ [ Benchmark ( Description = "IServiceProvider<object>()" ) ]
22
24
[ BenchmarkCategory ( "resolve" , "object" , "IServiceProvider" ) ]
23
- #if NET462 || NET472
24
- public object Resolve_Object_IServiceProvider ( )
25
- => throw new NotImplementedException ( ) ;
26
- #else
27
25
public object Resolve_Object_IServiceProvider ( )
28
- => ContainerAsync . Resolve ( typeof ( object ) , null ) ;
29
- #endif
30
-
31
- [ Benchmark ( Description = "IUnityContainerAsync.ReAsync<object>()" ) ]
26
+ => ServiceProvider . GetService ( typeof ( object ) ) ;
27
+
28
+ [ Benchmark ( Description = "IUnityContainerAsync<object>()" ) ]
32
29
[ BenchmarkCategory ( "resolve" , "object" , "IUnityContainerAsync" ) ]
33
- #if NET462 || NET472
34
- public object Resolve_Object_IUnityContainerAsync ( )
35
- => throw new NotImplementedException ( ) ;
36
- #else
37
30
public object Resolve_Object_IUnityContainerAsync ( )
38
31
=> ContainerAsync . ResolveAsync ( typeof ( object ) , null )
39
32
. GetAwaiter ( )
0 commit comments