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

LastWord() public method

Returns the last word in the phrase.
public LastWord ( ) : WordNode
return WordNode
        public WordNode LastWord() {
            if(Words.Any()) {
                return Words.Last();
            } else {
                return null;
            }
        }

Usage Example

Exemplo n.º 1
0
 /// <summary>
 /// Determines whether the given phrase indicates an event handler method.
 /// </summary>
 /// <param name="parsedName">The PhraseNode to test.</param>
 /// <returns>True if the phrase indicates an event handler method, False otherwise.</returns>
 protected bool IsEventHandler(PhraseNode parsedName)
 {
     if (parsedName == null || parsedName.Size() == 0)
     {
         return false;
     }
     else
     {
         return IsNonBaseVerb(parsedName.LastWord().Text)
             && parsedName[0].Text.ToLower() != "get"
             && parsedName[0].Text.ToLower() != "set";
     }
 }
All Usage Examples Of ABB.Swum.Nodes.PhraseNode::LastWord