SrgsDocument Constructor (GrammarBuilder)

Initializes a new instance of the SrgsDocument class specifying a set of rules defined by the GrammarBuilder object.

Namespace: Microsoft.Speech.Recognition.SrgsGrammar
Assembly: Microsoft.Speech (in microsoft.speech.dll)

Syntax

'Declaration
Public Sub New ( _
    builder As GrammarBuilder _
)
public SrgsDocument (
    GrammarBuilder builder
)
public:
SrgsDocument (
    GrammarBuilder^ builder
)
public SrgsDocument (
    GrammarBuilder builder
)
public function SrgsDocument (
    builder : GrammarBuilder
)

Parameters

  • builder
    The GrammarBuilder object used to create the SrgsDocument instance.

Exceptions

Exception type Condition
ArgumentNullException

builder is null.

Example

GrammarBuilder builder = null;

Choices choicesEurope = new Choices("England", "France", "Germany", "Italy");
Choices choicesSAmerica = new Choices("Argentina", "Brazil", "Uruguay");
Choices worldCupWinnerChoices = new Choices(choicesEurope, choicesSAmerica);

builder = new GrammarBuilder(worldCupWinnerChoices);
document = new SrgsDocument(builder);

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

See Also

Reference

SrgsDocument Class
SrgsDocument Members
Microsoft.Speech.Recognition.SrgsGrammar Namespace