Grammar.Loaded Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets whether a Grammar has been loaded by a speech recognizer.
public:
property bool Loaded { bool get(); };
public bool Loaded { get; }
member this.Loaded : bool
Public ReadOnly Property Loaded As Boolean
Property Value
The Loaded
property returns true
if the referenced speech recognition grammar is currently loaded in a speech recognizer; otherwise the property returns false
. The default is false
.
Examples
The following example writes information about a Grammar object to the console.
private static void DumpGrammarStatus(Grammar item)
{
Console.WriteLine("Grammar name is {0}:", item.Name);
Console.WriteLine(" The Grammar {0} loaded.",
item.Loaded ? "is" : "is not");
Console.WriteLine(" The Grammar {0} enabled.",
item.Enabled ? "is" : "is not");
if (item.RuleName != null)
{
Console.WriteLine(" The root rule is {0}.", item.RuleName);
}
else
{
Console.WriteLine(" The Grammar does not specify a root rule.");
}
}
Remarks
Once a Grammar has been loaded, the values of Weight, and Priority cannot be changed.
Applies to
See also
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.