File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
tests/ImageSharp.Web.Tests/TestUtilities Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 77using Microsoft . AspNetCore . TestHost ;
88using Microsoft . Extensions . Configuration ;
99using Microsoft . Extensions . DependencyInjection ;
10+ using SixLabors . ImageSharp . Formats ;
1011using SixLabors . ImageSharp . Web . DependencyInjection ;
1112using SixLabors . ImageSharp . Web . Middleware ;
1213
@@ -67,6 +68,16 @@ protected void ConfigureServices(IServiceCollection services)
6768 return onParseCommandsAsync . Invoke ( context ) ;
6869 } ;
6970
71+ Func < HttpContext , DecoderOptions , Task > onBeforeLoadAsync = options . OnBeforeLoadAsync ;
72+
73+ options . OnBeforeLoadAsync = ( context , decoderOptions ) =>
74+ {
75+ Assert . NotNull ( context ) ;
76+ Assert . NotNull ( decoderOptions ) ;
77+
78+ return onBeforeLoadAsync . Invoke ( context , decoderOptions ) ;
79+ } ;
80+
7081 Func < ImageProcessingContext , Task > onProcessedAsync = options . OnProcessedAsync ;
7182
7283 options . OnProcessedAsync = context =>
You can’t perform that action at this time.
0 commit comments