SrgsRuleRef Constructor (Uri, String, String)

Microsoft Speech Platform SDK 11

Collapse image Expand Image Copy image CopyHover image

Initializes a new instance of the SrgsRuleRef class, specifying the location of the external grammar file, the identifier of the rule, and the string alias of the semantic dictionary.

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, _
	semanticKey As String _
)
Visual Basic (Usage)
Dim uri As Uri
Dim rule As String
Dim semanticKey As String

Dim instance As New SrgsRuleRef(uri, rule, _
	semanticKey)
C#
public SrgsRuleRef(
	Uri uri,
	string rule,
	string semanticKey
)

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.

semanticKey
Type: System..::..String

An alias string for the semantic dictionary.

Exceptions

ExceptionCondition
ArgumentNullException

uri is nullNothingnullptrunita null reference (Nothing in Visual Basic).

semanticKey is nullNothingnullptrunita null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

semanticKey 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