本文整理汇总了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);
}
示例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;
}
}
示例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);
}
示例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);
}
示例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);
}