Beispiel #1
0
        /// <summary>
        /// Executes <paramref name="executor"/> on all types from <paramref name="enumerator"/>.
        /// </summary>
        /// <param name="enumerator">Type enumerator.</param>
        /// <param name="executor">Type executor.</param>
        public static void HandleExecutor(this ITypeEnumerator enumerator, ITypeExecutor executor)
        {
            Ensure.NotNull(enumerator, "enumerator");
            Ensure.NotNull(executor, "executor");

            while (enumerator.Next())
            {
                executor.Handle(enumerator.Current);
            }
        }
        public ITypeExecutorService AddTypeExecutor(ITypeExecutor executor, bool isExecutedForLatelyLoadedAssemblies)
        {
            Ensure.NotNull(executor, "executor");

            this.executor.TypeExecutors.Add(executor);
            if (isExecutedForLatelyLoadedAssemblies)
            {
                addPermanentExecutor(executor);
            }

            return(this);
        }