當前位置: 首頁>>代碼示例>>C#>>正文


C# Char.IsPubidChar方法代碼示例

本文整理匯總了C#中System.Char.IsPubidChar方法的典型用法代碼示例。如果您正苦於以下問題:C# Char.IsPubidChar方法的具體用法?C# Char.IsPubidChar怎麽用?C# Char.IsPubidChar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Char的用法示例。


在下文中一共展示了Char.IsPubidChar方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: DoctypePublicIdentifierValue

        /// <summary>
        /// See 8.2.4.58 DOCTYPE public identifier (double-quoted) state
        /// </summary>
        /// <param name="c">The next input character.</param>
        /// <param name="q">The closing character.</param>
        /// <param name="doctype">The current doctype token.</param>
        /// <returns>The emitted token.</returns>
        XmlToken DoctypePublicIdentifierValue(Char c, Char q, XmlDoctypeToken doctype)
        {
            while (c != q)
            {
                if (!c.IsPubidChar())
                    throw XmlParseError.XmlInvalidPubId.At(GetCurrentPosition());

                _stringBuffer.Append(c);
                c = GetNext();
            }

            doctype.PublicIdentifier = FlushBuffer();
            return DoctypePublicIdentifierAfter(GetNext(), doctype);
        }
開發者ID:fjwuyongzhi,項目名稱:AngleSharp,代碼行數:21,代碼來源:XmlTokenizer.cs

示例2: NotationDeclarationSystem

        DtdNotationToken NotationDeclarationSystem(Char c, Char quote, DtdNotationToken decl)
        {
            _stringBuffer.Clear();

            while (true)
            {
                if (c == Specification.EOF)
                {
                    RaiseErrorOccurred(ErrorCode.EOF);
                    _src.Back();
                    decl.SystemIdentifier = _stringBuffer.ToString();
                    return decl;
                }
                else if (c == Specification.NULL)
                {
                    RaiseErrorOccurred(ErrorCode.NULL);
                    _stringBuffer.Append(Specification.REPLACEMENT);
                }
                else if (c == quote)
                {
                    decl.SystemIdentifier = _stringBuffer.ToString();
                    return NotationDeclarationAfterSystem(_src.Next, decl);
                }
                else if (c.IsPubidChar())
                    _stringBuffer.Append(c);
                else
                    RaiseErrorOccurred(ErrorCode.InvalidCharacter);

                c = _src.Next;
            }
        }
開發者ID:Rajbandi,項目名稱:AngleSharp,代碼行數:31,代碼來源:DtdTokenizer.cs

示例3: EntityDeclarationPublic

        DtdToken EntityDeclarationPublic(Char c, Char quote, DtdEntityToken decl)
        {
            while (c != quote)
            {
                if (!c.IsPubidChar())
                    throw Errors.Xml(ErrorCode.DtdEntityInvalid);

                _stringBuffer.Append(c);
                c = _stream.Next;
            }

            decl.PublicIdentifier = _stringBuffer.ToString();
            return EntityDeclarationBeforeSystem(_stream.Next, decl);
        }
開發者ID:fjwuyongzhi,項目名稱:AngleSharp,代碼行數:14,代碼來源:DtdTokenizer.cs

示例4: NotationDeclarationPublic

        DtdNotationToken NotationDeclarationPublic(Char c, Char quote, DtdNotationToken decl)
        {
            _stringBuffer.Clear();

            while (c != quote)
            {
                if (c == Specification.EOF)
                    throw Errors.Xml(ErrorCode.DtdNotationInvalid);
                else if (!c.IsPubidChar())
                    throw Errors.Xml(ErrorCode.XmlInvalidPubId);

                _stringBuffer.Append(c);
                c = _stream.Next;
            }

            decl.PublicIdentifier = _stringBuffer.ToString();
            return NotationDeclarationAfterPublic(_stream.Next, decl);
        }
開發者ID:fjwuyongzhi,項目名稱:AngleSharp,代碼行數:18,代碼來源:DtdTokenizer.cs

示例5: DoctypePublicIdentifierValue

        /// <summary>
        /// See 8.2.4.58 DOCTYPE public identifier (double-quoted) state
        /// </summary>
        /// <param name="c">The next input character.</param>
        /// <param name="q">The closing character.</param>
        /// <param name="doctype">The current doctype token.</param>
        /// <returns>The emitted token.</returns>
        XmlToken DoctypePublicIdentifierValue(Char c, Char q, XmlDoctypeToken doctype)
        {
            while (c != q)
            {
                if (!c.IsPubidChar())
                    throw Errors.Xml(ErrorCode.XmlInvalidPubId);

                _stringBuffer.Append(c);
                c = _src.Next;
            }

            doctype.PublicIdentifier = _stringBuffer.ToString();
            _stringBuffer.Clear();
            return DoctypePublicIdentifierAfter(_src.Next, doctype);
        }
開發者ID:rrsc,項目名稱:AngleSharp,代碼行數:22,代碼來源:XmlTokenizer.cs


注:本文中的System.Char.IsPubidChar方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。