예제 #1
0
 protected override void ExecuteBenchmark(IResolveScope scope)
 {
     if (scope.Resolve <ImmutableList <IEnumerableService> >().Count() != 5)
     {
         throw new Exception("Count does not equal 5");
     }
 }
예제 #2
0
 protected override void ExecuteBenchmark(IResolveScope scope)
 {
     if (scope.Resolve <Lazy <ISmallObjectService> >().Value == null)
     {
         throw new Exception("Null lazy value");
     }
 }
예제 #3
0
        protected override void Warmup(IResolveScope scope)
        {
            var instance = scope.Resolve <IImportMultipleSmallObject>();

            if (!ReferenceEquals(instance.SmallObject1, instance.SmallObject2))
            {
                throw new Exception("Not the same instance");
            }
        }
 protected override void ExecuteBenchmark(IResolveScope scope)
 {
     scope.Resolve(typeof(IOneArgeFactoryService));
 }
예제 #5
0
 protected override void ExecuteBenchmark(IResolveScope scope)
 {
     scope.Resolve(typeof(ISingletonService));
 }
 protected override void ExecuteBenchmark(IResolveScope scope)
 {
     scope.Resolve(typeof(ILargeComplexService));
 }
 public static T Resolve <T>(this IResolveScope scope)
 {
     return((T)scope.Resolve(typeof(T)));
 }
예제 #8
0
 private void ExecuteBenchmark(IResolveScope scope)
 {
     scope.Resolve(typeof(ISmallObjectService));
 }
예제 #9
0
 protected override void ExecuteBenchmark(IResolveScope scope)
 {
     scope.Resolve(typeof(IImportMultipleSmallObject));
 }
 protected override void ExecuteBenchmark(IResolveScope scope)
 {
     scope.Resolve(typeof(IGenericObjectService <ISmallObjectService>));
 }
 protected override void ExecuteBenchmark(IResolveScope scope)
 {
     scope.Resolve(typeof(IThreeArgRefService));
 }
예제 #12
0
 protected override void ExecuteBenchmark(IResolveScope scope)
 {
     scope.Resolve <ISmallObjectService>();
 }
 protected override void ExecuteBenchmark(IResolveScope scope)
 {
     scope.Resolve <Func <int, string, ITransientService, IThreeArgService1> >()(5, "Hello",
                                                                                 new TransientService());
 }
 protected override void ExecuteBenchmark(IResolveScope scope)
 {
     scope.Resolve <Func <ITransientService, ISmallObjectService> >()(new TransientService());
 }