src/Infrastructure/Extensions/ServiceCollectionExtensions.cs
/// <summary>
/// Adds api headers to function response:
/// - correlation id
/// - function version
/// - function assembly name.
/// </summary>
/// <typeparam name="TStartup">Type where the main assembly is located.</typeparam>
Adds api headers to function response:
correlation id
function version
function assembly name.
Adds api headers to function response : correlation id function version function assembly name .
public static IServiceCollection AddApiResponseHeaders<TStartup>(this IServiceCollection services)
        {
            services.AddSingleton<IMetadataResolver, MetadataResolver<TStartup>>();
#pragma warning disable CS0618 
            services.AddSingleton<IFunctionFilter, ApiFunctionInvocationFilter>();
#pragma warning restore CS0618 
            return services;
        }
public static IServiceCollection AddApiResponseHeaders < TStartup > ( this IServiceCollection services ) { services . AddSingleton < IMetadataResolver , MetadataResolver < TStartup > > ( ) ; pragma warning disable CS0618 services . AddSingleton < IFunctionFilter , ApiFunctionInvocationFilter > ( ) ; pragma warning restore CS0618 return services ; }
Adds api headers to function response:
 correlation id
 function version
 function assembly name.
Adds api headers to function response : correlation id function version function assembly name .
// Type or member is obsolete // Type or member is obsolete
IServiceCollection
this
typeparam
Type where the main assembly is located.
Type where the main assembly is located .