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

◆ Bind()

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

Definition at line 23 of file LookupNode.cs.

24 {
26 _column = null;
27 _relation = null;
28 if (table == null)
29 {
30 throw ExprException.ExpressionUnbound(ToString());
31 }
32 DataRelationCollection parentRelations = table.ParentRelations;
33 if (_relationName == null)
34 {
35 if (parentRelations.Count > 1)
36 {
37 throw ExprException.UnresolvedRelation(table.TableName, ToString());
38 }
40 }
41 else
42 {
44 }
45 if (_relation == null)
46 {
47 throw ExprException.BindFailure(_relationName);
48 }
51 if (_column == null)
52 {
53 throw ExprException.UnboundName(_columnName);
54 }
55 int i;
56 for (i = 0; i < list.Count; i++)
57 {
58 DataColumn dataColumn = list[i];
59 if (_column == dataColumn)
60 {
61 break;
62 }
63 }
64 if (i >= list.Count)
65 {
67 }
68 AggregateNode.Bind(_relation, list);
69 }
void Add(TKey key, TValue value)
virtual DataTable ParentTable
DataRelationCollection ParentRelations
Definition DataTable.cs:572
void BindTable(DataTable table)
readonly string _relationName
Definition LookupNode.cs:8
readonly string _columnName
Definition LookupNode.cs:10
DataRelation _relation
Definition LookupNode.cs:14

References System.Data.LookupNode._column, System.Data.LookupNode._columnName, System.Data.LookupNode._relation, System.Data.LookupNode._relationName, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Data.AggregateNode.Bind(), System.Data.ExprException.BindFailure(), System.Data.ExpressionNode.BindTable(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Data.ExprException.ExpressionUnbound(), System.list, System.Data.DataTable.ParentRelations, System.Data.DataRelation.ParentTable, System.Data.ExpressionNode.table, System.Data.DataTable.TableName, System.ToString, System.Data.ExprException.UnboundName(), and System.Data.ExprException.UnresolvedRelation().