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

◆ Depends() [2/2]

void System.Xml.Serialization.SchemaGraph.Depends ( XmlSchemaObject item,
ArrayList refs )
inlinepackage

Definition at line 67 of file SchemaGraph.cs.

68 {
69 if (item == null || _scope[item] != null)
70 {
71 return;
72 }
73 Type type = item.GetType();
74 if (typeof(XmlSchemaType).IsAssignableFrom(type))
75 {
76 XmlQualifiedName xmlQualifiedName = XmlQualifiedName.Empty;
81 {
83 if (xmlSchemaComplexType.ContentModel != null)
84 {
85 XmlSchemaContent content = xmlSchemaComplexType.ContentModel.Content;
87 {
90 }
92 {
94 if (xmlSchemaSimpleContentRestriction.BaseType != null)
95 {
97 }
98 else
99 {
101 }
103 }
104 else if (content is XmlSchemaComplexContentExtension)
105 {
110 }
111 else if (content is XmlSchemaSimpleContentExtension)
112 {
116 }
117 }
118 else
119 {
122 }
124 {
127 }
129 {
131 }
132 }
133 else if (item is XmlSchemaSimpleType)
134 {
138 {
141 }
143 {
145 if (xmlSchemaSimpleTypeList.ItemTypeName != null && !xmlSchemaSimpleTypeList.ItemTypeName.IsEmpty)
146 {
148 }
149 if (xmlSchemaSimpleTypeList.ItemType != null)
150 {
152 }
153 }
155 {
156 XmlQualifiedName[] memberTypes = ((XmlSchemaSimpleTypeUnion)item).MemberTypes;
157 if (memberTypes != null)
158 {
159 for (int i = 0; i < memberTypes.Length; i++)
160 {
162 AddRef(refs, o);
163 }
164 }
165 }
166 }
167 if (xmlSchemaType == null && !xmlQualifiedName.IsEmpty && xmlQualifiedName.Namespace != "http://www.w3.org/2001/XMLSchema")
168 {
170 }
171 if (xmlSchemaType != null)
172 {
174 }
175 if (xmlSchemaParticle != null)
176 {
178 }
179 if (xmlSchemaObjectCollection != null)
180 {
181 for (int j = 0; j < xmlSchemaObjectCollection.Count; j++)
182 {
184 }
185 }
186 }
187 else if (type == typeof(XmlSchemaElement))
188 {
190 if (!xmlSchemaElement.SubstitutionGroup.IsEmpty && xmlSchemaElement.SubstitutionGroup.Namespace != "http://www.w3.org/2001/XMLSchema")
191 {
193 AddRef(refs, o2);
194 }
195 if (!xmlSchemaElement.RefName.IsEmpty)
196 {
199 }
200 else if (!xmlSchemaElement.SchemaTypeName.IsEmpty)
201 {
203 AddRef(refs, o3);
204 }
205 else
206 {
207 Depends(xmlSchemaElement.SchemaType, refs);
208 }
209 }
210 else if (type == typeof(XmlSchemaGroup))
211 {
212 Depends(((XmlSchemaGroup)item).Particle);
213 }
214 else if (type == typeof(XmlSchemaGroupRef))
215 {
217 AddRef(refs, o4);
218 }
219 else if (typeof(XmlSchemaGroupBase).IsAssignableFrom(type))
220 {
221 foreach (XmlSchemaObject item2 in ((XmlSchemaGroupBase)item).Items)
222 {
224 }
225 }
227 {
229 AddRef(refs, o5);
230 }
232 {
233 foreach (XmlSchemaObject attribute in ((XmlSchemaAttributeGroup)item).Attributes)
234 {
236 }
237 }
238 else if (type == typeof(XmlSchemaAttribute))
239 {
241 if (!xmlSchemaAttribute.RefName.IsEmpty)
242 {
245 }
246 else if (!xmlSchemaAttribute.SchemaTypeName.IsEmpty)
247 {
249 AddRef(refs, o6);
250 }
251 else
252 {
253 Depends(xmlSchemaAttribute.SchemaType, refs);
254 }
255 }
256 if (!typeof(XmlSchemaAnnotated).IsAssignableFrom(type))
257 {
258 return;
259 }
260 XmlAttribute[] unhandledAttributes = ((XmlSchemaAnnotated)item).UnhandledAttributes;
261 if (unhandledAttributes == null)
262 {
263 return;
264 }
265 foreach (XmlAttribute xmlAttribute in unhandledAttributes)
266 {
267 if (xmlAttribute.LocalName == "arrayType" && xmlAttribute.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")
268 {
269 string dims;
270 XmlQualifiedName name = TypeScope.ParseWsdlArrayType(xmlAttribute.Value, out dims, item);
272 AddRef(refs, o7);
273 }
274 }
275 }
ArrayList Depends(XmlSchemaObject item)
void AddRef(ArrayList list, XmlSchemaObject o)
object? Find(XmlQualifiedName name, Type type)

References System.Xml.Serialization.SchemaGraph._schemas, System.Xml.Serialization.SchemaGraph._scope, System.Xml.Serialization.SchemaGraph.AddRef(), System.Xml.Serialization.SchemaGraph.Depends(), System.Xml.Dictionary, System.Xml.XmlQualifiedName.Empty, System.Xml.Serialization.XmlSchemas.Find(), System.Type.GetType(), System.item, System.Xml.Schema.XmlSchemaSimpleTypeList.ItemTypeName, System.Xml.Serialization.TypeScope.ParseWsdlArrayType(), System.Xml.Schema.XmlSchemaGroupRef.Particle, and System.type.