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
- PolicyLevel.cs
- BinaryReader.cs
- ColorMap.cs
- ValidationUtility.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- PropertyOrder.cs
- ServiceDescriptionImporter.cs
- ConnectionStringsExpressionEditor.cs
- NullableFloatMinMaxAggregationOperator.cs
- StyleHelper.cs
- SoapRpcMethodAttribute.cs
- Shape.cs
- SrgsElementFactory.cs
- TimeSpanMinutesConverter.cs
- FileDialogCustomPlace.cs
- MetaChildrenColumn.cs
- TransformerTypeCollection.cs
- TemplateManager.cs
- AppSettingsExpressionBuilder.cs
- Decimal.cs
- x509utils.cs
- ListInitExpression.cs
- ListViewAutomationPeer.cs
- Privilege.cs
- DataSourceXmlSubItemAttribute.cs
- cookie.cs
- WinEventTracker.cs
- PageVisual.cs
- WebPartMenuStyle.cs
- XmlWriterSettings.cs
- ServiceHttpHandlerFactory.cs
- TdsEnums.cs
- FunctionNode.cs
- FixUpCollection.cs
- RequestSecurityTokenResponse.cs
- XmlLanguageConverter.cs
- EncoderBestFitFallback.cs
- dataSvcMapFileLoader.cs
- Library.cs
- SecurityTokenTypes.cs
- DataBindingExpressionBuilder.cs
- Comparer.cs
- safelink.cs
- CompilationRelaxations.cs
- Roles.cs
- NavigationWindowAutomationPeer.cs
- StoreContentChangedEventArgs.cs
- DataTableReader.cs
- CustomValidator.cs
- InvalidPrinterException.cs
- QuestionEventArgs.cs
- MessageDecoder.cs
- TextInfo.cs
- WebPartHeaderCloseVerb.cs
- StylusShape.cs
- _Win32.cs
- TaskExtensions.cs
- CardSpaceSelector.cs
- ButtonColumn.cs
- ModelItemCollectionImpl.cs
- Control.cs
- SafeRegistryHandle.cs
- TaskForm.cs
- Error.cs
- Section.cs
- cryptoapiTransform.cs
- OutOfMemoryException.cs
- CounterSample.cs
- XamlDesignerSerializationManager.cs
- AsymmetricCryptoHandle.cs
- TextParentUndoUnit.cs
- HttpModuleAction.cs
- EditorBrowsableAttribute.cs
- SchemaEntity.cs
- EventDescriptor.cs
- ZipIOExtraFieldPaddingElement.cs
- WebPartDescription.cs
- HttpConfigurationSystem.cs
- DataGridViewCellPaintingEventArgs.cs
- _CacheStreams.cs
- HtmlCalendarAdapter.cs
- StringDictionaryEditor.cs
- TextServicesDisplayAttributePropertyRanges.cs
- _UncName.cs
- cryptoapiTransform.cs
- ClientConvert.cs
- IteratorAsyncResult.cs
- Condition.cs
- CompilationSection.cs
- ToolStripLabel.cs
- Util.cs
- DispatchChannelSink.cs
- Style.cs
- Roles.cs
- FillBehavior.cs
- BufferedStream.cs
- ControlUtil.cs
- Win32Exception.cs
- ScriptRegistrationManager.cs
- CompositeCollectionView.cs