Export (0) Print
Expand All

SrgsRuleRef Class

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

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

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

[SerializableAttribute]
public class SrgsRuleRef : SrgsElement

The SrgsRuleRef type exposes the following members.

  NameDescription
Public methodSrgsRuleRef(SrgsRule)Initializes a new instance of the SrgsRuleRef class and specifies the rule to reference.
Public methodSrgsRuleRef(Uri)Initializes a new instance of the SrgsRuleRef class and specifies the location of the external grammar file to reference.
Public methodSrgsRuleRef(SrgsRule, String)Initializes a new instance of the SrgsRuleRef class, specifying the rule to reference and a string that contains a semantic key.
Public methodSrgsRuleRef(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.
Public methodSrgsRuleRef(SrgsRule, String, String)Initializes a new instance of the SrgsRuleRef class, specifying the rule to reference, the string alias of the semantic dictionary, and initialization parameters.
Public methodSrgsRuleRef(Uri, String, String)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.
Public methodSrgsRuleRef(Uri, String, String, String)Initializes a new instance of the SrgsRuleRef class, specifying the location of the external grammar file, the identifier of the rule, the string alias of the semantic dictionary, and initialization parameters.
Top

  NameDescription
Public propertyParamsGets the initialization parameters for a SrgsRuleRef element.
Public propertySemanticKeyGets an alias string for the semantic dictionary.
Public propertyUriGets the URI for the rule that this SrgsRuleRef element references.
Top

  NameDescription
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected methodMemberwiseClone()Creates a shallow copy of the current Object. (Inherited from Object.)
Protected methodMemberwiseClone(Boolean)Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public fieldStatic memberDictationDefines a rule that can match spoken input as defined by the dictation topic associated with this grammar.
Public fieldStatic memberGarbageDefines a rule that can match any speech up to the next rule match, the next token, or until the end of spoken input.
Public fieldStatic memberMnemonicSpellingIndicates that speech input can contain spelled-out letters of a word, and that spelled-out letters can be recognized as a word.
Public fieldStatic memberNullDefines a rule that is automatically matched in the absence of any audio input.
Public fieldStatic memberVoidDefines a rule that can never be spoken. Inserting VOID into a sequence automatically makes that sequence unspeakable.
Top

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. For information about the SRGS ruleref element and details about its support by System.Speech, see ruleref Element.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

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:
© 2014 Microsoft