CommandResolver.resolve

Attempts to resolve a range of words/a sentence into a CommandNode.

Notes: The overload taking a string will split the string by spaces, the same way CommandResolver.define works.

Description: There are three potential outcomes of this function.

1. The words provided fully match a command sentence. The value of returnValue.value.type will be CommandNodeType.finalWord. 2. The words provided a partial match of a command sentence. The value of returnValue.value.type will be CommandNodeType.partialWord. 3. Neither of the above. The value of returnValue.success will be false.

How you handle these outcomes, and which ones you handle, are entirely up to your application.

  1. CommandResolveResult!UserDataT resolve(RangeOfStrings words)
    class CommandResolver(UserDataT)
    resolve
    (
    RangeOfStrings
    )
    (
    RangeOfStrings words
    )
  2. CommandResolveResult!UserDataT resolve(string sentence)

Parameters

words RangeOfStrings

The words to resolve.

Return Value

Type: CommandResolveResult!UserDataT

A CommandResolveResult, specifying the result of the resolution.

Meta