Class ProtoHttpOptionsRegistration

Namespace
ProtoTest.Http
Assembly
ProtoTest.Http.dll

Registers per-protocol response and attachment options under a stable protocol key, so REST and GraphQL keep their own configuration sections even though they share the base option types.

public static class ProtoHttpOptionsRegistration
Inheritance
ProtoHttpOptionsRegistration
Inherited Members

Methods

ConfigureAttachmentOptions(IServiceCollection, string, string, Action<ProtoHttpAttachmentOptions>?)

Registers a protocol's attachment options with the supplied code configuration. Every call's callback is applied in registration order before the known configuration section is bound over the result, so repeated calls compose instead of replacing each other.

public static void ConfigureAttachmentOptions(IServiceCollection services, string protocolName, string configurationSectionName, Action<ProtoHttpAttachmentOptions>? configure)

Parameters

services IServiceCollection
protocolName string
configurationSectionName string
configure Action<ProtoHttpAttachmentOptions>

ConfigureResponseOptions(IServiceCollection, string, string, Action<ProtoHttpResponseOptions>?)

Registers a protocol's response options with the supplied code configuration. Every call's callback is applied in registration order before the known configuration section is bound over the result, so repeated calls compose instead of replacing each other.

public static void ConfigureResponseOptions(IServiceCollection services, string protocolName, string configurationSectionName, Action<ProtoHttpResponseOptions>? configure)

Parameters

services IServiceCollection
protocolName string
configurationSectionName string
configure Action<ProtoHttpResponseOptions>

TryAddResponseOptions(IServiceCollection, string, string)

Registers a protocol's response options under its key, binding from configurationSectionName when first resolved. A second registration for the same key is ignored.

public static void TryAddResponseOptions(IServiceCollection services, string protocolName, string configurationSectionName)

Parameters

services IServiceCollection
protocolName string
configurationSectionName string