Initializes a new instance of the SrgsRuleRef class, specifying the location of the external grammar file and the identifier of the rule to reference.
Namespace:
Microsoft.Speech.Recognition.SrgsGrammar
Assembly:
Microsoft.Speech (in Microsoft.Speech.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub New ( _ uri As Uri, _ rule As String _ ) |
Visual Basic (Usage) |
---|
Dim uri As Uri Dim rule As String Dim instance As New SrgsRuleRef(uri, rule) |
C# |
---|
public SrgsRuleRef( Uri uri, string rule ) |
Parameters
- uri
- Type: System..::..Uri
The location of a grammar file outside the containing grammar.
- rule
- Type: System..::..String
The identifier of the rule to reference.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | uri is nullNothingnullptrunita null reference (Nothing in Visual Basic). rule is nullNothingnullptrunita null reference (Nothing in Visual Basic). |
ArgumentOutOfRangeException | rule is empty. |
Remarks
This constructor creates a rule reference to an external grammar file. To create a rule reference to an SrgsRule object within the same grammar, use any of the following constructors: