SrgsRuleRef Class

 

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

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

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

[SerializableAttribute]
public class SrgsRuleRef : SrgsElement

NameDescription
System_CAPS_pubmethodSrgsRuleRef(SrgsRule)

Initializes a new instance of the SrgsRuleRef class and specifies the rule to reference.

System_CAPS_pubmethodSrgsRuleRef(SrgsRule, String)

Initializes a new instance of the SrgsRuleRef class, specifying the rule to reference and a string that contains a semantic key.

System_CAPS_pubmethodSrgsRuleRef(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.

System_CAPS_pubmethodSrgsRuleRef(Uri)

Initializes a new instance of the SrgsRuleRef class and specifies the location of the external grammar file to reference.

System_CAPS_pubmethodSrgsRuleRef(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.

System_CAPS_pubmethodSrgsRuleRef(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.

System_CAPS_pubmethodSrgsRuleRef(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.

NameDescription
System_CAPS_pubpropertyParams

Gets the initialization parameters for a SrgsRuleRef element.

System_CAPS_pubpropertySemanticKey

Gets an alias string for the semantic dictionary.

System_CAPS_pubpropertyUri

Gets the URI for the rule that this SrgsRuleRef element references.

NameDescription
System_CAPS_pubmethodCreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodInitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticDictation

Defines a rule that can match spoken input as defined by the dictation topic associated with this grammar.

System_CAPS_pubfieldSystem_CAPS_staticGarbage

Defines a rule that can match any speech up to the next rule match, the next token, or until the end of spoken input.

System_CAPS_pubfieldSystem_CAPS_staticMnemonicSpelling

Indicates that speech input can contain spelled-out letters of a word, and that spelled-out letters can be recognized as a word.

System_CAPS_pubfieldSystem_CAPS_staticNull

Defines a rule that is automatically matched in the absence of any audio input.

System_CAPS_pubfieldSystem_CAPS_staticVoid

Defines a rule that can never be spoken. Inserting VOID into a sequence automatically makes that sequence unspeakable.

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
Available since 3.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.

Return to top
Show: