#endif
}
-#if EqualsStructurally
-
- /// <summary>
- /// An optimized version of <see cref="Enumerable.SequenceEqual{T}(IEnumerable{T}, IEnumerable{T}, IEqualityComparer{T})"/>
- /// that allows nulls, considers reference equality and count before beginning the enumeration.
- /// </summary>
- /// <typeparam name="T">The type of elements in the sequence.</typeparam>
- /// <param name="sequence1">The first sequence.</param>
- /// <param name="sequence2">The second sequence.</param>
- /// <param name="equalityComparer">The equality comparer to use for the elements.</param>
- /// <returns><c>true</c> if the sequences are equal (same elements in the same order); <c>false</c> otherwise.</returns>
- internal static bool CollectionEquals<T>(this IEnumerable<T> sequence1, IEnumerable<T> sequence2, IEqualityComparer<T> equalityComparer = null)
- {
- if (sequence1 == sequence2)
- {
- return true;
- }
-
- if ((sequence1 == null) ^ (sequence2 == null))
- {
- return false;
- }
-
- int count1, count2;
- if (sequence1.TryGetCount(out count1) && sequence2.TryGetCount(out count2))
- {
- if (count1 != count2)
- {
- return false;
- }
-
- if (count1 == 0 && count2 == 0)
- {
- return true;
- }
- }
-
- return sequence1.SequenceEqual(sequence2, equalityComparer);
- }
-
- /// <summary>
- /// An optimized version of <see cref="Enumerable.SequenceEqual{T}(IEnumerable{T}, IEnumerable{T}, IEqualityComparer{T})"/>
- /// that allows nulls, considers reference equality and count before beginning the enumeration.
- /// </summary>
- /// <typeparam name="T">The type of elements in the sequence.</typeparam>
- /// <param name="sequence1">The first sequence.</param>
- /// <param name="sequence2">The second sequence.</param>
- /// <param name="equalityComparer">The equality comparer to use for the elements.</param>
- /// <returns><c>true</c> if the sequences are equal (same elements in the same order); <c>false</c> otherwise.</returns>
- internal static bool CollectionEquals<T>(this IEnumerable<T> sequence1, IEnumerable sequence2, IEqualityComparer equalityComparer = null)
- {
- if (sequence1 == sequence2)
- {
- return true;
- }
-
- if ((sequence1 == null) ^ (sequence2 == null))
- {
- return false;
- }
-
- int count1, count2;
- if (sequence1.TryGetCount(out count1) && sequence2.TryGetCount<T>(out count2))
- {
- if (count1 != count2)
- {
- return false;
- }
-
- if (count1 == 0 && count2 == 0)
- {
- return true;
- }
- }
-
- if (equalityComparer == null)
- {
- equalityComparer = EqualityComparer<T>.Default;
- }
-
- // If we have generic types we can use, use them to avoid boxing.
- var sequence2OfT = sequence2 as IEnumerable<T>;
- var equalityComparerOfT = equalityComparer as IEqualityComparer<T>;
- if (sequence2OfT != null && equalityComparerOfT != null)
- {
- return sequence1.SequenceEqual(sequence2OfT, equalityComparerOfT);
- }
- else
- {
- // We have to fall back to doing it manually since the underlying collection
- // being compared isn't a (matching) generic type.
- using (var enumerator = sequence1.GetEnumerator())
- {
- var enumerator2 = sequence2.GetEnumerator();
- try
- {
- while (enumerator.MoveNext())
- {
- if (!enumerator2.MoveNext() || !equalityComparer.Equals(enumerator.Current, enumerator2.Current))
- {
- return false;
- }
- }
-
- if (enumerator2.MoveNext())
- {
- return false;
- }
-
- return true;
- }
- finally
- {
- var enum2Disposable = enumerator2 as IDisposable;
- if (enum2Disposable != null)
- {
- enum2Disposable.Dispose();
- }
- }
- }
- }
- }
-
-#endif
-
/// <summary>
/// Provides a known wrapper around a sequence of elements that provides the number of elements
/// and an indexer into its contents.
_ilg.StoreMember(dataMember.MemberInfo);
}
-#if FEATURE_LEGACYNETCF
- // The DataContractSerializer in the .NET Framework doesn't support unordered elements:
- // deserialization will fail if the data members in the XML are not sorted alphabetically.
- // But the NetCF DataContractSerializer does support unordered element. To maintain compatibility
- // with Mango we always search for the member from the beginning of the member list.
- // We set memberIndexLocal to -1 because GetMemberIndex always starts from memberIndex+1.
- if (CompatibilitySwitches.IsAppEarlierThanWindowsPhone8)
- ilg.Set(memberIndexLocal, (int)-1);
- else
-#endif // FEATURE_LEGACYNETCF
_ilg.Set(memberIndexLocal, memberCount);
_ilg.EndCase();
}
if (!XmlConvert.StrEqual(_ps.chars, _ps.charPos, 5, XmlDeclarationBeginning) ||
- _xmlCharType.IsNameSingleChar(_ps.chars![_ps.charPos + 5])
-#if XML10_FIFTH_EDITION
- || xmlCharType.IsNCNameHighSurrogateChar( ps.chars[ps.charPos + 5] )
-#endif
- )
+ _xmlCharType.IsNameSingleChar(_ps.chars![_ps.charPos + 5]))
{
goto NoXmlDecl;
}
{
// version
case 0:
-#if XML10_FIFTH_EDITION
- // VersionNum ::= '1.' [0-9]+ (starting with XML Fifth Edition)
- if (pos - ps.charPos >= 3 &&
- ps.chars[ps.charPos] == '1' &&
- ps.chars[ps.charPos + 1] == '.' &&
- XmlCharType.IsOnlyDigits(ps.chars, ps.charPos + 2, pos - ps.charPos - 2))
- {
-#else
// VersionNum ::= '1.0' (XML Fourth Edition and earlier)
if (XmlConvert.StrEqual(_ps.chars, _ps.charPos, pos - _ps.charPos, "1.0"))
{
-#endif
if (!isTextDecl)
{
Debug.Assert(attr != null);
private bool ParseDocumentContent()
{
bool mangoQuirks = false;
-#if FEATURE_LEGACYNETCF
- // In Mango the default XmlTextReader is instantiated
- // with v1Compat flag set to true. One of the effects
- // of this settings is to eat any trailing nulls in the
- // buffer and some apps depend on this behavior.
- if (CompatibilitySwitches.IsAppEarlierThanWindowsPhone8)
- mangoQuirks = true;
-#endif
while (true)
{
bool needMoreChars = false;
{
pos++;
}
-#if XML10_FIFTH_EDITION
- else if (pos + 1 < ps.charsUsed && xmlCharType.IsNCNameSurrogateChar(chars[pos + 1], chars[pos]))
- {
- pos += 2;
- }
-#endif
else
{
goto ParseQNameSlow;
{
pos++;
}
-#if XML10_FIFTH_EDITION
- else if (pos < ps.charsUsed && xmlCharType.IsNCNameSurrogateChar(chars[pos + 1], chars[pos]))
- {
- pos += 2;
- }
-#endif
else
{
break;
goto ReadData;
}
- if (_xmlCharType.IsNCNameSingleChar(chars[pos]) || (chars[pos] == ':')
-#if XML10_FIFTH_EDITION
- || xmlCharType.IsNCNameHighSurrogateChar(chars[pos])
-#endif
- )
+ if (_xmlCharType.IsNCNameSingleChar(chars[pos]) || (chars[pos] == ':'))
{
ThrowTagMismatch(startTagNode);
}
{
startNameCharSize = 1;
}
-#if XML10_FIFTH_EDITION
- else if (pos + 1 < ps.charsUsed && xmlCharType.IsNCNameSurrogateChar(chars[pos + 1], tmpch1))
- {
- startNameCharSize = 2;
- }
-#endif
if (startNameCharSize == 0)
{
{
pos++;
}
-#if XML10_FIFTH_EDITION
- else if (pos + 1 < ps.charsUsed && xmlCharType.IsNCNameSurrogateChar(chars[pos + 1], tmpch2))
- {
- pos += 2;
- }
-#endif
else
{
break;
pos++;
goto ContinueParseName;
}
-#if XML10_FIFTH_EDITION
- else if ( pos + 1 < ps.charsUsed && xmlCharType.IsNCNameSurrogateChar( chars[pos + 1], chars[pos] ) ) {
- pos += 2;
- goto ContinueParseName;
- }
-#endif
// else fallback to full name parsing routine
pos = ParseQName(out colonPos);
chars = _ps.chars;
{
pos++;
}
-#if XML10_FIFTH_EDITION
- else if (pos + 1 < ps.charsUsed && xmlCharType.IsNCNameSurrogateChar(chars[pos + 1], chars[pos]))
- {
- pos += 2;
- }
-#endif
else
{
if (pos + 1 >= _ps.charsUsed)
{
pos++;
}
-#if XML10_FIFTH_EDITION
- else if ( pos + 1 < ps.charsUsed && xmlCharType.IsNCNameSurrogateChar( chars[pos + 1], chars[pos] ) ) {
- pos += 2;
- }
-#endif
else
{
break;
}
}
// end of buffer
- else if (pos == _ps.charsUsed
-#if XML10_FIFTH_EDITION
- || ( pos + 1 == ps.charsUsed && xmlCharType.IsNCNameHighSurrogateChar( chars[pos] ) )
-#endif
- )
+ else if (pos == _ps.charsUsed)
{
if (ReadDataInName(ref pos))
{
}
if (!XmlConvert.StrEqual(_ps.chars, _ps.charPos, 5, XmlDeclarationBeginning) ||
- _xmlCharType.IsNameSingleChar(_ps.chars[_ps.charPos + 5])
-#if XML10_FIFTH_EDITION
- || xmlCharType.IsNCNameHighSurrogateChar( ps.chars[ps.charPos + 5])
-#endif
- )
+ _xmlCharType.IsNameSingleChar(_ps.chars[_ps.charPos + 5]))
{
goto NoXmlDecl;
}
{
// version
case 0:
-#if XML10_FIFTH_EDITION
- // VersionNum ::= '1.' [0-9]+ (starting with XML Fifth Edition)
- if ( pos - ps.charPos >= 3 &&
- ps.chars[ps.charPos] == '1' &&
- ps.chars[ps.charPos + 1] == '.' &&
- XmlCharType.IsOnlyDigits( ps.chars, ps.charPos + 2, pos - ps.charPos - 2 )) {
-#else
// VersionNum ::= '1.0' (XML Fourth Edition and earlier)
if (XmlConvert.StrEqual(_ps.chars, _ps.charPos, pos - _ps.charPos, "1.0"))
{
-#endif
if (!isTextDecl)
{
attr!.SetValue(_ps.chars, _ps.charPos, pos - _ps.charPos);
{
pos++;
}
-
-#if XML10_FIFTH_EDITION
- else if ( pos + 1 < ps.charsUsed && xmlCharType.IsNCNameSurrogateChar(chars[pos + 1], chars[pos])) {
- pos += 2;
- }
-#endif
else
{
goto ParseQNameSlow;
{
pos++;
}
-
-#if XML10_FIFTH_EDITION
- else if ( pos < ps.charsUsed && xmlCharType.IsNCNameSurrogateChar(chars[pos + 1], chars[pos])) {
- pos += 2;
- }
-#endif
else
{
break;
bool tagMismatch = false;
- if (_xmlCharType.IsNCNameSingleChar(chars[pos]) || (chars[pos] == ':')
-#if XML10_FIFTH_EDITION
- || xmlCharType.IsNCNameHighSurrogateChar(chars[pos])
-#endif
-)
+ if (_xmlCharType.IsNCNameSingleChar(chars[pos]) || (chars[pos] == ':'))
{
tagMismatch = true;
}
{
startNameCharSize = 1;
}
-#if XML10_FIFTH_EDITION
- else if ( pos + 1 < ps.charsUsed && xmlCharType.IsNCNameSurrogateChar(chars[pos + 1], tmpch1 )) {
- startNameCharSize = 2;
- }
-#endif
if (startNameCharSize == 0)
{
{
pos++;
}
-#if XML10_FIFTH_EDITION
- else if (pos + 1 < ps.charsUsed && xmlCharType.IsNCNameSurrogateChar(chars[pos + 1], tmpch2)) {
- pos += 2;
- }
-#endif
else
{
break;
pos++;
goto ContinueParseName;
}
-#if XML10_FIFTH_EDITION
- else if ( pos + 1 < ps.charsUsed && xmlCharType.IsNCNameSurrogateChar(chars[pos + 1], chars[pos])) {
- pos += 2;
- goto ContinueParseName;
- }
-#endif
// else fallback to full name parsing routine
{
pos++;
}
-
-#if XML10_FIFTH_EDITION
- else if ( pos + 1 < ps.charsUsed && xmlCharType.IsNCNameSurrogateChar(chars[pos + 1], chars[pos])) {
- pos += 2;
- }
-#endif
else
{
if (pos + 1 >= _ps.charsUsed)
{
pos++;
}
-#if XML10_FIFTH_EDITION
- else if ( pos + 1 < ps.charsUsed && xmlCharType.IsNCNameSurrogateChar(chars[pos + 1], chars[pos])) {
- pos += 2;
- }
-#endif
else
{
break;
}
}
// end of buffer
- else if (pos == _ps.charsUsed
-#if XML10_FIFTH_EDITION
- || ( pos + 1 == ps.charsUsed && xmlCharType.IsNCNameHighSurrogateChar(chars[pos]))
-#endif
- )
+ else if (pos == _ps.charsUsed)
{
var tuple_28 = await ReadDataInNameAsync(pos).ConfigureAwait(false);
pos = tuple_28.Item1;
{
i = 1;
}
-#if XML10_FIFTH_EDITION
- else if (_xmlCharType.IsNCNameSurrogateChar(ncname, 0))
- { // surrogate ranges are same for NCName and StartNCName
- i = 2;
- }
-#endif
else
{
throw InvalidCharsException(ncname, 0);
{
i++;
}
-#if XML10_FIFTH_EDITION
- else if (xmlCharType.IsNCNameSurrogateChar(ncname, i))
- {
- i += 2;
- }
-#endif
else
{
throw InvalidCharsException(ncname, i);
// Text settings
private Encoding _encoding;
-#if FEATURE_LEGACYNETCF
- private bool dontWriteEncodingTag;
-#endif
-
private bool _omitXmlDecl;
private NewLineHandling _newLineHandling;
private string _newLineChars;
}
}
-#if FEATURE_LEGACYNETCF
- internal bool DontWriteEncodingTag
- {
- get
- {
- return dontWriteEncodingTag;
- }
- set
- {
- CheckReadOnly(nameof(DontWriteEncodingTag));
- dontWriteEncodingTag = value;
- }
- }
-#endif
-
// True if an xml declaration should *not* be written.
public bool OmitXmlDeclaration
{
}
if (_chars[_curPos + 1] != 'C' || _chars[_curPos + 2] != 'L' ||
_chars[_curPos + 3] != 'U' || _chars[_curPos + 4] != 'D' ||
- _chars[_curPos + 5] != 'E' || _xmlCharType.IsNameSingleChar(_chars[_curPos + 6])
-#if XML10_FIFTH_EDITION
- || xmlCharType.IsNCNameHighSurrogateChar( chars[curPos+6] )
-#endif
- )
+ _chars[_curPos + 5] != 'E' || _xmlCharType.IsNameSingleChar(_chars[_curPos + 6]))
{
goto default;
}
case 'G':
if (_chars[_curPos + 1] != 'N' || _chars[_curPos + 2] != 'O' ||
_chars[_curPos + 3] != 'R' || _chars[_curPos + 4] != 'E' ||
- _xmlCharType.IsNameSingleChar(_chars[_curPos + 5])
-#if XML10_FIFTH_EDITION
- ||xmlCharType.IsNCNameHighSurrogateChar( chars[curPos+5] )
-#endif
- )
+ _xmlCharType.IsNameSingleChar(_chars[_curPos + 5]))
{
goto default;
}
{
_curPos++;
}
-#if XML10_FIFTH_EDITION
- else if ( curPos + 1 < charsUsed && xmlCharType.IsNCNameSurrogateChar(chars[curPos+1], chars[curPos])) {
- curPos += 2;
- }
-#endif
else
{
if (_curPos + 1 >= _charsUsed)
{
_curPos++;
}
-#if XML10_FIFTH_EDITION
- else if ( curPos + 1 < charsUsed && xmlCharType.IsNameSurrogateChar(chars[curPos + 1], chars[curPos]) ) {
- curPos += 2;
- }
-#endif
else
{
break;
}
}
// end of buffer
- else if (_curPos == _charsUsed
-#if XML10_FIFTH_EDITION
- || ( curPos + 1 == charsUsed && xmlCharType.IsNCNameHighSurrogateChar( chars[curPos] ) )
-#endif
- )
+ else if (_curPos == _charsUsed)
{
if (ReadDataInName())
{
{
_curPos++;
}
-#if XML10_FIFTH_EDITION
- else if (curPos + 1 < charsUsed && xmlCharType.IsNCNameSurrogateChar(chars[curPos + 1], chars[curPos])) {
- curPos += 2;
- }
-#endif
else
{
break;
}
}
- if (_curPos < _charsUsed
-#if XML10_FIFTH_EDITION
- && ( !xmlCharType.IsNCNameHighSurrogateChar( chars[curPos] ) || curPos + 1 < charsUsed )
-#endif
- )
+ if (_curPos < _charsUsed)
{
if (_curPos - _tokenStartPos == 0)
{
private string ParseUnexpectedToken(int startPos)
{
- if (_xmlCharType.IsNCNameSingleChar(_chars[startPos])
-#if XML10_FIFTH_EDITION
- || xmlCharType.IsNCNameHighSurrogateChar( chars[startPos] )
-#endif
- )
+ if (_xmlCharType.IsNCNameSingleChar(_chars[startPos]))
{ // postpone the proper surrogate checking to the loop below
int endPos = startPos;
while (true)
{
endPos++;
}
-#if XML10_FIFTH_EDITION
- else if ( chars[endPos] != 0 && // check for end of the buffer
- xmlCharType.IsNCNameSurrogateChar( chars[endPos], chars[endPos + 1] ) ) {
- endPos += 2;
- }
-#endif
else
{
break;
}
if (_chars[_curPos + 1] != 'C' || _chars[_curPos + 2] != 'L' ||
_chars[_curPos + 3] != 'U' || _chars[_curPos + 4] != 'D' ||
- _chars[_curPos + 5] != 'E' || _xmlCharType.IsNameSingleChar(_chars[_curPos + 6])
-#if XML10_FIFTH_EDITION
- || xmlCharType.IsNCNameHighSurrogateChar( chars[curPos+6] )
-#endif
- )
+ _chars[_curPos + 5] != 'E' || _xmlCharType.IsNameSingleChar(_chars[_curPos + 6]))
{
goto default;
}
case 'G':
if (_chars[_curPos + 1] != 'N' || _chars[_curPos + 2] != 'O' ||
_chars[_curPos + 3] != 'R' || _chars[_curPos + 4] != 'E' ||
- _xmlCharType.IsNameSingleChar(_chars[_curPos + 5])
-#if XML10_FIFTH_EDITION
- ||xmlCharType.IsNCNameHighSurrogateChar( chars[curPos+5] )
-#endif
- )
+ _xmlCharType.IsNameSingleChar(_chars[_curPos + 5]))
{
goto default;
}
{
_curPos++;
}
-#if XML10_FIFTH_EDITION
- else if ( curPos + 1 < charsUsed && xmlCharType.IsNCNameSurrogateChar(chars[curPos+1], chars[curPos])) {
- curPos += 2;
- }
-#endif
else
{
if (_curPos + 1 >= _charsUsed)
{
_curPos++;
}
-#if XML10_FIFTH_EDITION
- else if ( curPos + 1 < charsUsed && xmlCharType.IsNameSurrogateChar(chars[curPos + 1], chars[curPos]) ) {
- curPos += 2;
- }
-#endif
else
{
break;
}
}
// end of buffer
- else if (_curPos == _charsUsed
-#if XML10_FIFTH_EDITION
- || ( curPos + 1 == charsUsed && xmlCharType.IsNCNameHighSurrogateChar( chars[curPos] ) )
-#endif
- )
+ else if (_curPos == _charsUsed)
{
if (await ReadDataInNameAsync().ConfigureAwait(false))
{
{
_curPos++;
}
-#if XML10_FIFTH_EDITION
- else if (curPos + 1 < charsUsed && xmlCharType.IsNCNameSurrogateChar(chars[curPos + 1], chars[curPos])) {
- curPos += 2;
- }
-#endif
else
{
break;
}
}
- if (_curPos < _charsUsed
-#if XML10_FIFTH_EDITION
- && ( !xmlCharType.IsNCNameHighSurrogateChar( chars[curPos] ) || curPos + 1 < charsUsed )
-#endif
- )
+ if (_curPos < _charsUsed)
{
if (_curPos - _tokenStartPos == 0)
{
{
i++;
}
-#if XML10_FIFTH_EDITION
- else if (xmlCharType.IsNCNameSurrogateChar(s, i)) {
- i += 2;
- }
-#endif
else
{
break;
{
i++;
}
-#if XML10_FIFTH_EDITION
- else if (xmlCharType.IsNCNameSurrogateChar(s, i))
- {
- i += 2;
- }
-#endif
else
{
break;
{
i++;
}
-#if XML10_FIFTH_EDITION
- else if (xmlCharType.IsNCNameSurrogateChar(s, i))
- {
- i += 2;
- }
-#endif
else
{
return 0; // no valid StartNCName char
{
i++;
}
-#if XML10_FIFTH_EDITION
- else if (xmlCharType.IsNCNameSurrogateChar(s, i))
- {
- i += 2;
- }
-#endif
else
{
break;
{
i++;
}
-#if XML10_FIFTH_EDITION
- else if (s_xmlCharType.IsNCNameSurrogateChar(s, i)) {
- i += 2;
- }
-#endif
else
{
return 0; // no valid StartNCName char
{
i++;
}
-#if XML10_FIFTH_EDITION
- else if (s_xmlCharType.IsNCNameSurrogateChar(s, i)) {
- i += 2;
- }
-#endif
else
{
break;
}
}
-#if XML10_FIFTH_EDITION
- private char PeekNextChar()
- {
- Debug.Assert(0 <= xpathExprIndex && xpathExprIndex <= xpathExpr.Length);
- if (xpathExprIndex < xpathExpr.Length)
- {
- return xpathExpr[xpathExprIndex];
- }
- else
- {
- Debug.Assert(xpathExprIndex == xpathExpr.Length);
- return '\0';
- }
- }
-#endif
-
public LexKind Kind { get { return _kind; } }
public string Name
_kind = LexKind.Number;
_numberValue = ScanNumber();
}
- else if (_xmlCharType.IsStartNCNameSingleChar(this.CurrentChar)
-#if XML10_FIFTH_EDITION
- || xmlCharType.IsNCNameHighSurrogateChar(this.CurerntChar)
-#endif
- )
+ else if (_xmlCharType.IsStartNCNameSingleChar(this.CurrentChar))
{
_kind = LexKind.Name;
_name = ScanName();
NextChar();
_name = "*";
}
- else if (_xmlCharType.IsStartNCNameSingleChar(this.CurrentChar)
-#if XML10_FIFTH_EDITION
- || xmlCharType.IsNCNameHighSurrogateChar(this.CurerntChar)
-#endif
- )
+ else if (_xmlCharType.IsStartNCNameSingleChar(this.CurrentChar))
{
_name = ScanName();
}
private string ScanName()
{
- Debug.Assert(_xmlCharType.IsStartNCNameSingleChar(this.CurrentChar)
-#if XML10_FIFTH_EDITION
- || xmlCharType.IsNCNameHighSurrogateChar(this.CurerntChar)
-#endif
- );
+ Debug.Assert(_xmlCharType.IsStartNCNameSingleChar(this.CurrentChar));
int start = _xpathExprIndex - 1;
int len = 0;
NextChar();
len++;
}
-#if XML10_FIFTH_EDITION
- else if (xmlCharType.IsNCNameSurrogateChar(this.PeekNextChar(), this.CurerntChar))
- {
- NextChar();
- NextChar();
- len += 2;
- }
-#endif
else
{
break;
return s_xmlCharType.IsStartNCNameSingleChar(ch);
}
-#if XML10_FIFTH_EDITION
- public static bool IsStartNCNameSurrogatePair(char lowChar, char highChar)
- {
- return xmlCharType.IsNCNameSurrogateChar(lowChar, highChar);
- }
-#endif
-
// Name character types - as defined in Namespaces XML 1.0 spec (second edition) production [6] NCNameStartChar
// combined with the production [4] NameChar of XML 1.0 spec
public static bool IsNCNameChar(char ch)
return s_xmlCharType.IsNCNameSingleChar(ch);
}
-#if XML10_FIFTH_EDITION
- public static bool IsNCNameSurrogatePair(char lowChar, char highChar)
- {
- return xmlCharType.IsNCNameSurrogateChar(lowChar, highChar);
- }
-#endif
-
// Valid XML character - as defined in XML 1.0 spec (fifth edition) production [2] Char
public static bool IsXmlChar(char ch)
{
}
}
-#if XML10_FIFTH_EDITION
- private char PeekNextChar() {
- Debug.Assert(-1 <= curIndex && curIndex <= xpathExpr.Length);
- if (curIndex + 1 < xpathExpr.Length) {
- return xpathExpr[curIndex + 1];
- }
- else {
- return '\0';
- }
- }
-#endif
-
public string Name
{
get
ScanNumber();
break;
default:
- if (_xmlCharType.IsStartNCNameSingleChar(_curChar)
-#if XML10_FIFTH_EDITION
- || xmlCharType.IsNCNameHighSurrogateChar(curChar)
-#endif
- )
+ if (_xmlCharType.IsStartNCNameSingleChar(_curChar))
{
_kind = LexKind.Name;
_name = ScanNCName();
_prefix = _name;
_name = "*";
}
- else if (_xmlCharType.IsStartNCNameSingleChar(_curChar)
-#if XML10_FIFTH_EDITION
- || xmlCharType.IsNCNameHighSurrogateChar(curChar)
-#endif
- )
+ else if (_xmlCharType.IsStartNCNameSingleChar(_curChar))
{
_prefix = _name;
_name = ScanNCName();
private string ScanNCName()
{
- Debug.Assert(_xmlCharType.IsStartNCNameSingleChar(_curChar)
-#if XML10_FIFTH_EDITION
- || xmlCharType.IsNCNameHighSurrogateChar(curChar)
-#endif
- );
+ Debug.Assert(_xmlCharType.IsStartNCNameSingleChar(_curChar));
int start = _curIndex;
while (true)
{
{
NextChar();
}
-#if XML10_FIFTH_EDITION
- else if (xmlCharType.IsNCNameSurrogateChar(PeekNextChar(), curChar)) {
- NextChar();
- NextChar();
- }
-#endif
else
{
break;
<PropertyGroup>
<RootNamespace>System.Threading.Tasks.Parallel</RootNamespace>
<AssemblyName>System.Threading.Tasks.Parallel</AssemblyName>
- <DefineConstants>$(DefineConstants);CONCURRENT_COLLECTIONS;FEATURE_TRACING</DefineConstants>
+ <DefineConstants>$(DefineConstants);FEATURE_TRACING</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>