Beispiel #1
0
 /// <summary>
 /// Adds an exception mapping scheme which maps exception to HTTP response by convention.
 /// </summary>
 /// <param name="builder">The exception mapping builder.</param>
 /// <param name="name">The name of the scheme.</param>
 public static ExceptionMappingBuilder AddEndpointResponse(
     this ExceptionMappingBuilder builder,
     string name)
 => builder.AddEndpointResponse(name, _ => { });
Beispiel #2
0
 /// <summary>
 /// Adds an exception mapping scheme which maps exception to HTTP response by convention.
 /// </summary>
 /// <param name="builder">The exception mapping builder.</param>
 /// <param name="configure">The action to configure the endpoint exception mapping scheme.</param>
 public static ExceptionMappingBuilder AddEndpointResponse(
     this ExceptionMappingBuilder builder,
     Action <EndpointExceptionHandlerOptions> configure)
 => builder.AddEndpointResponse(EndpointExceptionMappingDefaults.EndpointScheme, configure);
Beispiel #3
0
 /// <summary>
 /// Adds an exception mapping scheme which maps exception to HTTP response by convention.
 /// </summary>
 /// <param name="builder">The exception mapping builder.</param>
 public static ExceptionMappingBuilder AddEndpointResponse(this ExceptionMappingBuilder builder)
 => builder.AddEndpointResponse(EndpointExceptionMappingDefaults.EndpointScheme, _ => { });