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
- IncrementalHitTester.cs
- ToolStripSplitButton.cs
- TextParaClient.cs
- MachineKeyConverter.cs
- isolationinterop.cs
- ComboBoxRenderer.cs
- HttpDictionary.cs
- ObjectStateFormatter.cs
- WrapPanel.cs
- ButtonBaseAutomationPeer.cs
- InputBuffer.cs
- SingleAnimationUsingKeyFrames.cs
- EntityContainer.cs
- ToolStripScrollButton.cs
- ObjectIDGenerator.cs
- ProfileSection.cs
- ScrollItemPatternIdentifiers.cs
- DiagnosticsConfigurationHandler.cs
- XmlHierarchyData.cs
- MemberHolder.cs
- ReadOnlyAttribute.cs
- PngBitmapDecoder.cs
- UriTemplateTable.cs
- Endpoint.cs
- brushes.cs
- TimeManager.cs
- AnnouncementEventArgs.cs
- SqlSelectStatement.cs
- EntityParameter.cs
- XmlComment.cs
- RubberbandSelector.cs
- CharacterMetrics.cs
- MimeBasePart.cs
- ObservableCollection.cs
- PropertyChangingEventArgs.cs
- RegexTree.cs
- ErrorWebPart.cs
- DbExpressionVisitor.cs
- DataSourceProvider.cs
- EventsTab.cs
- BinaryUtilClasses.cs
- FormViewUpdateEventArgs.cs
- ScriptingProfileServiceSection.cs
- JsonClassDataContract.cs
- SamlDoNotCacheCondition.cs
- XmlTypeMapping.cs
- Attributes.cs
- CrossSiteScriptingValidation.cs
- QueryOptionExpression.cs
- SynchronizedReadOnlyCollection.cs
- TypeExtensionConverter.cs
- MultiView.cs
- PropertyChangingEventArgs.cs
- BitmapDecoder.cs
- Semaphore.cs
- ResetableIterator.cs
- ProfessionalColorTable.cs
- sqlstateclientmanager.cs
- QueryInterceptorAttribute.cs
- StickyNote.cs
- safemediahandle.cs
- ParameterBuilder.cs
- Facet.cs
- NamespaceMapping.cs
- LayoutEngine.cs
- BindingList.cs
- WorkflowApplicationUnhandledExceptionEventArgs.cs
- ParseElement.cs
- Debugger.cs
- ProfileInfo.cs
- webbrowsersite.cs
- GeometryHitTestParameters.cs
- SettingsPropertyValueCollection.cs
- RootBrowserWindowAutomationPeer.cs
- DataContractJsonSerializer.cs
- DesignTimeTemplateParser.cs
- TypeResolvingOptionsAttribute.cs
- SQLBinary.cs
- DoubleAnimationClockResource.cs
- RSACryptoServiceProvider.cs
- TypeConverterHelper.cs
- MeasureItemEvent.cs
- CalendarDayButton.cs
- ObjectSecurity.cs
- StructuredCompositeActivityDesigner.cs
- WorkflowViewStateService.cs
- oledbmetadatacollectionnames.cs
- Decimal.cs
- XmlSchemaSimpleContentRestriction.cs
- SystemWebCachingSectionGroup.cs
- ListItemCollection.cs
- PerformanceCountersElement.cs
- OnOperation.cs
- DiagnosticTraceRecords.cs
- NativeObjectSecurity.cs
- EntityDesignerDataSourceView.cs
- Mapping.cs
- ReachSerializer.cs
- XPathQilFactory.cs
- DbInsertCommandTree.cs