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
- AvTraceFormat.cs
- TreeNodeBinding.cs
- DrawingContext.cs
- SiteMapSection.cs
- IChannel.cs
- ReversePositionQuery.cs
- XmlSerializableReader.cs
- ModelPropertyCollectionImpl.cs
- BitmapEffectDrawing.cs
- SerializationException.cs
- UserControl.cs
- ProtocolsInstallComponent.cs
- HMAC.cs
- SerializationEventsCache.cs
- AppSettingsExpressionBuilder.cs
- BlobPersonalizationState.cs
- WindowsGraphicsWrapper.cs
- Scene3D.cs
- MatrixValueSerializer.cs
- QualifiedCellIdBoolean.cs
- HttpRuntime.cs
- ListSortDescription.cs
- PrintDialog.cs
- EntityParameterCollection.cs
- ExpressionBuilderContext.cs
- x509utils.cs
- TextEditorSelection.cs
- TextParaClient.cs
- SmtpMail.cs
- ResXDataNode.cs
- MergablePropertyAttribute.cs
- XmlFormatExtensionAttribute.cs
- ImageMetadata.cs
- DataGridViewRowPrePaintEventArgs.cs
- TransformDescriptor.cs
- NodeFunctions.cs
- CommandTreeTypeHelper.cs
- AnnotationResource.cs
- SrgsSubset.cs
- AsyncOperation.cs
- WebSysDefaultValueAttribute.cs
- PanelContainerDesigner.cs
- GroupBoxAutomationPeer.cs
- FaultDesigner.cs
- DbProviderFactories.cs
- PageVisual.cs
- ImageField.cs
- WebPartConnectionsDisconnectVerb.cs
- regiisutil.cs
- SQLInt64.cs
- DSACryptoServiceProvider.cs
- GPPOINT.cs
- BitmapEffectGeneralTransform.cs
- HwndSourceParameters.cs
- SerializableAttribute.cs
- GPRECTF.cs
- RadialGradientBrush.cs
- CalendarDay.cs
- KerberosSecurityTokenAuthenticator.cs
- recordstatefactory.cs
- Condition.cs
- CompositeFontParser.cs
- ZipIOCentralDirectoryFileHeader.cs
- JoinTreeSlot.cs
- BoolExpressionVisitors.cs
- SchemaAttDef.cs
- PrtCap_Public_Simple.cs
- PreservationFileReader.cs
- DependencyObjectType.cs
- ContentTypeSettingClientMessageFormatter.cs
- ThreadLocal.cs
- LineInfo.cs
- SqlDataSourceConfigureSortForm.cs
- CodeVariableDeclarationStatement.cs
- BasicCellRelation.cs
- OdbcConnectionHandle.cs
- ConfigurationLoader.cs
- PrtTicket_Base.cs
- TableDetailsRow.cs
- HttpResponseInternalBase.cs
- ScriptResourceMapping.cs
- ToolStripItemImageRenderEventArgs.cs
- TripleDES.cs
- XhtmlBasicFormAdapter.cs
- BitmapEffectInput.cs
- SliderAutomationPeer.cs
- ToolZone.cs
- StorageScalarPropertyMapping.cs
- MinMaxParagraphWidth.cs
- ColumnMapProcessor.cs
- MeasureData.cs
- TextDecorationCollection.cs
- DataStreams.cs
- FileDialogCustomPlacesCollection.cs
- MexBindingElement.cs
- Int32CollectionConverter.cs
- CatalogZone.cs
- InstanceOwner.cs
- UnmanagedHandle.cs
- TextEditorCopyPaste.cs