diff --git a/src/OrchardCore.Modules/OrchardCore.UrlRewriting/Recipes/UrlRewritingStep.cs b/src/OrchardCore.Modules/OrchardCore.UrlRewriting/Recipes/UrlRewritingStep.cs index e1de790a5a4..adc334c319d 100644 --- a/src/OrchardCore.Modules/OrchardCore.UrlRewriting/Recipes/UrlRewritingStep.cs +++ b/src/OrchardCore.Modules/OrchardCore.UrlRewriting/Recipes/UrlRewritingStep.cs @@ -1,7 +1,5 @@ -using System.Text.Json; using System.Text.Json.Nodes; using Microsoft.Extensions.Localization; -using Microsoft.Extensions.Options; using OrchardCore.Recipes.Models; using OrchardCore.Recipes.Services; using OrchardCore.UrlRewriting.Models; @@ -13,25 +11,22 @@ namespace OrchardCore.UrlRewriting.Recipes; /// public sealed class UrlRewritingStep : NamedRecipeStepHandler { - private readonly JsonSerializerOptions _jsonSerializerOptions; private readonly IRewriteRulesManager _rewriteRulesManager; internal readonly IStringLocalizer S; public UrlRewritingStep( IRewriteRulesManager rewriteRulesManager, - IOptions jsonSerializerOptions, IStringLocalizer stringLocalizer) : base("UrlRewriting") { _rewriteRulesManager = rewriteRulesManager; - _jsonSerializerOptions = jsonSerializerOptions.Value; S = stringLocalizer; } protected override async Task HandleAsync(RecipeExecutionContext context) { - var model = context.Step.ToObject(_jsonSerializerOptions); + var model = context.Step.ToObject(); var tokens = model.Rules.Cast() ?? []; foreach (var token in tokens)