87 writes to charPos
dotnet-svcutil-lib (87)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (86)
2254
_ps.
charPos
= _ps.charsUsed;
2480
_ps.
charPos
= value;
2679
_ps.
charPos
= initialPos;
2726
_ps.
charPos
= pos;
2732
_ps.
charPos
= pos;
2738
_ps.
charPos
= pos;
3460
_ps.
charPos
= 0;
3657
_ps.
charPos
+= 5;
3684
_ps.
charPos
+= 2;
3787
_ps.
charPos
= nameEndPos;
3799
_ps.
charPos
++;
3812
_ps.
charPos
++;
3896
_ps.
charPos
= pos + 1;
3976
_ps.
charPos
= pos + 1;
3991
_ps.
charPos
= pos + 2;
4015
_ps.
charPos
= pos + 6;
4039
_ps.
charPos
= pos;
4075
_ps.
charPos
= pos;
4207
_ps.
charPos
= pos + 2;
4222
_ps.
charPos
= pos + 2;
4244
_ps.
charPos
= pos + 6;
4267
_ps.
charPos
= pos + 2;
4279
_ps.
charPos
= pos + 1;
4488
_ps.
charPos
= pos;
4498
_ps.
charPos
= pos + 1;
4506
_ps.
charPos
= pos;
4519
_ps.
charPos
= pos + 2;
4741
_ps.
charPos
= pos + 1;
4808
_ps.
charPos
= pos;
4838
_ps.
charPos
= pos + 1;
4852
_ps.
charPos
= pos + 2;
4877
_ps.
charPos
= pos;
4972
_ps.
charPos
= pos;
4985
_ps.
charPos
= pos;
4995
_ps.
charPos
= pos;
5020
_ps.
charPos
= pos;
5243
_ps.
charPos
= pos;
5261
_ps.
charPos
++;
5271
_ps.
charPos
= pos;
5280
_ps.
charPos
= pos;
5295
_ps.
charPos
++;
5313
_ps.
charPos
= pos;
5338
_ps.
charPos
++;
5361
_ps.
charPos
++;
5489
_ps.
charPos
= pos + 1;
5710
_ps.
charPos
++;
5887
_ps.
charPos
= pos;
6068
_ps.
charPos
++;
6115
_ps.
charPos
++;
6135
_ps.
charPos
= endPos + 1;
6333
_ps.
charPos
= nameEndPos;
6460
_ps.
charPos
= pos + 2;
6499
_ps.
charPos
++;
6564
_ps.
charPos
= pos;
6668
_ps.
charPos
= pos + 3;
6718
_ps.
charPos
++;
6781
_ps.
charPos
= pos;
6820
_ps.
charPos
+= 8;
6866
_ps.
charPos
= pos;
6887
_ps.
charPos
+= 6;
6924
_ps.
charPos
+= 6;
6945
_ps.
charPos
++;
6963
_ps.
charPos
++;
6975
_ps.
charPos
++;
7004
_ps.
charPos
= pos + 1;
7009
_ps.
charPos
= pos;
7208
_ps.
charPos
= pos + 1;
7244
_ps.
charPos
= pos;
7260
_ps.
charPos
= pos;
7321
_ps.
charPos
= newPos - charCount;
7391
_ps.
charPos
= pos;
7490
_ps.
charPos
= newPos - 1;
7765
_ps.
charPos
= endPos + 1;
8152
_ps.
charPos
= initialPos;
8361
_ps.
charPos
-= 2;
8369
_ps.
charPos
-= 3;
8377
_ps.
charPos
-= 3;
8530
_ps.
charPos
= endPos;
8539
_ps.
charPos
++;
8636
_ps.
charPos
= pos;
8761
_ps.
charPos
= pos;
8779
_ps.
charPos
++;
8825
_ps.
charPos
= pos;
8856
_ps.
charPos
= pos;
8887
_ps.
charPos
= pos;
8910
_ps.
charPos
= pos;
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImplHelpers.cs (1)
74
charPos
= 0;
241 references to charPos
dotnet-svcutil-lib (241)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (240)
1515
if (_ps.charsUsed - _ps.
charPos
== 0)
1536
if (_ps.charsUsed - _ps.
charPos
== 0 && !_ps.entity.IsExternal)
2253
_stringBuilder.Append(_ps.chars, _ps.
charPos
, _ps.charsUsed - _ps.
charPos
);
2475
return _ps.
charPos
;
2672
int initialPos = _ps.
charPos
;
2898
Debug.Assert(_ps.
charPos
== 0 && _ps.charsUsed == 0 && _ps.textReader == null);
2991
Debug.Assert(_ps.
charPos
== 0 && _ps.charsUsed == 0 && _ps.stream == null);
3023
Debug.Assert(_ps.
charPos
== 0 && _ps.charsUsed == 0);
3251
Debug.Assert(_ps.
charPos
== 0);
3354
Debug.Assert(_ps.charsUsed >= _ps.
charPos
, "The current position must be in the valid character range.");
3362
Debug.Assert(_charactersInDocument >= _ps.charsUsed - _ps.
charPos
,
3364
_charactersInDocument -= _ps.charsUsed - _ps.
charPos
;
3370
Debug.Assert(_charactersFromEntities >= _ps.charsUsed - _ps.
charPos
,
3372
_charactersFromEntities -= _ps.charsUsed - _ps.
charPos
;
3377
if (_ps.
charPos
> 0)
3379
_ps.bytePos += _ps.encoding.GetByteCount(_ps.chars, 0, _ps.
charPos
);
3381
_ps.charsUsed = _ps.
charPos
;
3452
int copyCharsCount = _ps.charsUsed - _ps.
charPos
;
3455
_ps.lineStartPos = _ps.lineStartPos - _ps.
charPos
;
3458
BlockCopyChars(_ps.chars, _ps.
charPos
, _ps.chars, 0, copyCharsCount);
3634
while (_ps.charsUsed - _ps.
charPos
< 6)
3642
if (!XmlConvert.StrEqual(_ps.chars, _ps.
charPos
, 5, XmlDeclarationBegining) ||
3643
_xmlCharType.IsNameSingleChar(_ps.chars[_ps.
charPos
+ 5])
3673
if (_ps.chars[_ps.
charPos
] == '?')
3677
if (_ps.chars[_ps.
charPos
+ 1] == '>')
3723
else if (_ps.
charPos
+ 1 == _ps.charsUsed)
3742
switch (_ps.chars[_ps.
charPos
])
3745
if (XmlConvert.StrEqual(_ps.chars, _ps.
charPos
, nameEndPos - _ps.
charPos
, "version") && xmlDeclState == 0)
3755
if (XmlConvert.StrEqual(_ps.chars, _ps.
charPos
, nameEndPos - _ps.
charPos
, "encoding") &&
3767
if (XmlConvert.StrEqual(_ps.chars, _ps.
charPos
, nameEndPos - _ps.
charPos
, "standalone") &&
3786
sb.Append(_ps.chars, _ps.
charPos
, nameEndPos - _ps.
charPos
);
3790
if (_ps.chars[_ps.
charPos
] != '=')
3793
if (_ps.chars[_ps.
charPos
] != '=')
3801
char quoteChar = _ps.chars[_ps.
charPos
];
3805
quoteChar = _ps.chars[_ps.
charPos
];
3820
int pos = _ps.
charPos
;
3846
if (XmlConvert.StrEqual(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
, "1.0"))
3851
attr.SetValue(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
);
3857
string badVersion = new string(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
);
3862
string encName = new string(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
);
3871
if (XmlConvert.StrEqual(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
, "yes"))
3875
else if (XmlConvert.StrEqual(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
, "no"))
3886
attr.SetValue(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
);
3894
sb.Append(chars, _ps.
charPos
, pos - _ps.
charPos
);
3962
int pos = _ps.
charPos
;
4030
Throw(_ps.
charPos
, ResXml.Xml_InvalidRootData);
4113
pos = _ps.
charPos
;
4153
pos = _ps.
charPos
;
4186
pos = _ps.
charPos
;
4196
int pos = _ps.
charPos
;
4312
if (_ps.charsUsed - _ps.
charPos
!= 0)
4368
int pos = _ps.
charPos
;
4456
_nameTable.Add(chars, _ps.
charPos
, pos - _ps.
charPos
));
4460
int startPos = _ps.
charPos
;
4473
_nameTable.Add(chars, _ps.
charPos
, prefixLen),
4511
pos = _ps.
charPos
;
4628
while (_ps.charsUsed - _ps.
charPos
< prefLen + locLen + 1)
4640
if (!XmlConvert.StrEqual(chars, _ps.
charPos
, locLen, startTagNode.localName))
4648
int colonPos = _ps.
charPos
+ prefLen;
4649
if (!XmlConvert.StrEqual(chars, _ps.
charPos
, prefLen, startTagNode.prefix) ||
4663
pos = _ps.
charPos
+ nameLen;
4760
args[3] = new string(_ps.chars, _ps.
charPos
, endPos - _ps.
charPos
);
4773
int pos = _ps.
charPos
;
4873
if (pos == _ps.
charPos
)
4974
pos = _ps.
charPos
;
4987
pos = _ps.
charPos
;
5014
string val = new string(chars, _ps.
charPos
, pos - _ps.
charPos
);
5018
attr.SetValue(chars, _ps.
charPos
, pos - _ps.
charPos
);
5025
pos = _ps.
charPos
;
5057
pos = _ps.
charPos
;
5240
if (pos - _ps.
charPos
> 0)
5242
_stringBuilder.Append(chars, _ps.
charPos
, pos - _ps.
charPos
);
5309
if (pos - _ps.
charPos
> 0)
5311
_stringBuilder.Append(chars, _ps.
charPos
, pos - _ps.
charPos
);
5364
pos = _ps.
charPos
;
5393
pos = _ps.
charPos
;
5396
pos = _ps.
charPos
;
5434
if (_ps.charsUsed - _ps.
charPos
> 0)
5436
if (_ps.chars[_ps.
charPos
] != (char)0xD)
5471
pos = _ps.
charPos
;
5661
int pos = _ps.
charPos
;
5694
if (pos - _ps.
charPos
> 0)
5755
if (pos > _ps.
charPos
)
5782
pos = _ps.
charPos
;
5824
int offset = pos - _ps.
charPos
;
5828
pos = _ps.
charPos
+ offset;
5833
ThrowInvalidChar(_ps.chars, _ps.charsUsed, _ps.
charPos
+ offset);
5840
if (pos > _ps.
charPos
)
5847
if (_ps.charsUsed - _ps.
charPos
> 0)
5849
if (_ps.chars[_ps.
charPos
] != (char)0xD && _ps.chars[_ps.
charPos
] != ']')
5872
pos = _ps.
charPos
;
5885
startPos = _ps.
charPos
;
6033
if (_ps.chars[_ps.
charPos
] == '<' || _ps.charsUsed - _ps.
charPos
== 0 || ZeroEndingStream(_ps.
charPos
))
6042
if (_ps.chars[_ps.
charPos
] == '<' || _ps.charsUsed - _ps.
charPos
== 0 || ZeroEndingStream(_ps.
charPos
))
6054
if (_xmlCharType.IsCharData(_ps.chars[_ps.
charPos
]))
6060
ThrowInvalidChar(_ps.chars, _ps.charsUsed, _ps.
charPos
);
6067
Debug.Assert(_ps.chars[_ps.
charPos
] == '&');
6076
Debug.Assert(_ps.chars[_ps.
charPos
] == '&');
6078
if (_ps.
charPos
+ 1 == _ps.charsUsed)
6087
if (_ps.chars[_ps.
charPos
+ 1] == '#')
6134
string entityName = _nameTable.Add(_ps.chars, _ps.
charPos
, endPos - _ps.
charPos
);
6327
string target = _nameTable.Add(_ps.chars, _ps.
charPos
, nameEndPos - _ps.
charPos
);
6348
char ch = _ps.chars[_ps.
charPos
];
6349
Debug.Assert(_ps.
charPos
< _ps.charsUsed);
6352
if (_ps.charsUsed - _ps.
charPos
< 2)
6356
if (ch != '?' || _ps.chars[_ps.
charPos
+ 1] != '>')
6358
Throw(ResXml.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(_ps.chars, _ps.charsUsed, _ps.
charPos
));
6418
if (_ps.charsUsed - _ps.
charPos
< 2)
6426
int pos = _ps.
charPos
;
6459
outStartPos = _ps.
charPos
;
6483
if (pos - _ps.
charPos
> 0)
6563
outStartPos = _ps.
charPos
;
6623
if (_ps.charsUsed - _ps.
charPos
< 3)
6632
int pos = _ps.
charPos
;
6667
outStartPos = _ps.
charPos
;
6702
if (pos - _ps.
charPos
> 0)
6779
outStartPos = _ps.
charPos
;
6795
while (_ps.charsUsed - _ps.
charPos
< 8)
6802
if (!XmlConvert.StrEqual(_ps.chars, _ps.
charPos
, 7, "DOCTYPE"))
6806
if (!_xmlCharType.IsWhiteSpace(_ps.chars[_ps.
charPos
+ 7]))
6808
ThrowExpectingWhitespace(_ps.
charPos
+ 7);
6813
Throw(_ps.
charPos
- 2, ResXml.Xml_MultipleDTDsProvided); // position just before <!DOCTYPE
6817
Throw(_ps.
charPos
- 2, ResXml.Xml_DtdAfterRootElement);
6872
if (_ps.chars[_ps.
charPos
] == 'P')
6875
while (_ps.charsUsed - _ps.
charPos
< 6)
6883
if (!XmlConvert.StrEqual(_ps.chars, _ps.
charPos
, 6, "PUBLIC"))
6892
ThrowExpectingWhitespace(_ps.
charPos
);
6901
ThrowExpectingWhitespace(_ps.
charPos
);
6909
else if (_ps.chars[_ps.
charPos
] == 'S')
6912
while (_ps.charsUsed - _ps.
charPos
< 6)
6920
if (!XmlConvert.StrEqual(_ps.chars, _ps.
charPos
, 6, "SYSTEM"))
6929
ThrowExpectingWhitespace(_ps.
charPos
);
6937
else if (_ps.chars[_ps.
charPos
] != '[' && _ps.chars[_ps.
charPos
] != '>')
6943
if (_ps.chars[_ps.
charPos
] == '[')
6950
if (_ps.chars[_ps.
charPos
] != '>')
6955
else if (_ps.chars[_ps.
charPos
] == '>')
6969
char quoteChar = _ps.chars[_ps.
charPos
];
6987
int pos = _ps.
charPos
;
7162
if (_ps.charsUsed - _ps.
charPos
> 0)
7164
if (_ps.chars[_ps.
charPos
] != (char)0xD)
7177
pos = _ps.
charPos
;
7183
int pos = _ps.
charPos
;
7200
int tmp1 = pos - _ps.
charPos
;
7205
sb.Append(chars, _ps.
charPos
, tmp1);
7237
int tmp2 = pos - _ps.
charPos
;
7242
sb.Append(_ps.chars, _ps.
charPos
, tmp2);
7253
int tmp3 = pos - _ps.
charPos
;
7258
sb.Append(_ps.chars, _ps.
charPos
, tmp3);
7266
if (_ps.charsUsed - _ps.
charPos
== 0)
7270
if (_ps.chars[_ps.
charPos
] != (char)0xD)
7277
pos = _ps.
charPos
;
7308
switch (newPos = ParseNumericCharRefInline(_ps.
charPos
, expand, internalSubsetBuilder, out charCount, out entityType))
7316
Debug.Assert(_ps.chars[_ps.
charPos
] == '&');
7423
internalSubsetBuilder.Append(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
+ 1);
7454
internalSubsetBuilder.Append(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
+ 1);
7475
switch (newPos = ParseNamedCharRefInline(_ps.
charPos
, expand, internalSubsetBuilder))
7485
Debug.Assert(_ps.chars[_ps.
charPos
] == '&');
7620
internalSubsetBuilder.Append(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
);
7641
int pos = _ps.
charPos
+ startOffset;
7706
colonOffset = pos - _ps.
charPos
;
7712
colonOffset = pos - _ps.
charPos
;
7733
colonPos = (colonOffset == -1) ? -1 : _ps.
charPos
+ colonOffset;
7739
int offset = pos - _ps.
charPos
;
7741
pos = _ps.
charPos
+ offset;
7764
string entityName = _nameTable.Add(_ps.chars, _ps.
charPos
, endPos - _ps.
charPos
);
7817
string localName = _nameTable.Add(_ps.chars, _ps.
charPos
, endNamePos - _ps.
charPos
);
7823
int startPos = _ps.
charPos
;
8145
int initialPos = _ps.
charPos
;
8272
_incReadLeftStartPos = _ps.
charPos
;
8273
_incReadLeftEndPos = _ps.
charPos
;
8360
Debug.Assert(XmlConvert.StrEqual(_ps.chars, _ps.
charPos
- 2, 2, "?>"));
8368
Debug.Assert(XmlConvert.StrEqual(_ps.chars, _ps.
charPos
- 3, 3, "-->"));
8376
Debug.Assert(XmlConvert.StrEqual(_ps.chars, _ps.
charPos
- 3, 3, "]]>"));
8396
startPos = _ps.
charPos
;
8408
startPos = _ps.
charPos
;
8515
Debug.Assert(_ps.
charPos
- pos == 0);
8516
Debug.Assert(_ps.
charPos
- startPos == 0);
8521
if (XmlConvert.StrEqual(chars, _ps.
charPos
+ 2, endPos - _ps.
charPos
- 2, _curNode.GetNameWPrefix(_nameTable)) &&
8535
if (_ps.chars[_ps.
charPos
] != '>')
8547
startPos = _ps.
charPos
;
8555
Debug.Assert(_ps.
charPos
- pos == 0);
8556
Debug.Assert(_ps.
charPos
- startPos == 0);
8561
if (XmlConvert.StrEqual(_ps.chars, _ps.
charPos
+ 1, endPos - _ps.
charPos
- 1, _curNode.localName) &&
8570
startPos = _ps.
charPos
;
8683
ParseAttributeValueSlow(_ps.
charPos
, ' ', _curNode); // The quote char is intentionally empty (space) because we need to parse ' and " into the attribute value
8708
int pos = _ps.
charPos
;
8757
if (pos - _ps.
charPos
> 0)
8759
_stringBuilder.Append(chars, _ps.
charPos
, pos - _ps.
charPos
);
8770
if (_normalize && _xmlCharType.IsWhiteSpace(chars[_ps.
charPos
]) && pos - _ps.
charPos
== 1)
8772
chars[_ps.
charPos
] = (char)0x20; // CDATA normalization of character references in entities
8822
if (pos - _ps.
charPos
> 0)
8824
_stringBuilder.Append(chars, _ps.
charPos
, pos - _ps.
charPos
);
8848
pos = _ps.
charPos
;
8853
if (pos - _ps.
charPos
> 0)
8855
_stringBuilder.Append(chars, _ps.
charPos
, pos - _ps.
charPos
);
8916
if (_ps.
charPos
== _ps.charsUsed)
8920
if (_xmlCharType.IsNCNameSingleChar(_ps.chars[_ps.
charPos
]))
8922
int pos = _ps.
charPos
+ 1;
8927
return new string(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
);
8931
Debug.Assert(_ps.
charPos
< _ps.charsUsed);
8932
return new string(_ps.chars, _ps.
charPos
, 1);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImplHelpers.cs (1)
120
return
charPos
- lineStartPos;