Class MvcCoreBuilderExtensions
- Namespace
- Codebelt.Extensions.AspNetCore.Mvc.Formatters.Text.Yaml
- Assembly
- Codebelt.Extensions.AspNetCore.Mvc.Formatters.Text.Yaml.dll
Extension methods for the IMvcCoreBuilder interface.
public static class MvcCoreBuilderExtensions
- Inheritance
-
MvcCoreBuilderExtensions
Methods
AddYamlFormatters(IMvcCoreBuilder, Action<YamlFormatterOptions>)
Adds the YAML serializer formatters to MVC.
public static IMvcCoreBuilder AddYamlFormatters(this IMvcCoreBuilder builder, Action<YamlFormatterOptions> setup = null)
Parameters
builder
IMvcCoreBuilderThe IMvcCoreBuilder.
setup
Action<YamlFormatterOptions>The YamlFormatterOptions which may be configured.
Returns
- IMvcCoreBuilder
A reference to
builder
after the operation has completed.
Exceptions
- ArgumentNullException
builder
cannot be null -or-setup
cannot be null.
AddYamlFormattersOptions(IMvcCoreBuilder, Action<YamlFormatterOptions>)
Adds configuration of YamlFormatterOptions for the application.
public static IMvcCoreBuilder AddYamlFormattersOptions(this IMvcCoreBuilder builder, Action<YamlFormatterOptions> setup)
Parameters
builder
IMvcCoreBuilderThe IMvcBuilder.
setup
Action<YamlFormatterOptions>The YamlFormatterOptions which need to be configured.
Returns
- IMvcCoreBuilder
A reference to
builder
after the operation has completed.
Exceptions
- ArgumentNullException
builder
cannot be null -or-setup
cannot be null.