示例#1
0
        public void FindRhetoricalFigures(RhetoricalFigures type = RhetoricalFigures.All, int?windowSize = null, object extra = null, FindFiguresCallback callback = null, RhetoricalFigures exclusions = RhetoricalFigures.None)
        {
            bool anadiplosis   = (type.HasFlag(RhetoricalFigures.Anadiplosis) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Anadiplosis);
            bool anaphora      = (type.HasFlag(RhetoricalFigures.Anaphora) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Anaphora);
            bool antimetabole  = (type.HasFlag(RhetoricalFigures.Antimetabole) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Antimetabole);
            bool chiasmus      = (type.HasFlag(RhetoricalFigures.Chiasmus) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Chiasmus);
            bool conduplicatio = (type.HasFlag(RhetoricalFigures.Conduplicatio) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Conduplicatio);
            bool epanalepsis   = (type.HasFlag(RhetoricalFigures.Epanalepsis) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Epanalepsis);
            bool epistrophe    = (type.HasFlag(RhetoricalFigures.Epistrophe) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Epistrophe);
            bool epizeuxis     = (type.HasFlag(RhetoricalFigures.Epizeuxis) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Epizeuxis);
            bool isocolon      = (type.HasFlag(RhetoricalFigures.Isocolon) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Isocolon);
            bool oxymoron      = (type.HasFlag(RhetoricalFigures.Oxymoron) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Oxymoron);
            bool ploce         = (type.HasFlag(RhetoricalFigures.Ploce) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Ploce);
            bool polyptoton    = (type.HasFlag(RhetoricalFigures.Polyptoton) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Polyptoton);
            bool polysyndeton  = (type.HasFlag(RhetoricalFigures.Polysyndeton) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Polysyndeton);
            bool symploce      = (type.HasFlag(RhetoricalFigures.Symploce) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Symploce);

            if (epizeuxis)
            {
                if (callback != null)
                {
                    callback(RhetoricalFigures.Epizeuxis);
                }
                RhetoricalFigure.FindEpizeuxis(this, windowSize);
            }
            if (ploce)
            {
                if (callback != null)
                {
                    callback(RhetoricalFigures.Ploce);
                }
                RhetoricalFigure.FindPloce(this, windowSize);
            }
            if (conduplicatio)
            {
                if (callback != null)
                {
                    callback(RhetoricalFigures.Conduplicatio);
                }
                RhetoricalFigure.FindConduplicatio(this, windowSize, extra);
            }
            if (polysyndeton)
            {
                if (callback != null)
                {
                    callback(RhetoricalFigures.Polysyndeton);
                }
                RhetoricalFigure.FindPolysyndeton(this, windowSize, extra);
            }
            if (anaphora)
            {
                if (callback != null)
                {
                    callback(RhetoricalFigures.Anaphora);
                }
                RhetoricalFigure.FindAnaphora(this, windowSize, extra);
            }
            if (epistrophe)
            {
                if (callback != null)
                {
                    callback(RhetoricalFigures.Epistrophe);
                }
                RhetoricalFigure.FindEpistrophe(this, windowSize, extra);
            }
            if (symploce)
            {
                if (callback != null)
                {
                    callback(RhetoricalFigures.Symploce);
                }
                RhetoricalFigure.FindSymploce(this, windowSize, extra);
            }
            if (epanalepsis)
            {
                if (callback != null)
                {
                    callback(RhetoricalFigures.Epanalepsis);
                }
                RhetoricalFigure.FindEpanalepsis(this, windowSize, extra);
            }
            if (anadiplosis)
            {
                if (callback != null)
                {
                    callback(RhetoricalFigures.Anadiplosis);
                }
                RhetoricalFigure.FindAnadiplosis(this, windowSize, extra);
            }
            if (antimetabole)
            {
                if (callback != null)
                {
                    callback(RhetoricalFigures.Antimetabole);
                }
                RhetoricalFigure.FindAntimetabole(this, windowSize, extra);
            }
            if (polyptoton)
            {
                if (callback != null)
                {
                    callback(RhetoricalFigures.Polyptoton);
                }
                RhetoricalFigure.FindPolyptoton(this, windowSize);
            }
            if (isocolon)
            {
                if (callback != null)
                {
                    callback(RhetoricalFigures.Isocolon);
                }
                RhetoricalFigure.FindIsocolon(this, windowSize, extra);
            }
            if (chiasmus)
            {
                if (callback != null)
                {
                    callback(RhetoricalFigures.Chiasmus);
                }
                RhetoricalFigure.FindChiasmus(this, windowSize, extra);
            }
            if (oxymoron)
            {
                if (callback != null)
                {
                    callback(RhetoricalFigures.Oxymoron);
                }
                RhetoricalFigure.FindOxymoron(this, windowSize, extra);
            }
        }
