Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

27 lines
876 B

// ==========================================================================
// PartitioningExtensions.cs
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex Group
// All rights reserved.
// ==========================================================================
using System;
using System.Collections.Generic;
namespace Squidex.Domain.Apps.Core
{
public static class PartitioningExtensions
{
private static readonly HashSet<string> AllowedPartitions = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
{
Partitioning.Language.Key,
Partitioning.Invariant.Key
};
public static bool IsValidPartitioning(this string value)
{
return value == null || AllowedPartitions.Contains(value);
}
}
}