/// <summary>
 /// Initialises a new instance of the <see cref="UnhandledExceptionOperationResultExecutor" /> class.
 /// </summary>
 /// <param name="okResultOperationExecutor">The <see cref="OkResultOperationExecutor"/> writing is delegated to.</param>
 public ValidationFailedOperationResultExecutor(OkResultOperationExecutor okResultOperationExecutor)
 {
     this._okResultOperationExecutor = okResultOperationExecutor;
 }
 /// <summary>
 /// Initialises a new instance of the <see cref="UnhandledExceptionOperationResultExecutor" /> class.
 /// </summary>
 /// <param name="configuration">The configuration of the application.</param>
 /// <param name="okResultOperationExecutor">The <see cref="OkResultOperationExecutor"/> writing is delegated to.</param>
 public UnhandledExceptionOperationResultExecutor(IConfiguration configuration, OkResultOperationExecutor okResultOperationExecutor)
 {
     this._okResultOperationExecutor = okResultOperationExecutor;
     this._shouldExposeErrorMessage  = Convert.ToBoolean(configuration["Api:ExposeErrorMessage"] ?? "false");
 }
Пример #3
0
 /// <summary>
 /// Initialises a new instance of the <see cref="UnhandledExceptionOperationResultExecutor" /> class.
 /// </summary>
 /// <param name="configuration">The configuration of the application.</param>
 /// <param name="okResultOperationExecutor">The <see cref="OkResultOperationExecutor"/> writing is delegated to.</param>
 public UnhandledExceptionOperationResultExecutor(IOptions <BlueprintHttpOptions> configuration, OkResultOperationExecutor okResultOperationExecutor)
 {
     this._okResultOperationExecutor = okResultOperationExecutor;
     this._shouldExposeErrorMessage  = configuration.Value.ExposeExceptionDetailsInErrorResponses;
 }