namespace Umbraco.Cms.Core.Models.PublishedContent; /// /// Represents the variation context. /// public class VariationContext { /// /// Initializes a new instance of the class. /// public VariationContext(string? culture = null, string? segment = null) { Culture = culture ?? string.Empty; // cannot be null, default to invariant Segment = segment ?? string.Empty; // cannot be null, default to neutral } /// /// Gets the culture. /// public string Culture { get; } /// /// Gets the segment. /// public string Segment { get; } /// /// Gets the segment for the content item /// /// /// public virtual string GetSegment(int contentId) => Segment; }