/// <summary>
 /// Configures the given application builder to use the Functions Framework.
 /// This method executes the <see cref="FunctionsStartup.Configure(WebHostBuilderContext, AspNetCore.Builder.IApplicationBuilder)"/>
 /// method on any registered functions startup classes before adding handlers that
 /// return "not found" responses for fixed paths (e.g. "favicon.ico") and setting the terminal
 /// handler to execute the target function.
 /// </summary>
 /// <remarks>
 /// This method requires (at a minimum) that a function target has been registered,
 /// as it uses the <see cref="IHttpFunction"/> interface to handle requests.
 /// The target is typically registered using the
 /// <see cref="FunctionsFrameworkServiceCollectionExtensions.AddFunctionTarget(IServiceCollection, WebHostBuilderContext, System.Reflection.Assembly)"/>
 /// method or another <c>AddFunctionTarget</c> overload.
 /// </remarks>
 /// <param name="app">The application builder to configure.</param>
 /// <param name="context">The context of the web host builder being configured.</param>
 /// <returns>The original builder, for method chaining.</returns>
 public static IApplicationBuilder UseFunctionsFramework(this IApplicationBuilder app, WebHostBuilderContext context) =>
 HostingInternals.ConfigureApplication(context, app);
コード例 #2
0
 /// <summary>
 /// Internal method called directly by EntryPoint, so that it can validate that the appropriate startup
 /// classes to use haven't changed as a result of using the startup classes that *have* been executed.
 /// </summary>
 internal static IApplicationBuilder UseFunctionsFramework(this IApplicationBuilder app, WebHostBuilderContext context, bool validateStartups) =>
 HostingInternals.ConfigureApplication(context, app, validateStartups);