ContainerExtensions Class
Provides extension methods for adding services related to using types from the persistence module in HTTP APIs.
public static class ContainerExtensionsInheritance System.Object 🡒 ContainerExtensions
Methods
Section titled “Methods”ContainerExtensions.UseHttpContextDefaultStorageInformationProvider<TReference>(this IContainer) Method
Section titled “ContainerExtensions.UseHttpContextDefaultStorageInformationProvider<TReference>(this IContainer) Method”Registers an instance of IDefaultStorageInformationProvider<TReference> for the given TReference.
public static HAKOM.DependencyInjection.Core.Net.Api.IContainer UseHttpContextDefaultStorageInformationProvider<TReference>(this HAKOM.DependencyInjection.Core.Net.Api.IContainer container) where TReference : HAKOM.Persistence.Core.Net.Api.References.IReference;Type parameters
Section titled “Type parameters”TReference
The type of reference for which the storage information (by default) can be obtained from the current request.
Parameters
Section titled “Parameters”container IContainer
The container to register the provider with.
Returns
Section titled “Returns”IContainer
The container for chaining of additional container setup.
Remarks
Section titled “Remarks”When deserializing an instance of TReference in the context of an HTTP request, the storage information may be obtained from the ongoing request, allowing it to be omitted in the serialized data.
ContainerExtensions.UseOrderModelBinder<TResult>(this IContainer, Dictionary<string,Order<TResult>>) Method
Section titled “ContainerExtensions.UseOrderModelBinder<TResult>(this IContainer, Dictionary<string,Order<TResult>>) Method”Registers a ICustomModelBinder with the container so that Order<TResult> items can be passed to controller actions as query parameters.
public static HAKOM.DependencyInjection.Core.Net.Api.IContainer UseOrderModelBinder<TResult>(this HAKOM.DependencyInjection.Core.Net.Api.IContainer container, System.Collections.Generic.Dictionary<string,HAKOM.Persistence.Core.Net.Api.Ordering.Order<TResult>> expressionMappings);Type parameters
Section titled “Type parameters”TResult
The type of data for which orderings should be passable as query parameters.
Parameters
Section titled “Parameters”container IContainer
The IContainer to register the services with.
expressionMappings System.Collections.Generic.Dictionary<System.String,HAKOM.Persistence.Core.Net.Api.Ordering.Order<TResult>>
A collection of mappings from expression strings to Order<TResult> items.
Returns
Section titled “Returns”IContainer
The container for chaining of additional service registrations.
ContainerExtensions.UseRangeModelBinder<TResult>(this IContainer) Method
Section titled “ContainerExtensions.UseRangeModelBinder<TResult>(this IContainer) Method”Registers an implementation of System.ICustomFormatter with the container so that Range<TResult> parameters can be passed to controller actions as range headers.
public static HAKOM.DependencyInjection.Core.Net.Api.IContainer UseRangeModelBinder<TResult>(this HAKOM.DependencyInjection.Core.Net.Api.IContainer container);Type parameters
Section titled “Type parameters”TResult
The type of data for which range parameters should be supported.
Parameters
Section titled “Parameters”container IContainer
The IContainer to register the model binder with.
Returns
Section titled “Returns”IContainer
The container for chaining of additional service registrations.