Add() public méthode

public Add ( JoinPattern element ) : void
element JoinPattern
Résultat void
Exemple #1
0
        private JoinStatement VisitJoinStatement(JoinStatement joinstmt)
        {
            if (joinstmt == null) return null;
            JoinPatternList newJoinPatternList = new JoinPatternList();

            for (int i = 0, n = joinstmt.joinPatternList.Length; i < n; i++)
                newJoinPatternList.Add((JoinPattern)this.Visit(joinstmt.joinPatternList[i]));

            joinstmt.joinPatternList = newJoinPatternList;
            joinstmt.statement = (Statement)this.Visit(joinstmt.statement);
            joinstmt.attributes = this.VisitAttributeList(joinstmt.attributes);
            return joinstmt;
        }
Exemple #2
0
        private JoinStatement VisitJoinStatement(JoinStatement joinstmt)
        {
            if (joinstmt == null) return null;

            JoinPatternList newJoinPatternList = new JoinPatternList();

            for (int i = 0, n = joinstmt.joinPatternList.Length; i < n; i++)
            {
                if (joinstmt.joinPatternList[i] is TimeoutPattern && n != 1)
                {
                    // If we've already see a timeout in this join statement, then
                    // skip any subsequent ones and report an error
                    HandleError(joinstmt.joinPatternList[i], Error.TimeoutNotAlone);
                    return null;
                }

                JoinPattern newJoinPattern = (JoinPattern)this.Visit(joinstmt.joinPatternList[i]);

                if (newJoinPattern != null)
                    newJoinPatternList.Add(newJoinPattern);
            }

            joinstmt.joinPatternList = newJoinPatternList;
            joinstmt.statement = (Statement)this.Visit(joinstmt.statement);
            joinstmt.attributes = this.VisitAttributeList(joinstmt.attributes);

            if (joinstmt.joinPatternList.Length == 0 || joinstmt.statement == null)
                return null;

            return joinstmt;
        }