Code:
/ DotNET / DotNET / 8.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RectangleHotSpot.cs
- MDIWindowDialog.cs
- SqlException.cs
- Behavior.cs
- BindStream.cs
- VirtualDirectoryMappingCollection.cs
- XmlSchemaType.cs
- ConfigurationUtility.cs
- PersonalizationState.cs
- Item.cs
- Form.cs
- dbenumerator.cs
- EventMappingSettingsCollection.cs
- AbstractSvcMapFileLoader.cs
- PointAnimationUsingPath.cs
- AssertSection.cs
- AttachedPropertyBrowsableAttribute.cs
- Publisher.cs
- Missing.cs
- SchemaInfo.cs
- Stack.cs
- LogManagementAsyncResult.cs
- CodeSnippetTypeMember.cs
- ObjectDisposedException.cs
- TreeWalkHelper.cs
- DrawingDrawingContext.cs
- HtmlValidationSummaryAdapter.cs
- MarshalDirectiveException.cs
- shaper.cs
- HttpPostedFile.cs
- IgnoreFlushAndCloseStream.cs
- TraceUtils.cs
- HttpBindingExtension.cs
- SqlRetyper.cs
- Typography.cs
- DynamicAttribute.cs
- CultureMapper.cs
- CodeDOMProvider.cs
- PageSetupDialog.cs
- SmiContext.cs
- DataGridViewCellParsingEventArgs.cs
- FileDialog_Vista.cs
- FixUp.cs
- XPathSingletonIterator.cs
- DependencyObject.cs
- PersonalizableTypeEntry.cs
- FlowDocumentView.cs
- DataGridViewIntLinkedList.cs
- DrawingState.cs
- SafeTokenHandle.cs
- _NtlmClient.cs
- MissingMethodException.cs
- SqlProcedureAttribute.cs
- FormsIdentity.cs
- TaiwanCalendar.cs
- UrlMappingsSection.cs
- DataRelation.cs
- UrlMappingsSection.cs
- TimeSpanOrInfiniteConverter.cs
- ListViewUpdateEventArgs.cs
- CodeNamespaceCollection.cs
- HostProtectionPermission.cs
- DataTableReaderListener.cs
- GcHandle.cs
- UnmanagedMarshal.cs
- ReadOnlyActivityGlyph.cs
- NameValuePermission.cs
- securitycriticaldataClass.cs
- PreviewPageInfo.cs
- HMACMD5.cs
- _NegoState.cs
- SqlMethodTransformer.cs
- DynamicPhysicalDiscoSearcher.cs
- XPathExpr.cs
- MediaTimeline.cs
- TimeSpan.cs
- DataGridRowClipboardEventArgs.cs
- DropDownList.cs
- Choices.cs
- ReverseInheritProperty.cs
- ControlValuePropertyAttribute.cs
- ErrorWrapper.cs
- AnnotationHighlightLayer.cs
- ArraySet.cs
- ObjectToModelValueConverter.cs
- OleDbConnectionFactory.cs
- TextAutomationPeer.cs
- ConstrainedDataObject.cs
- MultiByteCodec.cs
- ObjectResult.cs
- NavigateEvent.cs
- QilTernary.cs
- WmpBitmapDecoder.cs
- Byte.cs
- RelationshipSet.cs
- SecurityVersion.cs
- BaseDataListPage.cs
- CodeTypeParameterCollection.cs
- ControlType.cs
- _AutoWebProxyScriptEngine.cs