/// <summary>
 /// Uses the assemblies.
 /// </summary>
 /// <param name="builder">The builder.</param>
 /// <param name="assemblies">The assemblies.</param>
 /// <param name="diagnosticSource">The diagnostic source.</param>
 /// <returns>IRocketHostBuilder.</returns>
 public static IRocketHostBuilder UseAssemblies(
     this IRocketHostBuilder builder,
     IEnumerable <Assembly> assemblies,
     DiagnosticSource diagnosticSource = null)
 {
     return(RocketBooster.ForAssemblies(assemblies, diagnosticSource)(builder.Builder));
 }
 /// <summary>
 /// Uses the application domain.
 /// </summary>
 /// <param name="builder">The builder.</param>
 /// <param name="appDomain">The application domain.</param>
 /// <param name="diagnosticSource">The diagnostic source.</param>
 /// <returns>IRocketHostBuilder.</returns>
 public static IRocketHostBuilder UseAppDomain(
     this IRocketHostBuilder builder,
     AppDomain appDomain,
     DiagnosticSource diagnosticSource = null)
 {
     return(RocketBooster.ForAppDomain(appDomain, diagnosticSource)(builder.Builder));
 }
 /// <summary>
 /// Uses the dependency context.
 /// </summary>
 /// <param name="builder">The builder.</param>
 /// <param name="dependencyContext">The dependency context.</param>
 /// <param name="diagnosticSource">The diagnostic source.</param>
 /// <returns>IRocketHostBuilder.</returns>
 public static IRocketHostBuilder UseDependencyContext(
     this IRocketHostBuilder builder,
     DependencyContext dependencyContext,
     DiagnosticSource diagnosticSource = null)
 {
     return(RocketBooster.ForDependencyContext(dependencyContext, diagnosticSource)(builder.Builder));
 }
        /// <summary>
        /// Uses the assemblies.
        /// </summary>
        /// <param name="builder">The builder.</param>
        /// <param name="assemblies">The assemblies.</param>
        /// <param name="diagnosticSource">The diagnostic source.</param>
        /// <returns>IRocketHostBuilder.</returns>
        public static IRocketHostBuilder UseAssemblies(
            [NotNull] this IRocketHostBuilder builder,
            [NotNull] IEnumerable <Assembly> assemblies,
            DiagnosticSource?diagnosticSource = null
            )
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

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

            return(RocketBooster.ForAssemblies(assemblies, diagnosticSource)(builder.Builder));
        }
        /// <summary>
        /// Uses the application domain.
        /// </summary>
        /// <param name="builder">The builder.</param>
        /// <param name="appDomain">The application domain.</param>
        /// <param name="diagnosticSource">The diagnostic source.</param>
        /// <returns>IRocketHostBuilder.</returns>
        public static IRocketHostBuilder UseAppDomain(
            [NotNull] this IRocketHostBuilder builder,
            [NotNull] AppDomain appDomain,
            DiagnosticSource?diagnosticSource = null
            )
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

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

            return(RocketBooster.ForAppDomain(appDomain, diagnosticSource)(builder.Builder));
        }
        /// <summary>
        /// Uses the dependency context.
        /// </summary>
        /// <param name="builder">The builder.</param>
        /// <param name="dependencyContext">The dependency context.</param>
        /// <param name="diagnosticSource">The diagnostic source.</param>
        /// <returns>IRocketHostBuilder.</returns>
        public static IRocketHostBuilder UseDependencyContext(
            [NotNull] this IRocketHostBuilder builder,
            [NotNull] DependencyContext dependencyContext,
            DiagnosticSource?diagnosticSource = null
            )
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

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

            return(RocketBooster.ForDependencyContext(dependencyContext, diagnosticSource)(builder.Builder));
        }