Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Validate()

void System.Xml.Schema.XNodeValidator.Validate ( XObject source,
XmlSchemaObject partialValidationType,
bool addSchemaInfo )
inline

Definition at line 38 of file XNodeValidator.cs.

39 {
42 XmlSchemaValidationFlags xmlSchemaValidationFlags = XmlSchemaValidationFlags.AllowXmlAttributes;
43 XmlNodeType nodeType = source.NodeType;
44 if (nodeType != XmlNodeType.Element)
45 {
46 if (nodeType != XmlNodeType.Attribute)
47 {
48 if (nodeType != XmlNodeType.Document)
49 {
50 goto IL_0066;
51 }
52 source = ((XDocument)source).Root;
53 if (source == null)
54 {
56 }
57 xmlSchemaValidationFlags |= XmlSchemaValidationFlags.ProcessIdentityConstraints;
58 }
59 else
60 {
61 if (((XAttribute)source).IsNamespaceDeclaration)
62 {
63 goto IL_0066;
64 }
65 if (source.Parent == null)
66 {
68 }
69 }
70 }
71 namespaceManager = new XmlNamespaceManager(schemas.NameTable);
76 if (partialValidationType != null)
77 {
79 }
80 else
81 {
83 }
84 IXmlLineInfo originalLineInfo = SaveLineInfo(source);
85 if (nodeType == XmlNodeType.Attribute)
86 {
88 }
89 else
90 {
92 }
95 return;
96 IL_0066:
98 }
static string InvalidOperation_MissingParent
Definition SR.cs:54
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string InvalidOperation_MissingRoot
Definition SR.cs:56
static string InvalidOperation_BadNodeType
Definition SR.cs:70
Definition SR.cs:7
XmlNodeType NodeType
Definition XObject.cs:51
XmlNamespaceManager namespaceManager
void RestoreLineInfo(IXmlLineInfo originalLineInfo)
readonly XmlSchemaSet schemas
IXmlLineInfo SaveLineInfo(XObject source)
void ValidationCallback(object sender, ValidationEventArgs e)

References System.Xml.Schema.XNodeValidator.addSchemaInfo, System.Xml.Dictionary, System.Xml.Schema.XmlSchemaValidator.EndValidation(), System.SR.Format(), System.Xml.Schema.XmlSchemaValidator.Initialize(), System.SR.InvalidOperation_BadNodeType, System.SR.InvalidOperation_MissingParent, System.SR.InvalidOperation_MissingRoot, System.Xml.Schema.XNodeValidator.namespaceManager, System.Xml.Schema.XmlSchemaSet.NameTable, System.Xml.Linq.XObject.NodeType, System.Xml.Linq.XObject.Parent, System.Xml.Schema.XNodeValidator.PushAncestorsAndSelf(), System.Xml.Schema.XNodeValidator.RestoreLineInfo(), System.Xml.Schema.XNodeValidator.SaveLineInfo(), System.Xml.Schema.XNodeValidator.schemas, System.Xml.Schema.XNodeValidator.source, System.Xml.Schema.XNodeValidator.ValidateAttribute(), System.Xml.Schema.XNodeValidator.ValidateElement(), System.Xml.Schema.XNodeValidator.ValidationCallback(), and System.Xml.Schema.XNodeValidator.validator.

Referenced by System.Xml.Schema.Extensions.Validate(), System.Xml.Schema.Extensions.Validate(), and System.Xml.Schema.Extensions.Validate().