Export (0) Print
Expand All

SpeechRecognitionEngine.UnloadAllGrammars Method

Unloads all Grammar objects currently loaded in by a Windows Desktop Speech Technology recognition engine.

Namespace: System.Speech.Recognition
Assembly: System.Speech (in system.speech.dll)

public void UnloadAllGrammars ()
public void UnloadAllGrammars ()
public function UnloadAllGrammars ()
Not applicable.

If there are calls to LoadGrammarAsync that are still loading Grammar objects when UnloadAllGrammars is called, the UnloadAllGrammarscall will block until all the Grammar objects are loaded, and then unload those objects.

The following example unloads all Grammar objects prior to as part of an implementation of Dispose.

public new void Dispose(bool disposing)
{
    if (!this.disposed) {

        _recognizer.UnloadAllGrammars();
        if (disposing) {
            _recognizer.Dispose();
            base.Dispose();
        }
    }
    this.disposed = true;

}

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft