Skip to content
Documentation

HttpContextExtensions Class

Provides extension methods for Microsoft.AspNetCore.Http.HttpContext related to serialization and query parameter binding.

public static class HttpContextExtensions

Inheritance System.Object 🡒 HttpContextExtensions

HttpContextExtensions.SetSerializer(this HttpContext, ISerializer) Method

Section titled “HttpContextExtensions.SetSerializer(this HttpContext, ISerializer) Method”

Stores the specified serializer in the Microsoft.AspNetCore.Http.HttpContext.Items dictionary for use during the current request.

public static void SetSerializer(this Microsoft.AspNetCore.Http.HttpContext httpContext, HAKOM.Serialization.Core.Net.Api.ISerializer serializer);

httpContext Microsoft.AspNetCore.Http.HttpContext

The Microsoft.AspNetCore.Http.HttpContext to store the serializer in.

serializer ISerializer

The ISerializer instance to associate with the request.

HttpContextExtensions.TryGetQueryParametersBoundForParameter(this HttpContext, ParameterDescriptor, IEnumerable<string>) Method

Section titled “HttpContextExtensions.TryGetQueryParametersBoundForParameter(this HttpContext, ParameterDescriptor, IEnumerable<string>) Method”

Attempts to retrieve the query parameter names that were bound for the specified parameterDescriptor.

public static bool TryGetQueryParametersBoundForParameter(this Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor parameterDescriptor, out System.Collections.Generic.IEnumerable<string> boundParameters);

httpContext Microsoft.AspNetCore.Http.HttpContext

The Microsoft.AspNetCore.Http.HttpContext to retrieve the bound parameters from.

parameterDescriptor Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor

The Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor identifying the action parameter.

boundParameters System.Collections.Generic.IEnumerable<System.String>

When this method returns true, contains the bound query parameter names.

System.Boolean
true if bound query parameters were found for the parameter; otherwise, false.

HttpContextExtensions.TryGetSerializer(this HttpContext, ISerializer) Method

Section titled “HttpContextExtensions.TryGetSerializer(this HttpContext, ISerializer) Method”

Attempts to retrieve the ISerializer previously stored in the Microsoft.AspNetCore.Http.HttpContext.Items dictionary.

public static bool TryGetSerializer(this Microsoft.AspNetCore.Http.HttpContext httpContext, out HAKOM.Serialization.Core.Net.Api.ISerializer serializer);

httpContext Microsoft.AspNetCore.Http.HttpContext

The Microsoft.AspNetCore.Http.HttpContext to retrieve the serializer from.

serializer ISerializer

When this method returns true, contains the ISerializer; otherwise, null.

System.Boolean
true if a serializer was found; otherwise, false.

© 2026 Volue.Version v0.6.38017 November 2026