|
45 | 45 |
|
46 | 46 | The grammar's <xref:System.Speech.Recognition.Grammar.SpeechRecognized> event is raised when input matches a path through the grammar. |
47 | 47 |
|
| 48 | +[!INCLUDE [untrusted-data-instance-note](~/includes/untrusted-data-instance-note.md)] |
| 49 | +
|
48 | 50 | > [!NOTE] |
49 | | -> It is a best practice to verify the safety of any URI or DLL used to build a <xref:System.Speech.Recognition.Grammar> object. |
50 | | -> |
51 | 51 | > Windows and the Speech platform provide security for applications constructing a <xref:System.Speech.Recognition.Grammar> instance from a DLL or from a grammar that supports scripting. |
52 | 52 | > |
53 | 53 | > Scripts in <xref:System.Speech.Recognition.Grammar> objects are always run as if downloaded from a web page in the `Internet Zone`. The Common Language Runtime (CLR) isolates any DLL loaded to obtain a grammar definition. |
@@ -944,6 +944,7 @@ private static Grammar CreateGrammarFromFile2() |
944 | 944 |
|
945 | 945 | This constructor does not validate `baseUri`. However, the `LoadGrammar` method of a <xref:System.Speech.Recognition.SpeechRecognitionEngine> or <xref:System.Speech.Recognition.SpeechRecognizer> object throws an exception if it cannot resolve all of the rule references in the grammar description. If `baseUri` is not `null`, the `LoadGrammar` method uses the URI to resolve any rule references that it cannot otherwise resolve. If `baseUri` represents a file, then the `LoadGrammar` uses both the designated file and the file's directory when it attempts to resolve relative rule references. |
946 | 946 |
|
| 947 | +[!INCLUDE [untrusted-data-instance-note](~/includes/untrusted-data-instance-note.md)] |
947 | 948 |
|
948 | 949 |
|
949 | 950 | ## Examples |
@@ -1112,7 +1113,7 @@ private static Grammar CreateGrammarFromStream3() |
1112 | 1113 |
|
1113 | 1114 | This constructor does not validate `baseUri`. However, the `LoadGrammar` method of a <xref:System.Speech.Recognition.SpeechRecognitionEngine> or <xref:System.Speech.Recognition.SpeechRecognizer> object throws an exception if it cannot resolve all of the rule references in the grammar description. If `baseUri` is not `null`, the `LoadGrammar` method uses the URI to resolve any rule references that it cannot otherwise resolve. If `baseUri` represents a file, then the `LoadGrammar` method uses both the designated file and the file's directory when it attempts to resolve relative rule references. |
1114 | 1115 |
|
1115 | | -
|
| 1116 | +[!INCLUDE [untrusted-data-instance-note](~/includes/untrusted-data-instance-note.md)] |
1116 | 1117 |
|
1117 | 1118 | ## Examples |
1118 | 1119 | The following example creates a speech recognition grammar in an <xref:System.Speech.Recognition.SrgsGrammar.SrgsDocument> that contains a relative rule reference to the cities.xml file, and specifies a URI to use to resolve the rule reference. The content of the cities.xml file appears in the XML example that follows the C# example. |
@@ -1276,6 +1277,8 @@ private static Grammar CreateSrgsDocumentGrammar3() |
1276 | 1277 | ## Remarks |
1277 | 1278 | Parameters for an initialization handler may also be specified. |
1278 | 1279 |
|
| 1280 | +[!INCLUDE [untrusted-data-instance-note](~/includes/untrusted-data-instance-note.md)] |
| 1281 | +
|
1279 | 1282 | ]]></format> |
1280 | 1283 | </remarks> |
1281 | 1284 | <exception cref="T:System.ArgumentException">- Any of the parameters contain an invalid value. |
@@ -1329,6 +1332,8 @@ private static Grammar CreateSrgsDocumentGrammar3() |
1329 | 1332 | ## Remarks |
1330 | 1333 | Parameters for an initialization handler may also be specified. |
1331 | 1334 |
|
| 1335 | +[!INCLUDE [untrusted-data-instance-note](~/includes/untrusted-data-instance-note.md)] |
| 1336 | +
|
1332 | 1337 | ]]></format> |
1333 | 1338 | </remarks> |
1334 | 1339 | <exception cref="T:System.ArgumentException">- Any of the parameters contain an invalid value. |
|
0 commit comments