internal ExpectedTextValue ExpectedRegex(Regex pattern, ExpectedTextValue options = null)
        {
            if (pattern == null)
            {
                throw new ArgumentNullException(nameof(pattern));
            }

            ExpectedTextValue textValue = options ?? new() { };

            textValue.RegexSource = pattern.ToString();
            textValue.RegexFlags  = pattern.Options.GetInlineFlags();
            return(textValue);
        }
 internal async Task ExpectImplAsync(string expression, ExpectedTextValue textValue, object expected, string message, FrameExpectOptions options)
 {
     await ExpectImplAsync(expression, new ExpectedTextValue[] { textValue }, expected, message, options).ConfigureAwait(false);
 }