Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion xml/System.ServiceModel.Channels/ReceiveContext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<format type="text/markdown"><![CDATA[

## Remarks
<xref:System.ServiceModel.Channels.ReceiveContext.Abandon%2A> may hang when there is an ambient transaction and <xref:System.ServiceModel.Channels.ReceiveContext.Complete%2A> is called and afterwards the transaction is rolled back. If <xref:System.ServiceModel.Channels.ReceiveContext.Abandon%2A> is called prior to the transaction rollback completing, a race condition will exist, causing the call to <xref:System.ServiceModel.Channels.ReceiveContext.Abandon%2A> to hang. This can be illustrated by the following pseudo-code example
<xref:System.ServiceModel.Channels.ReceiveContext.Abandon%2A> may stop responding when there is an ambient transaction and <xref:System.ServiceModel.Channels.ReceiveContext.Complete%2A> is called and afterwards the transaction is rolled back. If <xref:System.ServiceModel.Channels.ReceiveContext.Abandon%2A> is called prior to the transaction rollback completing, a race condition will exist, causing the call to <xref:System.ServiceModel.Channels.ReceiveContext.Abandon%2A> to stop responding. This can be illustrated by the following pseudo-code example

```
using (TransactionScope ts = new TransactionScope())
Expand Down
4 changes: 2 additions & 2 deletions xml/System.Speech.Recognition.SrgsGrammar/SrgsDocument.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public void WorldSoccerWinners ()
```csharp
GrammarBuilder builder = null;

// Create new Choices objects and add countries, and create GrammarBuilder objects.
// Create new Choices objects and add countries/regions, and create GrammarBuilder objects.
Choices choicesEurope = new Choices(new string[] { "England", "France", "Germany", "Italy" });
GrammarBuilder europe = new GrammarBuilder(choicesEurope);

Expand Down Expand Up @@ -655,7 +655,7 @@ document.Root = winnerRule;


## Examples
The following example creates a grammar that recognizes the phrase "A nation that has won the World Cup is" followed by the name of a country that has won the World Cup. The example creates an <xref:System.Speech.Recognition.SrgsGrammar.SrgsDocument> object, and then creates a public rule named `winnerRule`. After adding a string to the rule `winnerRule`, the example creates two more rules (`ruleEurope` and `ruleSAmerica`), each containing a list of countries/regions. Using the <xref:System.Speech.Recognition.SrgsGrammar.SrgsRulesCollection.Add%2A> method, the example adds all three rules (`winnerRule`, `ruleEurope`, and `ruleSAmerica`) to the <xref:System.Speech.Recognition.SrgsGrammar.SrgsDocument.Rules%2A> property of the <xref:System.Speech.Recognition.SrgsGrammar.SrgsDocument>.
The following example creates a grammar that recognizes the phrase "A nation that has won the World Cup is" followed by the name of a country/region that has won the World Cup. The example creates an <xref:System.Speech.Recognition.SrgsGrammar.SrgsDocument> object, and then creates a public rule named `winnerRule`. After adding a string to the rule `winnerRule`, the example creates two more rules (`ruleEurope` and `ruleSAmerica`), each containing a list of countries/regions. Using the <xref:System.Speech.Recognition.SrgsGrammar.SrgsRulesCollection.Add%2A> method, the example adds all three rules (`winnerRule`, `ruleEurope`, and `ruleSAmerica`) to the <xref:System.Speech.Recognition.SrgsGrammar.SrgsDocument.Rules%2A> property of the <xref:System.Speech.Recognition.SrgsGrammar.SrgsDocument>.

```csharp
public void WorldSoccerWinners ()
Expand Down
8 changes: 4 additions & 4 deletions xml/System.Speech.Recognition.SrgsGrammar/SrgsOneOf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<format type="text/markdown"><![CDATA[

## Examples
The following example uses the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> element to build lists of <xref:System.Speech.Recognition.SrgsGrammar.SrgsItem> elements containing country/region names, any one of which may be used to recognize the containing phrase. The example then adds one of the resulting <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> objects to their respective rules for European countries and South American countries. Further on, the example uses the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> object to group rule references to `ruleEurope` and `ruleSAmerica` into a list of two alternatives, either one of which may be used to recognize spoken input.
The following example uses the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> element to build lists of <xref:System.Speech.Recognition.SrgsGrammar.SrgsItem> elements containing country/region names, any one of which may be used to recognize the containing phrase. The example then adds one of the resulting <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> objects to their respective rules for European and South American countries/regions. Further on, the example uses the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> object to group rule references to `ruleEurope` and `ruleSAmerica` into a list of two alternatives, either one of which may be used to recognize spoken input.

```
public void WorldSoccerWinners ()
Expand Down Expand Up @@ -148,7 +148,7 @@ public void WorldSoccerWinners ()
<format type="text/markdown"><![CDATA[

## Examples
The following example creates a grammar that recognizes the phrase "A nation that has won the World Cup is" followed by the name of a country that has won the World Cup. It creates a public rule named `WorldCupWinner`. It then creates two <xref:System.Speech.Recognition.SrgsGrammar.SrgsRule> objects using <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> objects that contain arrays of new <xref:System.Speech.Recognition.SrgsGrammar.SrgsItem> objects. To see the grammar that this example generates, see <xref:System.Speech.Recognition.SrgsGrammar.SrgsRule.%23ctor%2A>.
The following example creates a grammar that recognizes the phrase "A nation that has won the World Cup is" followed by the name of a country/region that has won the World Cup. It creates a public rule named `WorldCupWinner`. It then creates two <xref:System.Speech.Recognition.SrgsGrammar.SrgsRule> objects using <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> objects that contain arrays of new <xref:System.Speech.Recognition.SrgsGrammar.SrgsItem> objects. To see the grammar that this example generates, see <xref:System.Speech.Recognition.SrgsGrammar.SrgsRule.%23ctor%2A>.

```csharp
public void WorldSoccerWinners ()
Expand Down Expand Up @@ -220,7 +220,7 @@ public void WorldSoccerWinners ()
<format type="text/markdown"><![CDATA[

## Examples
The following example creates a grammar that recognizes the phrase "A nation that has won the World Cup is" followed by the name of a country that has won the World Cup. The example uses the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> element to build lists of acceptable country names from an array of <xref:System.String> objects. The example then adds one of the resulting <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> objects to their respective rules for European countries and South American countries.
The following example creates a grammar that recognizes the phrase "A nation that has won the World Cup is" followed by the name of a country/region that has won the World Cup. The example uses the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> element to build lists of acceptable country/region names from an array of <xref:System.String> objects. The example then adds one of the resulting <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> objects to their respective rules for European and South American countries/regions.

```
public void WorldSoccerWinners ()
Expand Down Expand Up @@ -288,7 +288,7 @@ public void WorldSoccerWinners ()
<format type="text/markdown"><![CDATA[

## Examples
The following example creates a grammar that recognizes the phrase "A nation that has won the World Cup is" followed by the name of a country that has won the World Cup. The example uses the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> object to build lists of acceptable country names from an array of <xref:System.Speech.Recognition.SrgsGrammar.SrgsItem> objects. Using the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf.Add%2A> method, the example appends an <xref:System.Speech.Recognition.SrgsGrammar.SrgsItem> that contains the string "Italy" to the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> object `oneOfEurope`.
The following example creates a grammar that recognizes the phrase "A nation that has won the World Cup is" followed by the name of a country/region that has won the World Cup. The example uses the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> object to build lists of acceptable country/region names from an array of <xref:System.Speech.Recognition.SrgsGrammar.SrgsItem> objects. Using the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf.Add%2A> method, the example appends an <xref:System.Speech.Recognition.SrgsGrammar.SrgsItem> that contains the string "Italy" to the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> object `oneOfEurope`.

```
public void WorldSoccerWinners ()
Expand Down