Grammar Constructor (Stream^, String^, Uri^, array<Object^>^)
Initializes a new instance of the Grammar class a Streamand specifies a root rule and a base URI to resolve relative references.
Assembly: System.Speech (in System.Speech.dll)
public: Grammar( Stream^ stream, String^ ruleName, Uri^ baseUri, array<Object^>^ parameters )
Parameters
- stream
-
Type:
System.IO::Stream^
A Stream connected to an input/output object (including files, VisualStudio Resources, and DLLs) that contains a grammar specification.
- ruleName
-
Type:
System::String^
The identifier of the rule to use as the entry point of the speech recognition grammar, or null to use the default root rule of the grammar description.
- baseUri
-
Type:
System::Uri^
The base URI to use to resolve any relative rule reference in the grammar description, or null.
- parameters
-
Type:
array<System::Object^>^
Parameters to be passed to the initialization handler specified by the OnInit property for the entry point or the root rule of the Grammar to be created. This parameter may be null.
| Exception | Condition |
|---|---|
| ArgumentException |
|
Parameters for an initialization handler may also be specified.
Available since 3.0