fx\src\data\System\Data\CodeGen\datacache.cs (128)
303New(rowClassName + "ChangeEvent", new CodeExpression[] { Cast(rowClassName, Property(Argument("e"), "Row")), Property(Argument("e"), "Action")})
368constructor.BaseConstructorArgs.Add(Property(Argument("table"),"TableName"));
370If(IdNotEQ(Property(Argument("table"),"CaseSensitive"),Property(Property(Argument("table"),"DataSet"),"CaseSensitive")),
371Assign(Property(This(),"CaseSensitive"),Property(Argument("table"),"CaseSensitive"))
375If(IdNotEQ(MethodCall(Property(Argument("table"),"Locale"),"ToString"),MethodCall(Property(Property(Argument("table"),"DataSet"),"Locale"),"ToString")),
376Assign(Property(This(),"Locale"),Property(Argument("table"),"Locale"))
380If(IdNotEQ(Property(Argument("table"),"Namespace"),Property(Property(Argument("table"),"DataSet"),"Namespace")),
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")));
415thisIndex.GetStatements.Add(Return(Cast(stRowConcreateClassName, Indexer(Property(This(), "Rows"), Argument("index")))));
424addMethod.Statements.Add(MethodCall(Property(This(), "Rows"), "Add", Argument("row")));
461assignStmt.Left = Property(varRow, "ItemArray");
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")));
591tableInitClass.Statements.Add(MethodCall(Property(This(), "Columns"), "Add", Field(This(), ColumnName)));
606tableInitClass.Statements.Add(MethodCall(Property(This(), "Constraints"), "Add",
624tableInitVars.Statements.Add(Assign(codeField, Indexer(Property(This(),"Columns"),Str(column.ColumnName))));
628tableInitClass.Statements.Add(Assign(Property(codeField, "AutoIncrement"), Primitive(true)));
632tableInitClass.Statements.Add(Assign(Property(codeField, "AutoIncrementSeed"), Primitive(column.AutoIncrementSeed)));
636tableInitClass.Statements.Add(Assign(Property(codeField, "AutoIncrementStep"), Primitive(column.AutoIncrementStep)));
640tableInitClass.Statements.Add(Assign(Property(codeField, "AllowDBNull"), Primitive(false)));
644tableInitClass.Statements.Add(Assign(Property(codeField, "ReadOnly"), Primitive(true)));
648tableInitClass.Statements.Add(Assign(Property(codeField, "Unique"), Primitive(true)));
653tableInitClass.Statements.Add(Assign(Property(codeField, "Prefix"), Str(column.Prefix)));
657tableInitClass.Statements.Add(Assign(Property(codeField, "Namespace"), Str(column.Namespace)));
661tableInitClass.Statements.Add(Assign(Property(codeField, "Caption"), Str(column.Caption)));
665tableInitClass.Statements.Add(Assign(Property(codeField, "DefaultValue"), Primitive(column.DefaultValue)));
669tableInitClass.Statements.Add(Assign(Property(codeField, "MaxLength"), Primitive(column.MaxLength)));
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)));
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))));
828nullValueExpr = Property(TypeExpr(col.DataType), "Empty");
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))}));
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")));
1055new System.CodeDom.CodeAttachEventStatement(new CodeEventReferenceExpression(Property(This(),"Tables"),"CollectionChanged"),Variable("schemaChangedHandler1")) ,
1056new System.CodeDom.CodeAttachEventStatement(new CodeEventReferenceExpression(Property(This(),"Relations"),"CollectionChanged"),Variable("schemaChangedHandler1")),
1071If(IdNotEQ(Indexer(Property(Variable("ds"),"Tables"),Str(dataSet.Tables[i].TableName)),Primitive(null)),
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")));
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")));
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)));
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)))));
1211getTypedDataSetSchema.Statements.Add(Assign(Property(Variable("any"),"Namespace"),Property(Variable("ds"),"Namespace")));
1212getTypedDataSetSchema.Statements.Add(MethodCall(Property(Variable("sequence"),"Items"), "Add", new CodeExpression [] { Variable("any") }));
1213getTypedDataSetSchema.Statements.Add(Assign(Property(Variable("type"),"Particle"),Variable("sequence")));
1230If(IdNotEQ(Indexer(Property(Variable("ds"),"Tables"),Str(dataSet.Tables[i].TableName)),Primitive(null)),
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")));
1256getSchemaSerializable.Statements.Add(Assign(Property(Argument("stream"),"Position"),Primitive(0)));
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"),
1309initClassMethod.Statements.Add(Assign(Property(varFkc,"AcceptRejectRule"),Field(TypeExpr(fkc.AcceptRejectRule.GetType()), acceptRejectRule)));
1310initClassMethod.Statements.Add(Assign(Property(varFkc,"DeleteRule"),Field(TypeExpr(fkc.DeleteRule.GetType()), deleteRule)));
1311initClassMethod.Statements.Add(Assign(Property(varFkc,"UpdateRule"),Field(TypeExpr(fkc.UpdateRule.GetType()), updateRule)));
1326parentColCreate.Initializers.Add(Property(Field(This(), parentTableField), TableColumnPropertyName(column)));
1333childColCreate.Initializers.Add(Property(Field(This(), childTableField), TableColumnPropertyName(column)));
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))));
1380If(EQ(Property(Argument("e"),"Action"),Field(TypeExpr(typeof(CollectionChangeAction)),"Remove")),
1395CodeExpression codeField = Property(Field(This(), TableFieldName(table)), TableColumnPropertyName(column));
1398initExpressionMethod.Statements.Add(Assign(Property(codeField, "Expression"), Str(column.Expression)));