示例#2
0
        public void FindRhetoricalFigures(RhetoricalFigures type = RhetoricalFigures.All, int? windowSize = null, object extra = null, FindFiguresCallback callback = null, RhetoricalFigures exclusions = RhetoricalFigures.None)
        {
            bool anadiplosis = (type.HasFlag(RhetoricalFigures.Anadiplosis) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Anadiplosis);
              bool anaphora = (type.HasFlag(RhetoricalFigures.Anaphora) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Anaphora);
              bool antimetabole = (type.HasFlag(RhetoricalFigures.Antimetabole) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Antimetabole);
              bool chiasmus = (type.HasFlag(RhetoricalFigures.Chiasmus) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Chiasmus);
              bool conduplicatio = (type.HasFlag(RhetoricalFigures.Conduplicatio) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Conduplicatio);
              bool epanalepsis = (type.HasFlag(RhetoricalFigures.Epanalepsis) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Epanalepsis);
              bool epistrophe = (type.HasFlag(RhetoricalFigures.Epistrophe) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Epistrophe);
              bool epizeuxis = (type.HasFlag(RhetoricalFigures.Epizeuxis) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Epizeuxis);
              bool isocolon = (type.HasFlag(RhetoricalFigures.Isocolon) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Isocolon);
              bool oxymoron = (type.HasFlag(RhetoricalFigures.Oxymoron) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Oxymoron);
              bool ploce = (type.HasFlag(RhetoricalFigures.Ploce) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Ploce);
              bool polyptoton = (type.HasFlag(RhetoricalFigures.Polyptoton) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Polyptoton);
              bool polysyndeton = (type.HasFlag(RhetoricalFigures.Polysyndeton) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Polysyndeton);
              bool symploce = (type.HasFlag(RhetoricalFigures.Symploce) || type.HasFlag(RhetoricalFigures.All)) && !exclusions.HasFlag(RhetoricalFigures.Symploce);

              if (epizeuxis) {
            if (callback != null) callback(RhetoricalFigures.Epizeuxis);
            RhetoricalFigure.FindEpizeuxis(this, windowSize);
              }
              if (ploce) {
            if (callback != null) callback(RhetoricalFigures.Ploce);
            RhetoricalFigure.FindPloce(this, windowSize);
              }
              if (conduplicatio) {
            if (callback != null) callback(RhetoricalFigures.Conduplicatio);
            RhetoricalFigure.FindConduplicatio(this, windowSize, extra);
              }
              if (polysyndeton) {
            if (callback != null) callback(RhetoricalFigures.Polysyndeton);
            RhetoricalFigure.FindPolysyndeton(this, windowSize, extra);
              }
              if (anaphora) {
            if (callback != null) callback(RhetoricalFigures.Anaphora);
            RhetoricalFigure.FindAnaphora(this, windowSize, extra);
              }
              if (epistrophe) {
            if (callback != null) callback(RhetoricalFigures.Epistrophe);
            RhetoricalFigure.FindEpistrophe(this, windowSize, extra);
              }
              if (symploce) {
            if (callback != null) callback(RhetoricalFigures.Symploce);
            RhetoricalFigure.FindSymploce(this, windowSize, extra);
              }
              if (epanalepsis) {
            if (callback != null) callback(RhetoricalFigures.Epanalepsis);
            RhetoricalFigure.FindEpanalepsis(this, windowSize, extra);
              }
              if (anadiplosis) {
            if (callback != null) callback(RhetoricalFigures.Anadiplosis);
            RhetoricalFigure.FindAnadiplosis(this, windowSize, extra);
              }
              if (antimetabole) {
            if (callback != null) callback(RhetoricalFigures.Antimetabole);
            RhetoricalFigure.FindAntimetabole(this, windowSize, extra);
              }
              if (polyptoton) {
            if (callback != null) callback(RhetoricalFigures.Polyptoton);
            RhetoricalFigure.FindPolyptoton(this, windowSize);
              }
              if (isocolon) {
            if (callback != null) callback(RhetoricalFigures.Isocolon);
            RhetoricalFigure.FindIsocolon(this, windowSize, extra);
              }
              if (chiasmus) {
            if (callback != null) callback(RhetoricalFigures.Chiasmus);
            RhetoricalFigure.FindChiasmus(this, windowSize, extra);
              }
              if (oxymoron) {
            if (callback != null) callback(RhetoricalFigures.Oxymoron);
            RhetoricalFigure.FindOxymoron(this, windowSize, extra);
              }
        }