2 writes to reader
dotnet-svcutil-lib (2)
FrameworkFork\Microsoft.Xml\Xml\schema\basevalidator.cs (2)
36
reader
= other.reader;
50
this.
reader
= reader;
171 references to reader
dotnet-svcutil-lib (171)
FrameworkFork\Microsoft.Xml\Xml\schema\autovalidator.cs (21)
36
reader
.Validator = new XdrValidator(this);
37
reader
.Validator.Validate();
41
reader
.Validator = new XsdValidator(this);
42
reader
.Validator.Validate();
60
if (
reader
.Schemas != null &&
reader
.Schemas.Count > 0)
62
XmlSchemaCollectionEnumerator enumerator =
reader
.Schemas.GetEnumerator();
74
if (
reader
.NodeType == XmlNodeType.Element)
76
SchemaType schemaType = SchemaNames.SchemaTypeFromRoot(
reader
.LocalName,
reader
.NamespaceURI);
87
int count =
reader
.AttributeCount;
90
reader
.MoveToAttribute(i);
91
string objectNs =
reader
.NamespaceURI;
92
string objectName =
reader
.LocalName;
95
if (XdrBuilder.IsXdrSchema(
reader
.Value))
97
reader
.MoveToElement();
103
reader
.MoveToElement();
108
reader
.SchemaTypeObject = XmlSchemaDatatype.FromXdrName(
reader
.Value);
109
reader
.MoveToElement();
115
reader
.MoveToElement();
FrameworkFork\Microsoft.Xml\Xml\schema\basevalidator.cs (9)
36
reader = other.
reader
;
60
get { return
reader
; }
195
SaveTextValue(
reader
.Value);
215
SaveTextValue(
reader
.Value);
244
SendValidationEvent(new XmlSchemaException(code, args,
reader
.BaseURI, _positionInfo.LineNumber, _positionInfo.LinePosition));
249
SendValidationEvent(new XmlSchemaException(code, arg,
reader
.BaseURI, _positionInfo.LineNumber, _positionInfo.LinePosition));
254
SendValidationEvent(new XmlSchemaException(code, new string[] { arg1, arg2 },
reader
.BaseURI, _positionInfo.LineNumber, _positionInfo.LinePosition));
264
SendValidationEvent(new XmlSchemaException(code, msg,
reader
.BaseURI, _positionInfo.LineNumber, _positionInfo.LinePosition), severity);
269
SendValidationEvent(new XmlSchemaException(code, args,
reader
.BaseURI, _positionInfo.LineNumber, _positionInfo.LinePosition), severity);
FrameworkFork\Microsoft.Xml\Xml\schema\dtdvalidator.cs (25)
43
Debug.Assert(
reader
!= null);
57
switch (
reader
.NodeType)
61
if (
reader
.IsEmptyElement)
83
if (!GenEntity(new XmlQualifiedName(
reader
.LocalName,
reader
.Prefix)))
95
if (
reader
.Depth == 0 &&
96
reader
.NodeType == XmlNodeType.Element)
105
if (
reader
.StandAlone && // VC 1 - iv
130
elementName.Init(
reader
.LocalName,
reader
.Prefix);
131
if ((
reader
.Depth == 0) &&
146
Debug.Assert(
reader
.NodeType == XmlNodeType.Element);
153
XmlSchemaValidator.ElementValidationError(elementName, context, EventHandler,
reader
,
reader
.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null);
181
reader
.SchemaTypeObject = null;
182
SchemaAttDef attnDef = context.ElementDecl.GetAttDef(new XmlQualifiedName(
reader
.LocalName,
reader
.Prefix));
191
if (attnDef.Datatype != null && !
reader
.IsDefault)
199
SendValidationEvent(ResXml.Sch_UndeclaredAttribute,
reader
.Name);
275
XmlSchemaValidator.CompleteValidationError(context, EventHandler,
reader
,
reader
.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null);
341
reader
.TypedValueObject = null;
355
reader
.TypedValueObject = typedValue;
455
if (
reader
.StandAlone && en.DeclaredInExternal)
491
SendValidationEvent(new XmlSchemaException(ResXml.Sch_UndeclaredId, next.Id,
reader
.BaseURI, next.LineNo, next.LinePos));
FrameworkFork\Microsoft.Xml\Xml\schema\xdrvalidator.cs (44)
44
_nsManager =
reader
.NamespaceManager;
67
switch (
reader
.NodeType)
71
if (
reader
.IsEmptyElement)
93
elementName.Init(
reader
.LocalName, XmlSchemaDatatype.XdrCanonizeUri(
reader
.NamespaceURI, NameTable, SchemaNames));
95
if (SchemaNames.IsXDRRoot(elementName.Name, elementName.Namespace) &&
reader
.Depth > 0)
98
_inlineSchemaParser.StartParsing(
reader
, null);
115
XmlSchemaValidator.ElementValidationError(elementName, context, EventHandler,
reader
,
reader
.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null);
176
XmlSchemaValidator.CompleteValidationError(context, EventHandler,
reader
,
reader
.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null);
197
if (
reader
.Depth == 0)
201
if (
reader
.MoveToFirstAttribute())
205
string objectNs =
reader
.NamespaceURI;
206
string objectName =
reader
.LocalName;
209
LoadSchema(
reader
.Value);
212
_nsManager.AddNamespace(
reader
.Prefix.Length == 0 ? string.Empty :
reader
.LocalName,
reader
.Value);
220
reader
.SchemaTypeObject = XmlSchemaDatatype.FromXdrName(
reader
.Value);
222
} while (
reader
.MoveToNextAttribute());
223
reader
.MoveToElement();
242
reader
.SchemaTypeObject = context.ElementDecl.SchemaType;
246
reader
.SchemaTypeObject = context.ElementDecl.Datatype;
248
if (
reader
.IsEmptyElement && !context.IsNill && context.ElementDecl.DefaultValueTyped != null)
250
reader
.TypedValueObject = context.ElementDecl.DefaultValueTyped;
259
if (
reader
.MoveToFirstAttribute())
263
if ((object)
reader
.NamespaceURI == (object)SchemaNames.NsXmlNs)
270
reader
.SchemaTypeObject = null;
271
SchemaAttDef attnDef = schemaInfo.GetAttributeXdr(context.ElementDecl, QualifiedName(
reader
.LocalName,
reader
.NamespaceURI));
278
reader
.SchemaTypeObject = (attnDef.SchemaType != null) ? (object)attnDef.SchemaType : (object)attnDef.Datatype;
281
string attributeValue =
reader
.Value;
290
e.SetSource(
reader
.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition);
293
} while (
reader
.MoveToNextAttribute());
294
reader
.MoveToElement();
304
reader
.AddDefaultAttribute((SchemaAttDef)context.ElementDecl.DefaultAttDefs[i]);
311
context.ElementDecl.CheckAttributes(_attPresence,
reader
.StandAlone);
315
e.SetSource(
reader
.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition);
434
ProcessEntity(schemaInfo, name, this, EventHandler,
reader
.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition);
462
reader
.TypedValueObject = null;
481
reader
.TypedValueObject = typedValue;
685
SendValidationEvent(new XmlSchemaException(ResXml.Sch_UndeclaredId, next.Id,
reader
.BaseURI, next.LineNo, next.LinePos));
FrameworkFork\Microsoft.Xml\Xml\schema\xsdvalidator.cs (72)
62
_nsManager =
reader
.NamespaceManager;
95
switch (
reader
.NodeType)
99
if (
reader
.IsEmptyElement)
176
elementName.Init(
reader
.LocalName,
reader
.NamespaceURI);
178
if (IsXSDRoot(elementName.Name, elementName.Namespace) &&
reader
.Depth > 0)
181
_inlineSchemaParser.StartParsing(
reader
, null);
209
XmlSchemaValidator.ElementValidationError(elementName, context, EventHandler,
reader
,
reader
.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null);
267
if (
reader
.Depth == 0)
279
if (
reader
.MoveToFirstAttribute())
283
string objectNs =
reader
.NamespaceURI;
284
string objectName =
reader
.LocalName;
287
LoadSchema(
reader
.Value, null);
290
_nsManager.AddNamespace(
reader
.Prefix.Length == 0 ? string.Empty :
reader
.LocalName,
reader
.Value);
297
xsiSchemaLocation = (string[])s_dtStringArray.ParseValue(
reader
.Value, NameTable, _nsManager);
301
xsiNoNamespaceSchemaLocation =
reader
.Value;
305
xsiType = (XmlQualifiedName)s_dtQName.ParseValue(
reader
.Value, NameTable, _nsManager);
309
xsiNil =
reader
.Value;
312
} while (
reader
.MoveToNextAttribute());
313
reader
.MoveToElement();
342
XmlSchemaValidator.CompleteValidationError(context, EventHandler,
reader
,
reader
.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null);
459
reader
.SchemaTypeObject = context.ElementDecl.SchemaType;
461
if (
reader
.IsEmptyElement && !context.IsNill && context.ElementDecl.DefaultValueTyped != null)
463
reader
.TypedValueObject = UnWrapUnion(context.ElementDecl.DefaultValueTyped);
468
reader
.TypedValueObject = null; //Typed value cleanup
476
if (
reader
.MoveToFirstAttribute())
480
if ((object)
reader
.NamespaceURI == (object)_nsXmlNs)
484
if ((object)
reader
.NamespaceURI == (object)_nsXsi)
491
reader
.SchemaTypeObject = null;
492
XmlQualifiedName attQName = new XmlQualifiedName(
reader
.LocalName,
reader
.NamespaceURI);
503
reader
.SchemaTypeObject = attnDef.SchemaType;
508
CheckValue(
reader
.Value, attnDef);
512
AttributeIdentityConstraints(
reader
.LocalName,
reader
.NamespaceURI,
reader
.TypedValueObject,
reader
.Value, attnDef);
533
e.SetSource(
reader
.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition);
536
} while (
reader
.MoveToNextAttribute());
537
reader
.MoveToElement();
548
reader
.AddDefaultAttribute(attdef);
561
context.ElementDecl.CheckAttributes(_attPresence,
reader
.StandAlone);
565
e.SetSource(
reader
.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition);
695
ProcessEntity(schemaInfo, name, this, EventHandler,
reader
.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition);
709
reader
.TypedValueObject = null;
753
reader
.TypedValueObject = typedValue;
833
SendValidationEvent(new XmlSchemaException(ResXml.Sch_UndeclaredId, next.Id,
reader
.BaseURI, next.LineNo, next.LinePos));
941
if (constraints[j].axisSelector.MoveToStartElement(
reader
.LocalName,
reader
.NamespaceURI))
945
Debug.WriteLine("Name: " +
reader
.LocalName + "\t|\tURI: " +
reader
.NamespaceURI + "\n");
956
if (laxis.MoveToStartElement(
reader
.LocalName,
reader
.NamespaceURI))
964
SendValidationEvent(ResXml.Sch_FieldSimpleTypeExpected,
reader
.LocalName);
1058
Debug.WriteLine("Name: " +
reader
.LocalName + "\t|\tURI: " +
reader
.NamespaceURI + "\t|\tValue: " +
reader
.TypedValueObject + "\n");
1065
SendValidationEvent(ResXml.Sch_FieldSingleValueExpected,
reader
.LocalName);
1071
if (
reader
.TypedValueObject != null && stringValue.Length != 0)
1073
laxis.Ks[laxis.Column] = new TypedObject(
reader
.TypedValueObject, stringValue, context.ElementDecl.Datatype);
1078
laxis.EndElement(
reader
.LocalName,
reader
.NamespaceURI);
1081
if (constraints[i].axisSelector.EndElement(
reader
.LocalName,
reader
.NamespaceURI))
1093
SendValidationEvent(new XmlSchemaException(ResXml.Sch_MissingKey, constraints[i].constraint.name.ToString(),
reader
.BaseURI, ks.PosLine, ks.PosCol));
1102
reader
.BaseURI, ks.PosLine, ks.PosCol));
1119
reader
.BaseURI, ks.PosLine, ks.PosCol));
1161
reader
.BaseURI, ks.PosLine, ks.PosCol));