Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / 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. // //----------------------------------------------------------------- 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SmtpFailedRecipientsException.cs
- OleDbReferenceCollection.cs
- VersionedStreamOwner.cs
- IdnMapping.cs
- ReadOnlyCollectionBase.cs
- ValueConversionAttribute.cs
- MethodAccessException.cs
- SoapFault.cs
- SQLUtility.cs
- PersistChildrenAttribute.cs
- InternalConfigSettingsFactory.cs
- Validator.cs
- Int32EqualityComparer.cs
- ToolStripItemEventArgs.cs
- DataBindingCollection.cs
- Soap.cs
- StackOverflowException.cs
- BindUriHelper.cs
- SwitchDesigner.xaml.cs
- WebReferencesBuildProvider.cs
- BypassElement.cs
- VBCodeProvider.cs
- ExtenderProvidedPropertyAttribute.cs
- OdbcEnvironmentHandle.cs
- ErrorFormatterPage.cs
- DefaultTraceListener.cs
- JsonFormatGeneratorStatics.cs
- ProvidersHelper.cs
- FreezableDefaultValueFactory.cs
- SectionRecord.cs
- CookielessHelper.cs
- MenuScrollingVisibilityConverter.cs
- Byte.cs
- AssemblyInfo.cs
- TextElementAutomationPeer.cs
- FontCacheLogic.cs
- Int32RectValueSerializer.cs
- HtmlHistory.cs
- LocalsItemDescription.cs
- KnownBoxes.cs
- HorizontalAlignConverter.cs
- EventRouteFactory.cs
- PropertyRecord.cs
- WeakHashtable.cs
- AmbientLight.cs
- MobileListItem.cs
- PreviewPageInfo.cs
- PageTheme.cs
- IteratorFilter.cs
- CallId.cs
- SqlTypesSchemaImporter.cs
- PathFigureCollection.cs
- AsyncResult.cs
- ServiceModelEnumValidator.cs
- BitmapDecoder.cs
- TrackingMemoryStreamFactory.cs
- LayoutExceptionEventArgs.cs
- ResourceDescriptionAttribute.cs
- DataPagerFieldCommandEventArgs.cs
- PipelineModuleStepContainer.cs
- DataChangedEventManager.cs
- CopyCodeAction.cs
- DataGridViewElement.cs
- CustomSignedXml.cs
- DesignerPerfEventProvider.cs
- GreenMethods.cs
- PrintController.cs
- EtwTrace.cs
- ErrorWrapper.cs
- XmlSchemaSubstitutionGroup.cs
- PageParser.cs
- ItemCollection.cs
- PropertyPushdownHelper.cs
- ItemsPresenter.cs
- NavigationProperty.cs
- PowerStatus.cs
- PageEventArgs.cs
- ApplicationCommands.cs
- EventLog.cs
- SimpleRecyclingCache.cs
- DataRow.cs
- JournalNavigationScope.cs
- DefaultWorkflowSchedulerService.cs
- ContentElement.cs
- ComboBoxItem.cs
- Floater.cs
- CompiledQuery.cs
- RootBrowserWindowProxy.cs
- BaseParaClient.cs
- SingleTagSectionHandler.cs
- SecurityTokenProviderContainer.cs
- StructuralObject.cs
- HashSetDebugView.cs
- TableColumnCollection.cs
- Panel.cs
- Parameter.cs
- NotSupportedException.cs
- SynchronizedReadOnlyCollection.cs
- AppDomainManager.cs
- DefaultEventAttribute.cs