public override IEnumerable <CodeExpression> NewCtorArgs(CGenModelInterpreter aModelInterpreter, CCodeDomBuilder aDomBuilder, CRflProperty aProperty) { var aCTyp = aProperty.DeclaringTyp; var aCTypNme = aModelInterpreter.GetTypName(aCTyp, false); var aCdTypRef = new CodeTypeReference(aCTypNme); var aCdTypRefExp = new CodeTypeReferenceExpression(aCdTypRef); var aFldNme = aModelInterpreter.Tok.Trg_C_Mta_Pfx + aProperty.Name + aModelInterpreter.Tok.Trg_P_Fk_Sfx + aModelInterpreter.Tok.Dom_F_Mta_P_Sfx; var aFldRefExp = new CodeFieldReferenceExpression(aCdTypRefExp, aFldNme); yield return(aFldRefExp); }
public override IEnumerable <CodeExpression> NewCtorArgs(CGenModelInterpreter aModelInterpreter, CCodeDomBuilder aDomBuilder, CRflProperty aProperty) { var aCTyp = aModelInterpreter.GetReturnTyp(aProperty); var aGenarateReverseNavigation = aCTyp.Interpret(() => bool.Parse(aCTyp.GetAttributeValue(aModelInterpreter.Tok.Mdl_T_A_GenerateReverseNavigation, () => true.ToString()))); if (aGenarateReverseNavigation) { var aCTypNme = aModelInterpreter.GetTypName(aCTyp, true); var aCdTypRef = new CodeTypeReference(aCTypNme); var aCdTypRefExp = new CodeTypeReferenceExpression(aCdTypRef); var aPrpNme = aModelInterpreter.Tok.GetRelationyMetaInfoPropertyName(aModelInterpreter.GetR11CReverseNavigationRefName(aProperty)); var aFldRefExp = new CodePropertyReferenceExpression(aCdTypRefExp, aPrpNme); yield return(aFldRefExp); } }