コード例 #1
0
        /// <summary>
        /// Try Get Encoded String Value
        /// </summary>
        /// <param name="stringToken">The string token to read from.</param>
        /// <param name="jsonStringDictionary">The JSON string dictionary.</param>
        /// <param name="value">The encoded string if found.</param>
        /// <returns>Encoded String Value</returns>
        private static bool TryGetEncodedStringValue(
            Utf8Span stringToken,
            IReadOnlyJsonStringDictionary jsonStringDictionary,
            out UtfAllString value)
        {
            if (JsonBinaryEncoding.TryGetEncodedSystemStringValue(stringToken, out value))
            {
                return(true);
            }

            if (JsonBinaryEncoding.TryGetEncodedUserStringValue(stringToken, jsonStringDictionary, out value))
            {
                return(true);
            }

            value = default;
            return(false);
        }