2018-04-18 19:46:47 +02:00
|
|
|
|
namespace Umbraco.Core.Models.PublishedContent
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
2018-04-30 21:29:49 +02:00
|
|
|
|
/// Represents the variation context.
|
2018-04-18 19:46:47 +02:00
|
|
|
|
/// </summary>
|
2018-04-30 21:29:49 +02:00
|
|
|
|
public class VariationContext
|
2018-04-18 19:46:47 +02:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
2018-04-30 21:29:49 +02:00
|
|
|
|
/// Initializes a new instance of the <see cref="VariationContext"/> class.
|
2018-04-18 19:46:47 +02:00
|
|
|
|
/// </summary>
|
2018-04-30 21:29:49 +02:00
|
|
|
|
public VariationContext(string culture = null, string segment = null)
|
2018-04-18 19:46:47 +02:00
|
|
|
|
{
|
2018-04-30 21:03:43 +02:00
|
|
|
|
Culture = culture ?? ""; // cannot be null, default to invariant
|
|
|
|
|
|
Segment = segment ?? ""; // cannot be null, default to neutral
|
2018-04-18 19:46:47 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the culture.
|
|
|
|
|
|
/// </summary>
|
2018-04-30 21:03:43 +02:00
|
|
|
|
public string Culture { get; }
|
2018-04-18 19:46:47 +02:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the segment.
|
|
|
|
|
|
/// </summary>
|
2018-04-30 21:03:43 +02:00
|
|
|
|
public string Segment { get; }
|
2018-04-18 19:46:47 +02:00
|
|
|
|
}
|
2018-04-29 20:02:38 +02:00
|
|
|
|
}
|