Note

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

SrgsRuleRef Class

Represents the grammar element that specifies a reference to a rule.

Inheritance Hierarchy

System.Object
  System.MarshalByRefObject
    Microsoft.Speech.Recognition.SrgsGrammar.SrgsElement
      Microsoft.Speech.Recognition.SrgsGrammar.SrgsRuleRef

Namespace:  Microsoft.Speech.Recognition.SrgsGrammar
Assembly:  Microsoft.Speech (in Microsoft.Speech.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public NotInheritable Class SrgsRuleRef _
    Inherits SrgsElement
'Usage
Dim instance As SrgsRuleRef
[SerializableAttribute]
public sealed class SrgsRuleRef : SrgsElement

Remarks

The SrgsRuleRef class is particularly useful when you want to reuse an SrgsRule element whose contents have already been defined. By reusing existing rules, you can build complex grammars more quickly.

You can use one of the constructors of the SrgsRuleRef class to reference an SrgsRule object or a rule element if the following is true:

  • The SrgsRule object is in the containing grammar and the value of its Scope property is Public or Private.

  • The rule element is in an external grammar and the value of its scope attribute is public.

  • The rule element is in an external grammar, the value of its scope attribute is private, and it is declared as the root rule of the external grammar.

This class represents the ruleref element as defined in the World Wide Web Consortium (W3C) Speech Recognition Grammar Specification (SRGS) Version 1.0.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SrgsRuleRef Members

Microsoft.Speech.Recognition.SrgsGrammar Namespace

Other Resources

Create Grammars Using SrgsGrammar (Microsoft.Speech)