internal static Func <IServiceProvider, FunctionEndpoint> Configure(
            StorageQueueTriggeredEndpointConfiguration configuration,
            IServiceCollection serviceCollection,
            string appDirectory)
        {
            FunctionEndpoint.LoadAssemblies(appDirectory);

            var startableEndpoint = EndpointWithExternallyManagedServiceProvider.Create(
                configuration.EndpointConfiguration,
                serviceCollection);

            return(serviceProvider => new FunctionEndpoint(startableEndpoint, configuration, serviceProvider));
        }
Exemple #2
0
 // This ctor is used for the FunctionsHostBuilder scenario where the endpoint is created already during configuration time using the function host's container.
 internal FunctionEndpoint(IStartableEndpointWithExternallyManagedContainer externallyManagedContainerEndpoint,
                           StorageQueueTriggeredEndpointConfiguration configuration, IServiceProvider serviceProvider)
 {
     this.configuration = configuration;
     endpointFactory    = _ => externallyManagedContainerEndpoint.Start(serviceProvider);
 }