SrgsRuleRef Class

SrgsRuleRef Class

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

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)

[SerializableAttribute]
public sealed class SrgsRuleRef : SrgsElement

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.

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