[DebuggerStepThrough, DebuggerHidden, MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ValidatePlaceholderAllowed(this IFlexpressionConstraint source, string groupName)
        {
            var res = source.IsGroupAllowed(groupName);

            switch (res)
            {
            case FXConstraintResult.Allowed:
                return;

            case FXConstraintResult.OperationNotAllowed:
                throw new DomainConstraintBrokenException("Placeholders are not allowed.");

            default:
                throw new DomainConstraintBrokenException($"Placeholder group name '{groupName}' is not allowed.");
            }
        }
        public static void ValidateGroupAllowed(this IFlexpressionConstraint source, string groupName)
        {
            var res = source.IsGroupAllowed(groupName);

            switch (res)
            {
            case FXConstraintResult.Allowed:
                return;

            case FXConstraintResult.OperationNotAllowed:
                throw new DomainConstraintBrokenException($"Groups are not allowed by domain constraint ({source.GetType().Name}).");

            default:
                throw new DomainConstraintBrokenException($"Group name '{groupName}' is not allowed by domain constraint ({source.GetType().Name}).");
            }
        }