ABB.Swum.Nodes.PhraseNode.Add C# (CSharp) Method

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
        public void Add(PhraseNode phrase) {
            if(phrase != null) {
                Words.AddRange(phrase.GetPhrase());
            }
        }

Same methods

PhraseNode::Add ( WordNode word ) : void

Usage Example

 /// <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;
     }
 }
All Usage Examples Of ABB.Swum.Nodes.PhraseNode::Add