fx\src\data\System\Data\CodeGen\datacache.cs (117)
339constructor.Statements.Add(MethodCall(This(), "InitClass"));
350constructor.Statements.Add(MethodCall(This(), "InitVars"));
371Assign(Property(This(),"CaseSensitive"),Property(Argument("table"),"CaseSensitive"))
376Assign(Property(This(),"Locale"),Property(Argument("table"),"Locale"))
381Assign(Property(This(),"Namespace"),Property(Argument("table"),"Namespace"))
384constructor.Statements.Add(Assign(Property(This(), "Prefix"), Property(Argument("table"),"Prefix")));
385constructor.Statements.Add(Assign(Property(This(), "MinimumCapacity"), Property(Argument("table"),"MinimumCapacity")));
386constructor.Statements.Add(Assign(Property(This(), "DisplayExpression"), Property(Argument("table"),"DisplayExpression")));
395countProp.GetStatements.Add(Return(Property(Property(This(), "Rows"), "Count")));
405colProp.GetStatements.Add(Return(Field(This(), TableColumnFieldName(column))));
415thisIndex.GetStatements.Add(Return(Cast(stRowConcreateClassName, Indexer(Property(This(), "Rows"), Argument("index")))));
424addMethod.Statements.Add(MethodCall(Property(This(), "Rows"), "Add", Argument("row")));
457addByColName.Statements.Add(VariableDecl(stRowConcreateClassName, "row" + stRowClassName, Cast(stRowConcreateClassName, MethodCall(This(), "NewRow"))));
488addByColName.Statements.Add(MethodCall(Property(This(), "Rows"), "Add", varRow));
528findBy.Statements.Add(Return(Cast(stRowClassName, MethodCall(Property(This(), "Rows"), "Find", arrayCreate))));
538getEnumerator.Statements.Add(Return(MethodCall(Property(This(), "Rows"), "GetEnumerator")));
572CodeExpression codeField = Field(This(), ColumnName);
591tableInitClass.Statements.Add(MethodCall(Property(This(), "Columns"), "Add", Field(This(), ColumnName)));
603createArgs[j] = Field(This(), TableColumnFieldName(columns[j]));
606tableInitClass.Statements.Add(MethodCall(Property(This(), "Constraints"), "Add",
621CodeExpression codeField = Field(This(), ColumnName);
624tableInitVars.Statements.Add(Assign(codeField, Indexer(Property(This(),"Columns"),Str(column.ColumnName))));
675tableInitClass.Statements.Add(Assign(Property(This(), "CaseSensitive"), Primitive(table.CaseSensitive)));
679tableInitClass.Statements.Add(Assign(Property(This(), "Locale"), New(typeof(System.Globalization.CultureInfo),new CodeExpression[] {Str(table.Locale.ToString())})));
683tableInitClass.Statements.Add(Assign(Property(This(), "Prefix"), Str(table.Prefix)));
687tableInitClass.Statements.Add(Assign(Property(This(), "Namespace"), Str(table.Namespace)));
692tableInitClass.Statements.Add(Assign(Property(This(), "MinimumCapacity"), Primitive(table.MinimumCapacity)));
696tableInitClass.Statements.Add(Assign(Property(This(), "DisplayExpression"), Str(table.DisplayExpressionInternal)));
707newTableRow.Statements.Add(Return(Cast(stRowConcreateClassName, MethodCall(This(), "NewRow"))));
738removeMethod.Statements.Add(MethodCall(Property(This(), "Rows"), "Remove", Argument("row")));
770constructor.Statements.Add(Assign(Field(This(), stTblFieldName), Cast(stTblClassName, Property(This(),"Table"))));
810CodeStatement getStmnt = Return(Cast(GetTypeName(DataType), Indexer(This(), Property(Field(This(), stTblFieldName), tableColumnName))));
878getStmnt = If(MethodCall(This(), "Is" + rowColumnName + "Null"),
892rowProp.SetStatements.Add(Assign(Indexer(This(), Property(Field(This(), stTblFieldName), tableColumnName)), Value()));
901isNull.Statements.Add(Return(MethodCall(This(), "IsNull", Property(Field(This(), stTblFieldName), tableColumnName))));
909setNull.Statements.Add(Assign(Indexer(This(), Property(Field(This(), stTblFieldName), tableColumnName)), Field(TypeExpr(typeof(Convert)), "DBNull")));
925childArray.Statements.Add(Return(Cast(Type(rowConcreateClassName, 1), MethodCall(This(), "GetChildRows", Indexer(Property(Property(This(), "Table"), "ChildRelations"), Str(relation.RelationName))))));
944anotherProp.GetStatements.Add(Return(Cast(ParentTypedRowName, MethodCall(This(), "GetParentRow", Indexer(Property(Property(This(), "Table"), "ParentRelations"), Str(relation.RelationName))))));
945anotherProp.SetStatements.Add(MethodCall(This(), "SetParentRow", new CodeExpression[] {Value(), Indexer(Property(Property(This(), "Table"), "ParentRelations"), Str(relation.RelationName))}));
976constructor.Statements.Add(Assign(Field(This(), "eventRow" ), Argument("row" )));
977constructor.Statements.Add(Assign(Field(This(), "eventAction"), Argument("action")));
985rowProp.GetStatements.Add(Return(Field(This(), "eventRow")));
993rowProp.GetStatements.Add(Return(Field(This(), "eventAction")));
1032constructor.Statements.Add(MethodCall(This(), "BeginInit"));
1033constructor.Statements.Add(MethodCall(This(), "InitClass"));
1035new CodeDelegateCreateExpression(Type(typeof(CollectionChangeEventHandler)),This(),"SchemaChanged")));
1036constructor.Statements.Add(new System.CodeDom.CodeAttachEventStatement(new CodeEventReferenceExpression(Property(This(),"Tables"),"CollectionChanged"),Variable("schemaChangedHandler")));
1037constructor.Statements.Add(new System.CodeDom.CodeAttachEventStatement(new CodeEventReferenceExpression(Property(This(),"Relations"),"CollectionChanged"),Variable("schemaChangedHandler")));
1038constructor.Statements.Add(MethodCall(This(), "EndInit"));
1050If(EQ(MethodCall(This(), "IsBinarySerialized", new CodeExpression[] {Argument("info"), Argument("context")}), Primitive(true)) ,
1052Stm(MethodCall(This(),"InitVars", Primitive(false))),
1054new CodeDelegateCreateExpression(Type(typeof(CollectionChangeEventHandler)),This(),"SchemaChanged")) ,
1055new System.CodeDom.CodeAttachEventStatement(new CodeEventReferenceExpression(Property(This(),"Tables"),"CollectionChanged"),Variable("schemaChangedHandler1")) ,
1056new System.CodeDom.CodeAttachEventStatement(new CodeEventReferenceExpression(Property(This(),"Relations"),"CollectionChanged"),Variable("schemaChangedHandler1")),
1072Stm(MethodCall(Property(This(), "Tables"), "Add", New(TableClassName(dataSet.Tables[i]), new CodeExpression[] {Indexer(Property(Variable("ds"),"Tables"),Str(dataSet.Tables[i].TableName))})))
1076schemaBody.Add(Assign(Property(This(), "DataSetName"), Property(Variable("ds"),"DataSetName")));
1077schemaBody.Add(Assign(Property(This(), "Prefix"), Property(Variable("ds"),"Prefix")));
1078schemaBody.Add(Assign(Property(This(), "Namespace"), Property(Variable("ds"),"Namespace")));
1079schemaBody.Add(Assign(Property(This(), "Locale"), Property(Variable("ds"),"Locale")));
1080schemaBody.Add(Assign(Property(This(), "CaseSensitive"), Property(Variable("ds"),"CaseSensitive")));
1081schemaBody.Add(Assign(Property(This(), "EnforceConstraints"), Property(Variable("ds"),"EnforceConstraints")));
1082schemaBody.Add(Stm(MethodCall(This(),"Merge",new CodeExpression[] {Variable("ds"),Primitive(false),Field(TypeExpr(typeof(MissingSchemaAction)),"Add")})));
1083schemaBody.Add(Stm(MethodCall(This(),"InitVars")));
1090Stm(MethodCall(This(), "BeginInit")),
1091Stm(MethodCall(This(), "InitClass")),
1092Stm(MethodCall(This(), "EndInit"))
1097constructor.Statements.Add(MethodCall(This(), "GetSerializationData", new CodeExpression [] { Argument("info"), Argument("context") }));
1099new CodeDelegateCreateExpression(Type(typeof(CollectionChangeEventHandler)),This(),"SchemaChanged")));
1100constructor.Statements.Add(new System.CodeDom.CodeAttachEventStatement(new CodeEventReferenceExpression(Property(This(),"Tables"),"CollectionChanged"),Variable("schemaChangedHandler")));
1101constructor.Statements.Add(new System.CodeDom.CodeAttachEventStatement(new CodeEventReferenceExpression(Property(This(),"Relations"),"CollectionChanged"),Variable("schemaChangedHandler")));
1119initDataSetVarsMethod.Statements.Add(MethodCall(This(), "InitVars", new CodeExpression [] {Primitive(true)}));
1131initClassMethod.Statements.Add(Assign(Property(This(), "DataSetName"), Str(dataSet.DataSetName)));
1133initClassMethod.Statements.Add(Assign(Property(This(), "Prefix"), Str(dataSet.Prefix)));
1135initClassMethod.Statements.Add(Assign(Property(This(), "Namespace"), Str(dataSet.Namespace)));
1137initClassMethod.Statements.Add(Assign(Property(This(), "Locale"), New(typeof(System.Globalization.CultureInfo),new CodeExpression[] {Str(dataSet.Locale.ToString())})));
1139initClassMethod.Statements.Add(Assign(Property(This(), "CaseSensitive"), Primitive(dataSet.CaseSensitive)));
1141initClassMethod.Statements.Add(Assign(Property(This(), "EnforceConstraints"), Primitive(dataSet.EnforceConstraints)));
1144CodeExpression fieldTable = Field(This(), TableFieldName(dataSet.Tables[i]));
1148initClassMethod.Statements.Add(MethodCall(Property(This(), "Tables"), "Add", fieldTable));
1153initVarsMethod.Statements.Add(Assign(fieldTable, Cast(TableClassName(dataSet.Tables[i]), Indexer(Property(This(),"Tables"),Str(dataSet.Tables[i].TableName)))));
1223readXmlSerializable.Statements.Add(MethodCall(This(), "Reset", new CodeExpression [] {}));
1231Stm(MethodCall(Property(This(), "Tables"), "Add", New(TableClassName(dataSet.Tables[i]), new CodeExpression[] {Indexer(Property(Variable("ds"),"Tables"),Str(dataSet.Tables[i].TableName))})))
1235readXmlSerializable.Statements.Add(Assign(Property(This(), "DataSetName"), Property(Variable("ds"),"DataSetName")));
1236readXmlSerializable.Statements.Add(Assign(Property(This(), "Prefix"), Property(Variable("ds"),"Prefix")));
1237readXmlSerializable.Statements.Add(Assign(Property(This(), "Namespace"), Property(Variable("ds"),"Namespace")));
1238readXmlSerializable.Statements.Add(Assign(Property(This(), "Locale"), Property(Variable("ds"),"Locale")));
1239readXmlSerializable.Statements.Add(Assign(Property(This(), "CaseSensitive"), Property(Variable("ds"),"CaseSensitive")));
1240readXmlSerializable.Statements.Add(Assign(Property(This(), "EnforceConstraints"), Property(Variable("ds"),"EnforceConstraints")));
1241readXmlSerializable.Statements.Add(MethodCall(This(),"Merge",new CodeExpression[] {Variable("ds"),Primitive(false),Field(TypeExpr(typeof(MissingSchemaAction)),"Add")}));
1242readXmlSerializable.Statements.Add(MethodCall(This(),"InitVars"));
1255getSchemaSerializable.Statements.Add(MethodCall(This(), "WriteXmlSchema", New(typeof(System.Xml.XmlTextWriter),new CodeExpression[] {Argument("stream"),Primitive(null)})));
1281childrenColumns.Initializers.Add(Property(Field(This(), TableFieldName(c.Table)), TableColumnPropertyName(c)));
1287parentColumns.Initializers.Add(Property(Field(This(), TableFieldName(c.Table)), TableColumnPropertyName(c)));
1301Property(Field(This(), TableFieldName(table)), "Constraints"),
1326parentColCreate.Initializers.Add(Property(Field(This(), parentTableField), TableColumnPropertyName(column)));
1333childColCreate.Initializers.Add(Property(Field(This(), childTableField), TableColumnPropertyName(column)));
1338Field(This(), RelationFieldName(relation)),
1344initClassMethod.Statements.Add(Assign(Property(Field(This(), RelationFieldName(relation)), "Nested"), Primitive(true)));
1347initClassMethod.Statements.Add(MethodCall(Property(This(), "Relations"), "Add", Field(This(), RelationFieldName(relation))));
1350initVarsMethod.Statements.Add(Assign(Field(This(), RelationFieldName(relation)), Indexer(Property(This(),"Relations"),Str(relation.RelationName))));
1366prop.GetStatements.Add(Return(Field(This(), TableFieldName(dataSet.Tables[i]))));
1381Stm(MethodCall(This(),"InitVars"))
1395CodeExpression codeField = Property(Field(This(), TableFieldName(table)), TableColumnPropertyName(column));
1406initClassMethod.Statements.Add(MethodCall(This(), "InitExpressions"));
1442private static CodeExpression Event(string eventName) { return new CodeEventReferenceExpression(This(), eventName);}
1467return new CodeDelegateInvokeExpression(targetObject, new CodeExpression[] {This(), par});