ref パラメータを使用する関数に問題があります。この関数は、次のように linq を使用して自分自身を呼び出します。
public Champ(tabloidConfigColonne tcc,ref Dictionary<string, Jointure> jointures)
{
...
sousChamps = lc.ToDictionary(
o => o.nom,
o => new Champ(o, ref jointures));
}
無名関数で ref を使用できないというエラーが表示されます。
フル機能はこちら
public Champ(tabloidConfigColonne tcc,ref Dictionary<string, Jointure> jointures)
{
nom = tcc.champ;
description = tcc.titre;
type = tcc.type;
valeurDefaut = tcc.valeurParDefaut;
modeEdition=new Template(tcc.editeur, tcc.editeurParam1, tcc.editeurParam2, tcc.editeurParam3);
if (!string.IsNullOrEmpty(tcc.jointure))
{
jointure = jointures[tcc.jointure];
nomTable = jointure.nomNouvelleTable;
}
visu=tcc.visu;
Groupe=tcc.groupe;
Id=tcc.nom;
valideurs = tcc.valideurs;
Obligatoire = tcc.obligatoire;
if (tcc.colonnes.Count>0)
{
List<tabloidConfigColonne> lc = tcc.colonnes.GetColonnes(visibiliteTools.getFullVisibilite(),false);
sousChamps = lc.ToDictionary(
o => o.nom,
o => new Champ(o, ref jointures));
}
}
ご協力いただきありがとうございます。