Esempio n. 1
0
        private void SpeichereChildElement(string code)
        {
            code = code.Trim();
            DTDChildElemente value = new DTDChildElemente(code);

            this._children.Add(value);
        }
Esempio n. 2
0
        public DTDChildElemente Clone()
        {
            DTDChildElemente dTDChildElemente = new DTDChildElemente();

            dTDChildElemente._alleMoeglichenElemente = null;
            dTDChildElemente._art         = this._art;
            dTDChildElemente._operator    = this._operator;
            dTDChildElemente._defAnzahl   = this._defAnzahl;
            dTDChildElemente._children    = (ArrayList)this._children.Clone();
            dTDChildElemente._dtd         = this._dtd;
            dTDChildElemente._elementName = this._elementName;
            dTDChildElemente._quellcode   = this._quellcode + "(geklont)";
            return(dTDChildElemente);
        }
Esempio n. 3
0
        private void Durchsuchen(DTDChildElemente childBlock)
        {
            switch (childBlock.Art)
            {
            case DTDChildElemente.DTDChildElementArten.EinzelChild:
                this.ElementMerken(childBlock.ElementName);
                break;

            case DTDChildElemente.DTDChildElementArten.ChildListe:
                for (int index = 0; index < childBlock.AnzahlChildren; ++index)
                {
                    this.Durchsuchen(childBlock.Child(index));
                }
                break;
            }
        }
        private StringCollection GetDTDElementeNamenAusChildElementen_(DTDChildElemente children)
        {
            StringCollection stringCollection = new StringCollection();

            switch (children.Art)
            {
            case DTDChildElemente.DTDChildElementArten.EinzelChild:
                if (!stringCollection.Contains(children.ElementName))
                {
                    stringCollection.Add(children.ElementName);
                }
                break;

            case DTDChildElemente.DTDChildElementArten.ChildListe:
                for (int i = 0; i < children.AnzahlChildren; i++)
                {
                    StringEnumerator enumerator = this.GetDTDElementeNamenAusChildElementen_(children.Child(i)).GetEnumerator();
                    try
                    {
                        while (enumerator.MoveNext())
                        {
                            string current = enumerator.Current;
                            if (!stringCollection.Contains(current))
                            {
                                stringCollection.Add(current);
                            }
                        }
                    }
                    finally
                    {
                        IDisposable disposable = enumerator as IDisposable;
                        if (disposable != null)
                        {
                            disposable.Dispose();
                        }
                    }
                }
                break;

            default:
                throw new ApplicationException(string.Format(ResReader.Reader.GetString("UnbekannteDTDChildElementArt"), children.Art));

            case DTDChildElemente.DTDChildElementArten.Leer:
                break;
            }
            return(stringCollection);
        }
        private void Durchsuchen(DTDChildElemente childBlock)
        {
            switch (childBlock.Art)
            {
            case DTDChildElemente.DTDChildElementArten.Leer:
                break;

            case (DTDChildElemente.DTDChildElementArten) 1:
                break;

            case DTDChildElemente.DTDChildElementArten.EinzelChild:
                this.ElementMerken(childBlock.ElementName);
                break;

            case DTDChildElemente.DTDChildElementArten.ChildListe:
                for (int i = 0; i < childBlock.AnzahlChildren; i++)
                {
                    this.Durchsuchen(childBlock.Child(i));
                }
                break;
            }
        }
Esempio n. 6
0
        private StringCollection GetDTDElementeNamenAusChildElementen_(
            DTDChildElemente children)
        {
            StringCollection stringCollection = new StringCollection();

            switch (children.Art)
            {
            case DTDChildElemente.DTDChildElementArten.EinzelChild:
                if (!stringCollection.Contains(children.ElementName))
                {
                    stringCollection.Add(children.ElementName);
                    goto case DTDChildElemente.DTDChildElementArten.Leer;
                }
                else
                {
                    goto case DTDChildElemente.DTDChildElementArten.Leer;
                }

            case DTDChildElemente.DTDChildElementArten.Leer:
                return(stringCollection);

            case DTDChildElemente.DTDChildElementArten.ChildListe:
                for (int index = 0; index < children.AnzahlChildren; ++index)
                {
                    foreach (string str in this.GetDTDElementeNamenAusChildElementen_(children.Child(index)))
                    {
                        if (!stringCollection.Contains(str))
                        {
                            stringCollection.Add(str);
                        }
                    }
                }
                goto case DTDChildElemente.DTDChildElementArten.Leer;

            default:
                throw new ApplicationException(string.Format(ResReader.Reader.GetString("UnbekannteDTDChildElementArt"), (object)children.Art));
            }
        }
 public AlleMoeglichenElementeEinesChildblocks(DTDChildElemente childBlock)
 {
     this._gefundeneElemente = new StringCollection();
     this.Durchsuchen(childBlock);
 }