Skip to content

Commit

Permalink
refactor: code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jcdcdev committed Nov 17, 2024
1 parent 42902f2 commit dd415d0
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/jcdcdev.Umbraco.Core/Web/RenderController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,16 @@

namespace jcdcdev.Umbraco.Core.Web;

public abstract class RenderController<T> : RenderController where T : class, IPublishedContent
public abstract class RenderController<T>(
ILogger<RenderController> logger,
ICompositeViewEngine compositeViewEngine,
IUmbracoContextAccessor umbracoContextAccessor,
UmbracoHelper helper)
: RenderController(logger, compositeViewEngine, umbracoContextAccessor)
where T : class, IPublishedContent
{
protected RenderController(
ILogger<RenderController> logger,
ICompositeViewEngine compositeViewEngine,
IUmbracoContextAccessor umbracoContextAccessor,
UmbracoHelper helper) : base(logger, compositeViewEngine, umbracoContextAccessor)
{
Helper = helper;
UmbracoContextAccessor = umbracoContextAccessor;
}

protected UmbracoHelper Helper { get; }
public IUmbracoContextAccessor UmbracoContextAccessor { get; }
protected UmbracoHelper Helper { get; } = helper;
public IUmbracoContextAccessor UmbracoContextAccessor { get; } = umbracoContextAccessor;

protected override T CurrentPage => base.CurrentPage as T ?? throw new InvalidOperationException();
}

0 comments on commit dd415d0

Please sign in to comment.