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
- WindowsListView.cs
- UserControl.cs
- MemberRelationshipService.cs
- TrustManager.cs
- CLSCompliantAttribute.cs
- NetworkInformationPermission.cs
- Label.cs
- SystemNetHelpers.cs
- ReturnEventArgs.cs
- XmlNamespaceManager.cs
- LiteralTextContainerControlBuilder.cs
- UrlAuthorizationModule.cs
- ILGenerator.cs
- ThousandthOfEmRealPoints.cs
- AsymmetricCryptoHandle.cs
- WebBrowserNavigatingEventHandler.cs
- MultidimensionalArrayItemReference.cs
- RegexMatch.cs
- ApplicationInfo.cs
- Encoding.cs
- PackageDocument.cs
- WpfPayload.cs
- DataGridViewCheckBoxColumn.cs
- FormatterConverter.cs
- CheckBoxRenderer.cs
- PolyBezierSegmentFigureLogic.cs
- ProfilePropertySettings.cs
- DataTableReaderListener.cs
- SiteMapProvider.cs
- SolidColorBrush.cs
- ResXFileRef.cs
- SmtpNetworkElement.cs
- coordinatorscratchpad.cs
- NullableConverter.cs
- MonikerProxyAttribute.cs
- SystemTcpConnection.cs
- TypeLibraryHelper.cs
- SiteMapPathDesigner.cs
- DesignerWithHeader.cs
- Rect.cs
- GridViewRowEventArgs.cs
- UnicastIPAddressInformationCollection.cs
- HtmlTitle.cs
- ControlBuilderAttribute.cs
- ellipse.cs
- SHA512Managed.cs
- PseudoWebRequest.cs
- NonParentingControl.cs
- XPathNodeHelper.cs
- DataBoundControl.cs
- Hex.cs
- GeneralTransform.cs
- SiteMapPath.cs
- _SslSessionsCache.cs
- TextParagraphCache.cs
- FixedDSBuilder.cs
- ExpressionPrinter.cs
- CreatingCookieEventArgs.cs
- FontNamesConverter.cs
- CustomPeerResolverService.cs
- OrderPreservingPipeliningMergeHelper.cs
- CopyNamespacesAction.cs
- WmiEventSink.cs
- GroupLabel.cs
- WebServiceErrorEvent.cs
- Container.cs
- CDSCollectionETWBCLProvider.cs
- DbResourceAllocator.cs
- ITreeGenerator.cs
- ExpandoClass.cs
- NegotiateStream.cs
- ImageListUtils.cs
- PropertyRecord.cs
- DomNameTable.cs
- ServerValidateEventArgs.cs
- RuntimeTransactionHandle.cs
- DataRecord.cs
- ScriptingAuthenticationServiceSection.cs
- BufferedMessageWriter.cs
- CellTreeNodeVisitors.cs
- AsymmetricKeyExchangeDeformatter.cs
- ConfigurationElement.cs
- TableSectionStyle.cs
- PermissionSetEnumerator.cs
- DuplicateWaitObjectException.cs
- ResourceProviderFactory.cs
- Memoizer.cs
- Vector3DCollection.cs
- FontCacheUtil.cs
- WebPartEditorCancelVerb.cs
- AsymmetricKeyExchangeFormatter.cs
- AssociationType.cs
- BindableAttribute.cs
- FixedLineResult.cs
- IntersectQueryOperator.cs
- ObjectDataSourceFilteringEventArgs.cs
- VectorConverter.cs
- NullRuntimeConfig.cs
- Encoder.cs
- XmlSchemaSequence.cs