LoadGrammarCompletedEventArgs Class

Returns data from the LoadGrammarCompleted event.

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

Syntax

'Declaration
Public Class LoadGrammarCompletedEventArgs
    Inherits AsyncCompletedEventArgs
public class LoadGrammarCompletedEventArgs : AsyncCompletedEventArgs
public ref class LoadGrammarCompletedEventArgs : public AsyncCompletedEventArgs
public class LoadGrammarCompletedEventArgs extends AsyncCompletedEventArgs
public class LoadGrammarCompletedEventArgs extends AsyncCompletedEventArgs

Remarks

An instance of LoadGrammarCompletedEventArgs is created when the SpeechRecognitionEngine.AudioLevelUpdated or the DtmfRecognitionEngine.AudioLevelUpdated event is raised.

LoadGrammarCompletedEventArgs is passed to handlers of LoadGrammarCompleted events that are generated when calls to the object's LoadGrammarAsync methods complete.

Inheritance Hierarchy

System.Object
   System.EventArgs
     System.ComponentModel.AsyncCompletedEventArgs
      Microsoft.Speech.Recognition.LoadGrammarCompletedEventArgs

Example

In the example below, a handler for LoadGrammarCompleted uses information provided by the instance of LoadGrammarCompletedEventArgs it receives as an argument to update a display of Grammar objects available in an application.

//On load we actuall update the display.
//A hash table is used to get the node information we added in AddGrammar.
_recognizer.LoadGrammarCompleted +=
    delegate(object sender, LoadGrammarCompletedEventArgs eventArgs) {
        //Update Grammar display upon completion of asynchronous grammar load.
        DisplayGrammarLoad(eventArgs.Grammar);
    };

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

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

LoadGrammarCompletedEventArgs Members
Microsoft.Speech.Recognition Namespace
Grammar Class
SpeechRecognitionEngine.LoadGrammar
SpeechRecognitionEngine.LoadGrammar
LoadGrammarAsync
LoadGrammarCompletedEventArgs Class