/// <summary> /// Creates a new startable endpoint based on the provided configuration that uses an externally managed container. /// </summary> public static IStartableEndpointWithExternallyManagedContainer Create(EndpointConfiguration configuration, IServiceCollection serviceCollection) { Guard.AgainstNull(nameof(configuration), configuration); Guard.AgainstNull(nameof(serviceCollection), serviceCollection); return(HostCreator .CreateWithExternallyManagedContainer(configuration, serviceCollection)); }
/// <summary> /// Creates a new startable endpoint based on the provided configuration that uses an externally managed container. /// </summary> /// <param name="configuration">The endpoint configuration.</param> /// <param name="configureComponents">The registration API adapter for the external container.</param> public static IStartableEndpointWithExternallyManagedContainer Create(EndpointConfiguration configuration, IConfigureComponents configureComponents) { Guard.AgainstNull(nameof(configuration), configuration); Guard.AgainstNull(nameof(configureComponents), configureComponents); return(HostCreator .CreateWithExternallyManagedContainer(configuration, configureComponents)); }
/// <summary> /// Creates a new startable endpoint based on the provided configuration. /// </summary> /// <param name="configuration">Configuration.</param> /// <param name="cancellationToken">A <see cref="CancellationToken"/> to observe.</param> public static Task <IStartableEndpoint> Create(EndpointConfiguration configuration, CancellationToken cancellationToken = default) { Guard.AgainstNull(nameof(configuration), configuration); return(HostCreator.CreateWithInternallyManagedContainer(configuration, cancellationToken)); }
/// <summary> /// Creates a new startable endpoint based on the provided configuration. /// </summary> /// <param name="configuration">Configuration.</param> public static Task<IStartableEndpoint> Create(EndpointConfiguration configuration) { Guard.AgainstNull(nameof(configuration), configuration); return HostCreator.CreateWithInternallyManagedContainer(configuration); }