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
- Signature.cs
- baseaxisquery.cs
- ListViewPagedDataSource.cs
- FontSizeConverter.cs
- BaseParagraph.cs
- CodeCastExpression.cs
- XmlHierarchicalEnumerable.cs
- Rect.cs
- DataGridViewColumn.cs
- oledbmetadatacollectionnames.cs
- TextServicesCompartmentContext.cs
- SelectedDatesCollection.cs
- ChangeConflicts.cs
- ComponentManagerBroker.cs
- FlowDocumentPaginator.cs
- LayoutDump.cs
- SequentialUshortCollection.cs
- ByteAnimationBase.cs
- FilteredDataSetHelper.cs
- ServiceModelConfigurationSectionCollection.cs
- IssuerInformation.cs
- GridViewPageEventArgs.cs
- EventWaitHandle.cs
- OleDragDropHandler.cs
- InkPresenterAutomationPeer.cs
- DigitShape.cs
- AuthStoreRoleProvider.cs
- COSERVERINFO.cs
- EdmFunctions.cs
- NetworkInformationException.cs
- PenLineJoinValidation.cs
- WmpBitmapDecoder.cs
- LongValidator.cs
- HttpHandlerAction.cs
- Tuple.cs
- PageAdapter.cs
- XmlMemberMapping.cs
- PublisherMembershipCondition.cs
- MessageSecurityOverTcpElement.cs
- NonClientArea.cs
- Exceptions.cs
- PageCodeDomTreeGenerator.cs
- _BaseOverlappedAsyncResult.cs
- SQLInt16.cs
- Paragraph.cs
- Roles.cs
- EdmPropertyAttribute.cs
- InvalidCommandTreeException.cs
- ExpressionEditorAttribute.cs
- AVElementHelper.cs
- ZipIOLocalFileHeader.cs
- FontWeights.cs
- ControlHelper.cs
- ServiceTimeoutsBehavior.cs
- StringSorter.cs
- HostedElements.cs
- HtmlPanelAdapter.cs
- SpecialTypeDataContract.cs
- ToolStripGripRenderEventArgs.cs
- AddressHeaderCollectionElement.cs
- XmlEncodedRawTextWriter.cs
- CodeDirectoryCompiler.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- WebPartUserCapability.cs
- Send.cs
- DataControlFieldCell.cs
- ExpressionVisitor.cs
- XamlPathDataSerializer.cs
- XmlSchemaImporter.cs
- DocumentOutline.cs
- RuntimeWrappedException.cs
- EventSetter.cs
- FilterQueryOptionExpression.cs
- TreeViewImageKeyConverter.cs
- CatalogZone.cs
- Shape.cs
- SchemaElementDecl.cs
- ExpressionEditorAttribute.cs
- NGCPageContentCollectionSerializerAsync.cs
- XamlRtfConverter.cs
- DataPagerFieldCollection.cs
- SymbolType.cs
- TraceInternal.cs
- MdiWindowListStrip.cs
- UIntPtr.cs
- ListView.cs
- SpeechRecognitionEngine.cs
- TogglePatternIdentifiers.cs
- RectAnimationBase.cs
- Dispatcher.cs
- ModulesEntry.cs
- TraceProvider.cs
- AudioFileOut.cs
- AtomPub10ServiceDocumentFormatter.cs
- TransactionScope.cs
- CryptoHandle.cs
- LinkArea.cs
- ConversionContext.cs
- ListItemCollection.cs
- WinInet.cs