Service refactoring to "fully" enable segments (#19114)
* Refactor serverside content editing to support all variance combinations * Fix build errors * Reintroduce the tests ignored by #19060 --------- Co-authored-by: Mads Rasmussen <madsr@hey.com>
This commit is contained in:
@@ -2,9 +2,7 @@
|
||||
|
||||
public abstract class ContentEditingModelBase
|
||||
{
|
||||
public string? InvariantName { get; set; }
|
||||
|
||||
public IEnumerable<PropertyValueModel> InvariantProperties { get; set; } = Array.Empty<PropertyValueModel>();
|
||||
public IEnumerable<PropertyValueModel> Properties { get; set; } = Array.Empty<PropertyValueModel>();
|
||||
|
||||
public IEnumerable<VariantModel> Variants { get; set; } = Array.Empty<VariantModel>();
|
||||
}
|
||||
|
||||
@@ -5,4 +5,8 @@ public class PropertyValueModel
|
||||
public required string Alias { get; set; }
|
||||
|
||||
public required object? Value { get; set; }
|
||||
|
||||
public string? Culture { get; set; }
|
||||
|
||||
public string? Segment { get; set; }
|
||||
}
|
||||
|
||||
@@ -7,6 +7,4 @@ public class VariantModel
|
||||
public string? Segment { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public required IEnumerable<PropertyValueModel> Properties { get; set; }
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ public sealed class PropertyValidationContext
|
||||
|
||||
public required IEnumerable<string> CulturesBeingValidated { get; init; }
|
||||
|
||||
public required IEnumerable<string> SegmentsBeingValidated { get; init; }
|
||||
public required IEnumerable<string?> SegmentsBeingValidated { get; init; }
|
||||
|
||||
public static PropertyValidationContext Empty() => new()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user