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

◆ Bind() [2/2]

override void System.Data.AggregateNode.Bind ( DataTable table,
List< DataColumn > list )
inlinepackage

Definition at line 64 of file AggregateNode.cs.

65 {
67 if (table == null)
68 {
69 throw ExprException.AggregateUnbound(ToString());
70 }
71 if (_local)
72 {
73 _relation = null;
74 }
75 else
76 {
77 DataRelationCollection childRelations = table.ChildRelations;
78 if (_relationName == null)
79 {
80 if (childRelations.Count > 1)
81 {
82 throw ExprException.UnresolvedRelation(table.TableName, ToString());
83 }
84 if (childRelations.Count != 1)
85 {
86 throw ExprException.AggregateUnbound(ToString());
87 }
89 }
90 else
91 {
93 }
94 }
95 _childTable = ((_relation == null) ? table : _relation.ChildTable);
97 if (_column == null)
98 {
99 throw ExprException.UnboundName(_columnName);
100 }
101 int i;
102 for (i = 0; i < list.Count; i++)
103 {
104 DataColumn dataColumn = list[i];
105 if (_column == dataColumn)
106 {
107 break;
108 }
109 }
110 if (i >= list.Count)
111 {
113 }
115 }
void Add(TKey key, TValue value)
readonly string _relationName
readonly string _columnName
override void Bind(DataTable table, List< DataColumn > list)
DataColumnCollection Columns
Definition DataTable.cs:327
DataRelationCollection ChildRelations
Definition DataTable.cs:324
void BindTable(DataTable table)

References System.Data.AggregateNode._childTable, System.Data.AggregateNode._column, System.Data.AggregateNode._columnName, System.Data.AggregateNode._local, System.Data.AggregateNode._relation, System.Data.AggregateNode._relationName, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Data.ExprException.AggregateUnbound(), System.Data.AggregateNode.Bind(), System.Data.ExpressionNode.BindTable(), System.Data.DataTable.ChildRelations, System.Data.DataRelation.ChildTable, System.Data.DataTable.Columns, System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.list, System.Data.ExpressionNode.table, System.Data.DataTable.TableName, System.ToString, System.Data.ExprException.UnboundName(), and System.Data.ExprException.UnresolvedRelation().

Referenced by System.Data.AggregateNode.Bind(), and System.Data.LookupNode.Bind().