File tree Expand file tree Collapse file tree 1 file changed +18
-18
lines changed
Expand file tree Collapse file tree 1 file changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -238,26 +238,26 @@ app.Endpoints(e => e.MapImageWizard("/image"));
238238 - string ('Hello')
239239
240240``` csharp
241- public partial class BackgroundColorFilter : ImageSharpFilter
241+ public partial class BackgroundColorFilter : ImageSharpFilter
242+ {
243+ // use dependency injection
244+ public BackgroundColorFilter (ILogger <BackgroundColorFilter > logger )
245+ {
246+ // ...
247+ }
248+
249+ [Filter ]
250+ public void BackgroundColor (byte r , byte g , byte b )
242251 {
243- // use dependency injection
244- public BackgroundColorFilter (ILogger <BackgroundColorFilter > logger )
245- {
246- // ...
247- }
248-
249- [Filter ]
250- public void BackgroundColor (byte r , byte g , byte b )
251- {
252- Context .Image .Mutate (m => m .BackgroundColor (new Rgba32 (r , g , b )));
253- }
254-
255- [Filter ]
256- public void BackgroundColor (float r , float g , float b )
257- {
258- Context .Image .Mutate (m => m .BackgroundColor (new Rgba32 (r , g , b )));
259- }
252+ Context .Image .Mutate (m => m .BackgroundColor (new Rgba32 (r , g , b )));
260253 }
254+
255+ [Filter ]
256+ public void BackgroundColor (float r , float g , float b )
257+ {
258+ Context .Image .Mutate (m => m .BackgroundColor (new Rgba32 (r , g , b )));
259+ }
260+ }
261261```
262262
263263The source generator creates the following code:
You can’t perform that action at this time.
0 commit comments