Bugfix variation context in background tasks

This commit is contained in:
Stephan
2019-02-16 17:25:24 +01:00
parent 7641e7a521
commit d8a9bfc22c
5 changed files with 52 additions and 7 deletions

View File

@@ -0,0 +1,26 @@
using Umbraco.Core.Models.PublishedContent;
namespace Umbraco.Web.Models.PublishedContent
{
/// <summary>
/// Implements a hybrid <see cref="IVariationContextAccessor"/>.
/// </summary>
internal class HybridVariationContextAccessor : HybridAccessorBase<VariationContext>, IVariationContextAccessor
{
public HybridVariationContextAccessor(IHttpContextAccessor httpContextAccessor)
: base(httpContextAccessor)
{ }
/// <inheritdoc />
protected override string ItemKey => "Umbraco.Web.HybridVariationContextAccessor";
/// <summary>
/// Gets or sets the <see cref="VariationContext"/> object.
/// </summary>
public VariationContext VariationContext
{
get => Value;
set => Value = value;
}
}
}