Optionalculture: string | null
The culture. null, undefined and 'invariant' all mean culture invariant.
Optionalsegment: string | null
The segment. null and undefined both mean segment invariant.
ReadonlycultureThe culture of this variant, or null when it is culture invariant.
ReadonlysegmentThe segment of this variant, or null when it is segment invariant (unsegmented).
Static ReadonlyINVARIANTA shared instance representing the invariant variant, meaning it has no culture and no segment.
Creates a copy of this Variant Id.
A new Variant Id with the same culture and segment.
Checks whether this Variant Id has the same culture and segment as a given object.
The object to compare with.
True if both culture and segment match.
Checks whether this Variant Id has the same culture and segment as another Variant Id.
The Variant Id to compare with.
True if both culture and segment match.
Checks whether this Variant Id has no culture.
True if the culture is invariant.
Checks whether this Variant Id has neither a culture nor a segment.
True if both culture and segment are invariant.
Checks whether this Variant Id has no segment.
True if the segment is invariant.
Checks whether this Variant Id is included in a given array of Variant Ids.
The variant ids to check against.
True if a matching variant id is found.
Creates a Variant Id with the given culture and the segment of this one.
The culture to use.
A new Variant Id.
Creates a Variant Id with the same segment as this one and no culture.
A new Variant Id.
Gets the culture part as a string.
The culture, or invariant when there is no culture.
Describes how a given Variant Id differs from this one, as a display string.
The Variant Id to compare with.
OptionalinvariantMessage: string = 'Invariant'
The text used when the cultures differ.
OptionalunsegmentedMessage: string = 'Unsegmented'
The text used when the segments differ.
The description, or an empty string when there are no differences.
Converts this Variant Id to a plain object.
An object holding the culture and the segment.
Creates a Variant Id with the given segment and the culture of this one.
The segment to use.
A new Variant Id.
Creates a Variant Id with the same culture as this one and no segment.
A new Variant Id.
Gets the segment part as a string.
The segment, or an empty string when there is no segment.
Serializes this Variant Id as culture or culture_segment, using invariant when there is no culture.
The result can be parsed back with UmbVariantId.FromString.
The string representation.
Creates a Variant Id reduced to the dimensions that are allowed to vary. A dimension that does not vary becomes invariant.
OptionalvaryByCulture: boolean
Whether to keep the culture.
OptionalvaryBySegment: boolean
Whether to keep the segment.
A new Variant Id.
StaticCreateCreates a Variant Id from an object holding a culture and a segment.
The object to read the culture and segment from.
A new Variant Id.
StaticCreateCreates a Variant Id from an object where the culture and/or segment may be omitted. Omitted values are treated as invariant.
The object to read the culture and segment from.
A new Variant Id.
StaticCreateGets the Variant Id representing the invariant variant.
The shared UmbVariantId.INVARIANT instance.
StaticFromParses a string in the format produced by UmbVariantId.toString into a Variant Id.
The format is culture or culture_segment, where a culture of invariant means no culture.
The string to parse.
A new Variant Id.
An identifier representing a Variant. This is at current state a culture and a segment. The identifier is not specific for ContentType Variants, but is used for many type of identification of a culture and a segment. One case is any property of a ContentType can be resolved into a VariantId depending on their structural settings such as Vary by Culture and Vary by Segmentation.
Instances are immutable. Methods that derive a variant return a new instance rather than modifying this one.