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
- WebPartZoneCollection.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- XamlReaderHelper.cs
- DomainLiteralReader.cs
- ResourceReferenceExpressionConverter.cs
- SubstitutionList.cs
- TempFiles.cs
- FastEncoder.cs
- Point3DAnimationBase.cs
- LiteralDesigner.cs
- clipboard.cs
- DbProviderFactory.cs
- ResetableIterator.cs
- EventMappingSettingsCollection.cs
- DiffuseMaterial.cs
- NameScope.cs
- Timer.cs
- WebBaseEventKeyComparer.cs
- IteratorFilter.cs
- UnitySerializationHolder.cs
- PolyBezierSegment.cs
- TreeWalker.cs
- ConnectionsZone.cs
- RuleInfoComparer.cs
- HotSpot.cs
- ConnectionPointConverter.cs
- StylusPlugin.cs
- UnknownBitmapDecoder.cs
- SeekStoryboard.cs
- DefaultEventAttribute.cs
- DataSourceSelectArguments.cs
- ResourcePool.cs
- ControlCodeDomSerializer.cs
- ErrorReporting.cs
- ListControl.cs
- PriorityBinding.cs
- ApplicationHost.cs
- HttpModulesSection.cs
- FlowDocumentFormatter.cs
- DiscoveryVersionConverter.cs
- XmlSchemaComplexContentRestriction.cs
- ImageAttributes.cs
- ToolStripDropDownMenu.cs
- ReadOnlyCollectionBuilder.cs
- WebBaseEventKeyComparer.cs
- HighlightVisual.cs
- FormViewInsertedEventArgs.cs
- Base64Encoder.cs
- PropertiesTab.cs
- HybridObjectCache.cs
- ExternalException.cs
- FrameworkContextData.cs
- SchemaElementLookUpTableEnumerator.cs
- COM2PictureConverter.cs
- WebPartUtil.cs
- SimpleFieldTemplateUserControl.cs
- FontStyle.cs
- WebControlAdapter.cs
- DashStyle.cs
- GridProviderWrapper.cs
- WindowsRichEdit.cs
- SelectionItemProviderWrapper.cs
- SamlAuthorityBinding.cs
- NameValueCollection.cs
- ThreadExceptionEvent.cs
- XmlSiteMapProvider.cs
- OutputCacheProfileCollection.cs
- SQLInt32Storage.cs
- OpenCollectionAsyncResult.cs
- WebEvents.cs
- RootBuilder.cs
- XmlEncoding.cs
- HashCodeCombiner.cs
- DeclarativeConditionsCollection.cs
- Model3DGroup.cs
- _SafeNetHandles.cs
- DataPagerFieldCommandEventArgs.cs
- LambdaCompiler.Unary.cs
- HyperLinkDesigner.cs
- TrueReadOnlyCollection.cs
- HMACMD5.cs
- CommandLibraryHelper.cs
- HttpContextServiceHost.cs
- SymbolTable.cs
- EmptyEnumerator.cs
- WebPartDescription.cs
- FontCollection.cs
- PipelineModuleStepContainer.cs
- PlatformCulture.cs
- ComplexPropertyEntry.cs
- CellConstantDomain.cs
- SystemFonts.cs
- ProvidersHelper.cs
- HtmlTableCell.cs
- UrlMappingsSection.cs
- HttpRuntime.cs
- SizeAnimationUsingKeyFrames.cs
- RoutedEventHandlerInfo.cs
- RetrieveVirtualItemEventArgs.cs
- CustomValidator.cs