本文整理汇总了C#中System.Xml.PrefixHandle.GetString方法的典型用法代码示例。如果您正苦于以下问题:C# PrefixHandle.GetString方法的具体用法?C# PrefixHandle.GetString怎么用?C# PrefixHandle.GetString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Xml.PrefixHandle
的用法示例。
在下文中一共展示了PrefixHandle.GetString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LookupNamespace
protected Namespace LookupNamespace(PrefixHandle prefix)
{
Namespace ns = _nsMgr.LookupNamespace(prefix);
if (ns == null)
XmlExceptionHelper.ThrowUndefinedPrefix(this, prefix.GetString());
return ns;
}
示例2: CompareTo
public int CompareTo(PrefixHandle that)
{
return GetString().CompareTo(that.GetString());
}
示例3: ReadQualifiedName
private void ReadQualifiedName(PrefixHandle prefix, StringHandle localName)
{
int offset;
int offsetMax;
byte[] buffer = BufferReader.GetBuffer(out offset, out offsetMax);
int ch = 0;
int anyChar = 0;
int prefixChar = 0;
int prefixOffset = offset;
if (offset < offsetMax)
{
ch = buffer[offset];
prefixChar = ch;
if ((s_charType[ch] & CharType.FirstName) == 0)
anyChar |= 0x80;
anyChar |= ch;
offset++;
while (offset < offsetMax)
{
ch = buffer[offset];
if ((s_charType[ch] & CharType.Name) == 0)
break;
anyChar |= ch;
offset++;
}
}
else
{
anyChar |= 0x80;
ch = 0;
}
if (ch == ':')
{
int prefixLength = offset - prefixOffset;
if (prefixLength == 1 && prefixChar >= 'a' && prefixChar <= 'z')
prefix.SetValue(PrefixHandle.GetAlphaPrefix(prefixChar - 'a'));
else
prefix.SetValue(prefixOffset, prefixLength);
offset++;
int localNameOffset = offset;
if (offset < offsetMax)
{
ch = buffer[offset];
if ((s_charType[ch] & CharType.FirstName) == 0)
anyChar |= 0x80;
anyChar |= ch;
offset++;
while (offset < offsetMax)
{
ch = buffer[offset];
if ((s_charType[ch] & CharType.Name) == 0)
break;
anyChar |= ch;
offset++;
}
}
else
{
anyChar |= 0x80;
ch = 0;
}
localName.SetValue(localNameOffset, offset - localNameOffset);
if (anyChar >= 0x80)
{
VerifyNCName(prefix.GetString());
VerifyNCName(localName.GetString());
}
}
else
{
prefix.SetValue(PrefixHandleType.Empty);
localName.SetValue(prefixOffset, offset - prefixOffset);
if (anyChar >= 0x80)
{
VerifyNCName(localName.GetString());
}
}
BufferReader.Advance(offset - prefixOffset);
}
示例4: ReadQualifiedName
private void ReadQualifiedName(PrefixHandle prefix, StringHandle localName)
{
int num;
int num2;
byte[] buffer = base.BufferReader.GetBuffer(out num, out num2);
int index = 0;
int num4 = 0;
int num5 = 0;
int offset = num;
if (num < num2)
{
index = buffer[num];
num5 = index;
if ((charType[index] & 1) == 0)
{
num4 |= 0x80;
}
num4 |= index;
num++;
while (num < num2)
{
index = buffer[num];
if ((charType[index] & 2) == 0)
{
break;
}
num4 |= index;
num++;
}
}
else
{
num4 |= 0x80;
index = 0;
}
if (index != 0x3a)
{
prefix.SetValue(PrefixHandleType.Empty);
localName.SetValue(offset, num - offset);
if (num4 >= 0x80)
{
this.VerifyNCName(localName.GetString());
}
}
else
{
int length = num - offset;
if (((length == 1) && (num5 >= 0x61)) && (num5 <= 0x7a))
{
prefix.SetValue(PrefixHandle.GetAlphaPrefix(num5 - 0x61));
}
else
{
prefix.SetValue(offset, length);
}
num++;
int num8 = num;
if (num < num2)
{
index = buffer[num];
if ((charType[index] & 1) == 0)
{
num4 |= 0x80;
}
num4 |= index;
num++;
while (num < num2)
{
index = buffer[num];
if ((charType[index] & 2) == 0)
{
break;
}
num4 |= index;
num++;
}
}
else
{
num4 |= 0x80;
index = 0;
}
localName.SetValue(num8, num - num8);
if (num4 >= 0x80)
{
this.VerifyNCName(prefix.GetString());
this.VerifyNCName(localName.GetString());
}
}
base.BufferReader.Advance(num - offset);
}