Example #1
0
 public ExportProvider(ITypeEnumerator typeEnumerator)
 {
     if (typeEnumerator != null)
     {
         TypeEnumerator = typeEnumerator;
     }
 }
Example #2
0
 public ExportProvider(ITypeEnumerator typeEnumerator)
 {
     if (typeEnumerator != null)
     {
         TypeEnumerator = typeEnumerator;
     }
 }
Example #3
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);
            }
        }