GrammarBuilder.op_Addition Method (GrammarBuilder, Choices)
Returns a new instance of GrammarBuilder constructed from by appending the grammar logic of a Choices instance to the grammar logic of a GrammarBuilder object.
Namespace: Microsoft.Speech.Recognition
Assembly: Microsoft.Speech (in microsoft.speech.dll)
Syntax
'Declaration
Public Shared Operator + ( _
builder As GrammarBuilder, _
choices As Choices _
) As GrammarBuilder
public static GrammarBuilder operator + (
GrammarBuilder builder,
Choices choices
)
public:
static GrammarBuilder^ operator + (
GrammarBuilder^ builder,
Choices^ choices
)
Parameters
- builder
A valid instance of GrammarBuilder to contain the initial grammar logic of the new GrammarBuilder.
- choices
A valid instance of Choices defines a list of acceptable audio inputs to be appended to the grammar logic defined by builder.
Return Value
Returns an instance of GrammarBuilder if successful, null is returned or an exception generated if the operation fails.
Remarks
Because GrammarBuilder support implicit conversions from SemanticResultValue and SemanticResultKey, these may be cast to use as builder.
Care should be taken if the GrammarBuilder specified by builder or the elements defined by choices have been constructed using any SemanticResultValue or SemanticResultKey instances.
An exception will be thrown during the use of a Grammar generated from a GrammarBuilder constructed with repeats of a defining GrammarBuilder if the repetition of the grammar logic of that GrammarBuilder include instances of SemanticResultValue that would require repeated modifications of the Value property of the one of the SemanticValue objects returned by a recognition operation.
Similarly, an exception will be generated during the use of a Grammar generated from a GrammarBuilder constructed with repeats of a defining Grammarif the repetition of the grammar logic of that Grammar will result in more than one instance of SemanticResultKey with the same tag value and at the same level in the recognition semantic tree are created.
Thread Safety
All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.
Platforms
Development Platforms
Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition
Target Platforms
See Also
Reference
GrammarBuilder Class
GrammarBuilder Members
Microsoft.Speech.Recognition Namespace