Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Speech / Src / Recognition / Choices.cs / 1 / Choices.cs
//------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------
using System.Collections.Generic;
using System.Diagnostics;
using System.Speech.Internal.GrammarBuilding;
using System.Speech.Internal;
namespace System.Speech.Recognition
{
///
///
///
[DebuggerDisplay ("{_oneOf.DebugSummary}")]
public class Choices
{
//*******************************************************************
//
// Constructors
//
//*******************************************************************
#region Constructors
///
///
///
public Choices ()
{
}
///
///
///
///
public Choices (params string [] phrases)
{
Helpers.ThrowIfNull (phrases, "phrases");
Add (phrases);
}
///
///
///
///
public Choices (params GrammarBuilder [] alternateChoices)
{
Helpers.ThrowIfNull (alternateChoices, "alternateChoices");
Add (alternateChoices);
}
#endregion
//********************************************************************
//
// Public Methods
//
//*******************************************************************
#region Public Methods
///
///
///
///
public void Add (params string [] phrases)
{
Helpers.ThrowIfNull (phrases, "phrases");
foreach (string phrase in phrases)
{
Helpers.ThrowIfEmptyOrNull (phrase, "phrase");
_oneOf.Add (phrase);
}
}
///
///
///
///
public void Add (params GrammarBuilder [] alternateChoices)
{
Helpers.ThrowIfNull (alternateChoices, "alternateChoices");
foreach (GrammarBuilder alternateChoice in alternateChoices)
{
Helpers.ThrowIfNull (alternateChoice, "alternateChoice");
_oneOf.Items.Add (new ItemElement (alternateChoice));
}
}
///
/// TODOC
///
///
public GrammarBuilder ToGrammarBuilder ()
{
return new GrammarBuilder (this);
}
#endregion
//********************************************************************
//
// Internal Properties
//
//********************************************************************
#region Internal Properties
internal OneOfElement OneOf
{
get
{
return _oneOf;
}
}
#endregion
//*******************************************************************
//
// Private Fields
//
//********************************************************************
#region Private Fields
private OneOfElement _oneOf = new OneOfElement ();
#endregion
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------
using System.Collections.Generic;
using System.Diagnostics;
using System.Speech.Internal.GrammarBuilding;
using System.Speech.Internal;
namespace System.Speech.Recognition
{
///
///
///
[DebuggerDisplay ("{_oneOf.DebugSummary}")]
public class Choices
{
//*******************************************************************
//
// Constructors
//
//*******************************************************************
#region Constructors
///
///
///
public Choices ()
{
}
///
///
///
///
public Choices (params string [] phrases)
{
Helpers.ThrowIfNull (phrases, "phrases");
Add (phrases);
}
///
///
///
///
public Choices (params GrammarBuilder [] alternateChoices)
{
Helpers.ThrowIfNull (alternateChoices, "alternateChoices");
Add (alternateChoices);
}
#endregion
//********************************************************************
//
// Public Methods
//
//*******************************************************************
#region Public Methods
///
///
///
///
public void Add (params string [] phrases)
{
Helpers.ThrowIfNull (phrases, "phrases");
foreach (string phrase in phrases)
{
Helpers.ThrowIfEmptyOrNull (phrase, "phrase");
_oneOf.Add (phrase);
}
}
///
///
///
///
public void Add (params GrammarBuilder [] alternateChoices)
{
Helpers.ThrowIfNull (alternateChoices, "alternateChoices");
foreach (GrammarBuilder alternateChoice in alternateChoices)
{
Helpers.ThrowIfNull (alternateChoice, "alternateChoice");
_oneOf.Items.Add (new ItemElement (alternateChoice));
}
}
///
/// TODOC
///
///
public GrammarBuilder ToGrammarBuilder ()
{
return new GrammarBuilder (this);
}
#endregion
//********************************************************************
//
// Internal Properties
//
//********************************************************************
#region Internal Properties
internal OneOfElement OneOf
{
get
{
return _oneOf;
}
}
#endregion
//*******************************************************************
//
// Private Fields
//
//********************************************************************
#region Private Fields
private OneOfElement _oneOf = new OneOfElement ();
#endregion
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EventPropertyMap.cs
- WindowCollection.cs
- RawStylusSystemGestureInputReport.cs
- ProgressBar.cs
- VisualCollection.cs
- ProcessRequestArgs.cs
- ExternalFile.cs
- SchemaImporterExtensionsSection.cs
- NetworkAddressChange.cs
- ComponentResourceManager.cs
- ScrollableControl.cs
- CorrelationManager.cs
- NumberFormatInfo.cs
- DetailsViewPagerRow.cs
- CqlGenerator.cs
- DesignConnection.cs
- PrimitiveList.cs
- DefaultExpression.cs
- WrapPanel.cs
- PageThemeParser.cs
- OpenFileDialog.cs
- GlyphTypeface.cs
- DesignerUtils.cs
- CustomWebEventKey.cs
- FormsAuthenticationCredentials.cs
- DataSourceNameHandler.cs
- TextParagraph.cs
- WmfPlaceableFileHeader.cs
- ArgumentOutOfRangeException.cs
- ConfigXmlWhitespace.cs
- WindowsGrip.cs
- XmlQueryTypeFactory.cs
- CalendarDataBindingHandler.cs
- DbUpdateCommandTree.cs
- Exceptions.cs
- FormViewPagerRow.cs
- TagPrefixCollection.cs
- DelimitedListTraceListener.cs
- ComponentResourceKey.cs
- ModifiableIteratorCollection.cs
- MembershipPasswordException.cs
- MimeBasePart.cs
- WindowsContainer.cs
- Stack.cs
- MarshalByRefObject.cs
- OpCellTreeNode.cs
- WebScriptServiceHostFactory.cs
- PathGeometry.cs
- ArcSegment.cs
- HMACMD5.cs
- XXXInfos.cs
- MetabaseSettings.cs
- TextServicesCompartment.cs
- RegisteredArrayDeclaration.cs
- StylusSystemGestureEventArgs.cs
- Parser.cs
- SelectingProviderEventArgs.cs
- TimeManager.cs
- BackStopAuthenticationModule.cs
- NominalTypeEliminator.cs
- SimpleLine.cs
- CompilerParameters.cs
- ConstructorExpr.cs
- ResponseBodyWriter.cs
- behaviorssection.cs
- DataControlFieldHeaderCell.cs
- RayHitTestParameters.cs
- ArraySegment.cs
- CultureInfoConverter.cs
- PtsHelper.cs
- InfoCardRSACryptoProvider.cs
- FormClosingEvent.cs
- ReadOnlyObservableCollection.cs
- ValidationSummary.cs
- SchemaElementLookUpTable.cs
- Region.cs
- LogPolicy.cs
- ExtensionElementCollection.cs
- EntityContainerAssociationSet.cs
- DateTimeOffset.cs
- ConfigurationElement.cs
- HttpHandlerActionCollection.cs
- DbMetaDataColumnNames.cs
- TemplateInstanceAttribute.cs
- WindowsProgressbar.cs
- TreeViewItem.cs
- InvalidCommandTreeException.cs
- CounterCreationData.cs
- RootBrowserWindowAutomationPeer.cs
- WebServiceEnumData.cs
- UnSafeCharBuffer.cs
- TypeHelper.cs
- templategroup.cs
- DataGridViewColumn.cs
- OracleParameterCollection.cs
- GridViewAutomationPeer.cs
- DirectionalLight.cs
- TextCompositionManager.cs
- GrammarBuilderPhrase.cs
- printdlgexmarshaler.cs