Beispiel #1
0
 private static IStakhanoviseSetup WithNinjectIoCResolver(this IStakhanoviseSetup setup,
                                                          NInjectDependencyResolver resolver)
 {
     return(setup.SetupTaskExecutorRegistry(registrySetup =>
     {
         registrySetup.SetupBuiltInTaskExecutorRegistry(builtInRegistrySetup =>
         {
             builtInRegistrySetup.WithResolver(resolver);
         });
     }));
 }
        public static IStakhanoviseSetup WithBuiltInTaskExecutorRegistryDependencyResolver(this IStakhanoviseSetup stakhanoviseSetup,
                                                                                           IDependencyResolver resolver)
        {
            if (stakhanoviseSetup == null)
            {
                throw new ArgumentNullException(nameof(stakhanoviseSetup));
            }

            return(stakhanoviseSetup.SetupTaskExecutorRegistry(execRegSetup =>
                                                               execRegSetup.SetupBuiltInTaskExecutorRegistry(builtInExecRegSetup =>
                                                                                                             builtInExecRegSetup.WithResolver(resolver)
                                                                                                             )
                                                               ));
        }
        public static IStakhanoviseSetup SetupBuiltInTaskExecutorRegistryDependencies(this IStakhanoviseSetup stakhanoviseSetup,
                                                                                      Action <IDependencySetup> setupAction)
        {
            if (stakhanoviseSetup == null)
            {
                throw new ArgumentNullException(nameof(stakhanoviseSetup));
            }

            if (setupAction == null)
            {
                throw new ArgumentNullException(nameof(setupAction));
            }

            return(stakhanoviseSetup.SetupTaskExecutorRegistry(execRegSetup =>
                                                               execRegSetup.SetupBuiltInTaskExecutorRegistry(builtInExecRegSetup =>
                                                                                                             builtInExecRegSetup.SetupDependencies(setupAction)
                                                                                                             )
                                                               ));
        }