示例#1
0
 public FabriqueArbre(
     IArbreConstruction arbre,
     ElementConstructionDto elementsConstruction)
 {
     this.arbre = arbre;
     this.elementsConstruction = elementsConstruction;
 }
示例#2
0
 public BlockInfos(
     string id,
     EnumTypeBlock typeBlock,
     ElementConstructionDto donnees)
 {
     this.id        = id;
     this.typeBlock = typeBlock;
     this.donnees   = donnees;
 }
示例#3
0
        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);
            }
        }