示例#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, _ => { });
示例#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);
示例#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, _ => { });