Zdieľať cez


SrgsRuleRef Class

Definition

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

public ref class SrgsRuleRef : System::Speech::Recognition::SrgsGrammar::SrgsElement
public class SrgsRuleRef : System.Speech.Recognition.SrgsGrammar.SrgsElement
[System.Serializable]
public class SrgsRuleRef : System.Speech.Recognition.SrgsGrammar.SrgsElement
type SrgsRuleRef = class
    inherit SrgsElement
[<System.Serializable>]
type SrgsRuleRef = class
    inherit SrgsElement
Public Class SrgsRuleRef
Inherits SrgsElement
Inheritance
Attributes

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

Constructors

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

SrgsRuleRef(SrgsRule, String)

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

SrgsRuleRef(SrgsRule)

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

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

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

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

SrgsRuleRef(Uri)

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

Fields

Dictation

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

Garbage

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

MnemonicSpelling

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

Null

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

Void

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

Properties

Params

Gets the initialization parameters for a SrgsRuleRef element.

SemanticKey

Gets an alias string for the semantic dictionary.

Uri

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

Methods

CreateObjRef(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)
Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetLifetimeService()
Obsolete.

Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
InitializeLifetimeService()
Obsolete.

Obtains a lifetime service object to control the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
MemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.

(Inherited from MarshalByRefObject)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also