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

◆ HandleParticle()

void System.Data.XSDSchema.HandleParticle ( XmlSchemaParticle pt,
DataTable table,
ArrayList tableChildren,
bool isBase )
inlinepackage

Definition at line 831 of file XSDSchema.cs.

832 {
834 if (particleItems == null)
835 {
836 return;
837 }
839 {
841 {
842 if (FromInference && pt is XmlSchemaChoice && pt.MaxOccurs > 1m && xmlSchemaElement.SchemaType is XmlSchemaComplexType)
843 {
844 xmlSchemaElement.MaxOccurs = pt.MaxOccurs;
845 }
846 DataTable dataTable = null;
847 if ((xmlSchemaElement.Name == null && xmlSchemaElement.RefName.Name == table.EncodedTableName && xmlSchemaElement.RefName.Namespace == table.Namespace) || (IsTable(xmlSchemaElement) && xmlSchemaElement.Name == table.TableName))
848 {
850 }
851 else
852 {
854 if (dataTable == null && FromInference && xmlSchemaElement.Name == table.TableName)
855 {
856 dataTable = table;
857 }
858 }
859 if (dataTable == null)
860 {
861 if (!FromInference || xmlSchemaElement.Name != table.TableName)
862 {
864 }
865 continue;
866 }
867 DataRelation dataRelation = null;
868 if (xmlSchemaElement.Annotation != null)
869 {
871 }
872 DataRelationCollection childRelations = table.ChildRelations;
873 for (int i = 0; i < childRelations.Count; i++)
874 {
875 if (childRelations[i].Nested && dataTable == childRelations[i].ChildTable)
876 {
878 }
879 }
880 if (dataRelation != null)
881 {
882 continue;
883 }
885 if (!FromInference || table.UKColumnPositionForInference != -1)
886 {
887 continue;
888 }
889 int num = -1;
890 foreach (DataColumn column in table.Columns)
891 {
892 if (column.ColumnMapping == MappingType.Element)
893 {
894 num++;
895 }
896 }
898 }
899 else
900 {
902 }
903 }
904 }
void Add(TKey key, TValue value)
bool IsTable(XmlSchemaElement node)
void HandleElementColumn(XmlSchemaElement elem, DataTable table, bool isBase)
DataTable HandleTable(XmlSchemaElement node)
XmlSchemaObjectCollection GetParticleItems(XmlSchemaParticle pt)
Definition XSDSchema.cs:799
void HandleParticle(XmlSchemaParticle pt, DataTable table, ArrayList tableChildren, bool isBase)
Definition XSDSchema.cs:831
void HandleRelations(XmlSchemaAnnotation ann, bool fNested)
Definition XSDSchema.cs:780

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Data.DataTable.ChildRelations, System.Data.DataTable.Columns, System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Dictionary, System.Data.DataTable.EncodedTableName, System.Data.XSDSchema.FromInference, System.Data.XSDSchema.GetParticleItems(), System.Data.XSDSchema.HandleElementColumn(), System.Data.XSDSchema.HandleParticle(), System.Data.XSDSchema.HandleRelations(), System.Data.XSDSchema.HandleTable(), System.Data.XSDSchema.IsTable(), System.item, System.Data.DataTable.Namespace, System.Data.DataTable.TableName, and System.Data.DataTable.UKColumnPositionForInference.

Referenced by System.Data.XSDSchema.HandleComplexType(), and System.Data.XSDSchema.HandleParticle().