コード例 #1
0
ファイル: FabriqueArbre.cs プロジェクト: TheManu/ArbreLexical
 public FabriqueArbre(
     IArbreConstruction arbre,
     ElementConstructionDto elementsConstruction)
 {
     this.arbre = arbre;
     this.elementsConstruction = elementsConstruction;
 }
コード例 #2
0
ファイル: FabriqueArbre.cs プロジェクト: TheManu/ArbreLexical
 public BlockInfos(
     string id,
     EnumTypeBlock typeBlock,
     ElementConstructionDto donnees)
 {
     this.id        = id;
     this.typeBlock = typeBlock;
     this.donnees   = donnees;
 }
コード例 #3
0
ファイル: FabriqueArbre.cs プロジェクト: TheManu/ArbreLexical
        private async Task ConstruireAsync(
            IEnumerable <Etat> etatsDebut,
            IEnumerable <Etat> etatsFin,
            ElementConstructionDto elementConstruction,
            Dictionary <string, IConstructionElementArbre> dicoReferences = null)
        {
            try
            {
                switch (elementConstruction.TypeElement)
                {
                case EnumTypeElement.Chemin:
                    await ConstruireCheminAsync(
                        etatsDebut,
                        etatsFin,
                        elementConstruction as ElementCheminConstructionDto);

                    break;

                case EnumTypeElement.Repetition:
                    await ConstruireRepetitionAsync(
                        etatsDebut,
                        etatsFin,
                        elementConstruction as ElementRepetitionConstructionDto,
                        dicoReferences);

                    break;

                case EnumTypeElement.Sequence:
                    await ConstruireSequenceAsync(
                        etatsDebut,
                        etatsFin,
                        elementConstruction as SequenceElementsConstructionDto,
                        dicoReferences);

                    break;

                case EnumTypeElement.ChoixMultiple:
                    await ConstruireChoixAsync(
                        etatsDebut,
                        etatsFin,
                        elementConstruction as ChoixElementsConstructionDto,
                        dicoReferences);

                    break;

                case EnumTypeElement.Etiquette:
                    await ConstruireEtiquetteAsync(
                        etatsDebut,
                        etatsFin,
                        elementConstruction as ElementEtiquetteConstructionDto,
                        dicoReferences);

                    break;

                case EnumTypeElement.Reference:
                    await ConstruireReferenceAsync(
                        etatsDebut,
                        etatsFin,
                        elementConstruction as ElementReferenceConstructionDto,
                        dicoReferences);

                    break;

                default:
                    throw new ExceptionTechniqueArbreConstruction();
                }
            }
            catch (Exception ex)
            {
                throw EncapsulerEtGererException <ExceptionTechniqueArbreConstruction>(
                          ex);
            }
        }