Add() public method

Concatenates the supplied phrase to the end of the current phrase.
public Add ( PhraseNode phrase ) : void
phrase PhraseNode The phrase to add.
return void
 /// <summary>
 /// Concatenates the given phrases and assigns the result to Theme.
 /// ** Note that this will potentially modify phrase1. **
 /// </summary>
 /// <param name="phrase1">The first phrase.</param>
 /// <param name="phrase2">The second phrase.</param>
 public void CreateThemeFromPhrases(PhraseNode phrase1, PhraseNode phrase2)
 {
     if (phrase1 != null && !phrase1.IsEmpty())
     {
         phrase1.Add(phrase2);
         this.Theme = phrase1;
     }
     else
     {
         this.Theme = phrase2;
     }
 }
示例#2
0
 /// <summary>
 /// Concatenates the given phrases and assigns the result to Theme.
 /// ** Note that this will potentially modify phrase1. **
 /// </summary>
 /// <param name="phrase1">The first phrase.</param>
 /// <param name="phrase2">The second phrase.</param>
 public void CreateThemeFromPhrases(PhraseNode phrase1, PhraseNode phrase2) {
     if(phrase1 != null && !phrase1.IsEmpty()) {
         phrase1.Add(phrase2);
         this.Theme = phrase1;
     } else {
         this.Theme = phrase2;
     }
 }