diff --git a/src/OrchardCore/OrchardCore.ResourceManagement.Abstractions/RequireSettings.cs b/src/OrchardCore/OrchardCore.ResourceManagement.Abstractions/RequireSettings.cs index 8542a0ea570..686748ad0ca 100644 --- a/src/OrchardCore/OrchardCore.ResourceManagement.Abstractions/RequireSettings.cs +++ b/src/OrchardCore/OrchardCore.ResourceManagement.Abstractions/RequireSettings.cs @@ -7,8 +7,6 @@ namespace OrchardCore.ResourceManagement { public class RequireSettings { - private readonly ResourceManagementOptions _options; - private Dictionary _attributes; public string BasePath { get; set; } @@ -38,7 +36,6 @@ public RequireSettings() public RequireSettings(ResourceManagementOptions options) { - _options = options; CdnMode = options.UseCdn; DebugMode = options.DebugMode; Culture = options.Culture; @@ -261,19 +258,18 @@ public RequireSettings CombinePosition(RequireSettings dependent) return this; } - public RequireSettings New() + public RequireSettings New() => new() { - RequireSettings settings = _options != null - ? new(_options) - : new(); - - settings.Name = Name; - settings.Type = Type; - settings.Location = Location; - settings.Position = Position; - - return settings; - } + CdnMode = CdnMode, + DebugMode = DebugMode, + Culture = Culture, + CdnBaseUrl = CdnBaseUrl, + AppendVersion = AppendVersion, + Name = Name, + Type = Type, + Location = Location, + Position = Position, + }; public RequireSettings NewAndCombine(RequireSettings other) => New().Combine(other);