SrgsOneOf 类

定义

表示可选的单词或短语的列表,其中所有可用于匹配语音输入。Represents a list of alternative words or phrases, any one of which may be used to match speech input.

public ref class SrgsOneOf : System::Speech::Recognition::SrgsGrammar::SrgsElement
[System.Serializable]
public class SrgsOneOf : System.Speech.Recognition.SrgsGrammar.SrgsElement
[<System.Serializable>]
type SrgsOneOf = class
    inherit SrgsElement
Public Class SrgsOneOf
Inherits SrgsElement
继承
属性

注解

SrgsOneOf对象包含可选单词或短语的列表,其中的任何一项都可能在口述时被识别。A SrgsOneOf object contains a list of alternative words or phrases, any one of which may be recognized when spoken. 可以从对象的数组 SrgsItem 或对象的数组中生成替代项的列表 StringYou can build lists of alternatives from arrays of SrgsItem objects or arrays of String objects. 使用 Items 属性可访问列表中的替代项。Use the Items property to access the alternative items in the list.

SrgsOneOf类表示 one-of 来自万维网联合会 (W3C) 语音识别语法规范 (SRGS) 版本 1.0的元素。The SrgsOneOf class represents the one-of element from the World Wide Web Consortium (W3C) Speech Recognition Grammar Specification (SRGS) Version 1.0. 有关 SRGS 元素的信息 one-of 以及有关其支持的详细信息,请参阅 一个元素For information about the SRGS one-of element and details about its support by System.Speech, see one-of Element.

构造函数

SrgsOneOf()

初始化 SrgsOneOf 类的新实例。Initializes a new instance of the SrgsOneOf class.

SrgsOneOf(SrgsItem[])

SrgsItem 对象的数组初始化 SrgsOneOf 类的新实例。Initializes a new instance of the SrgsOneOf class from an array of SrgsItem objects.

SrgsOneOf(String[])

String 对象的数组初始化 SrgsOneOf 类的新实例。Initializes a new instance of the SrgsOneOf class from an array of String objects.

属性

Items

获取 SrgsOneOf 元素中包含的所有备选项的列表。Gets the list of all the alternatives contained in the SrgsOneOf element.

方法

Add(SrgsItem)

添加包含单词或短语的 SrgsItem 到替换选项列表。Adds an SrgsItem containing a word or a phrase to the list of alternatives.

CreateObjRef(Type)

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(继承自 MarshalByRefObject)
Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetLifetimeService()

检索控制此实例的生存期策略的当前生存期服务对象。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(继承自 MarshalByRefObject)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
InitializeLifetimeService()

获取生存期服务对象来控制此实例的生存期策略。Obtains a lifetime service object to control the lifetime policy for this instance.

(继承自 MarshalByRefObject)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
MemberwiseClone(Boolean)

创建当前 MarshalByRefObject 对象的浅表副本。Creates a shallow copy of the current MarshalByRefObject object.

(继承自 MarshalByRefObject)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