Share via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

SrgsRuleRef Constructor (Uri, String)

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

'Declaration
Public Sub New ( _
    uri As Uri, _
    rule As String _
)
'Usage
Dim uri As Uri
Dim rule As String

Dim instance As New SrgsRuleRef(uri, rule)
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 a null reference (Nothing in Visual Basic).

rule is a 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:

See Also

Reference

SrgsRuleRef Class

SrgsRuleRef Members

SrgsRuleRef Overload

Microsoft.Speech.Recognition.SrgsGrammar Namespace

Other Resources

Create Grammars Using SrgsGrammar (Microsoft.Speech)