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
- PageTheme.cs
- ZipArchive.cs
- HwndSource.cs
- UndoManager.cs
- ModuleBuilder.cs
- ToolStripContainer.cs
- SignedXml.cs
- RichTextBoxDesigner.cs
- CodeEventReferenceExpression.cs
- sqlnorm.cs
- InvokeBase.cs
- DataRelationPropertyDescriptor.cs
- MetadataCache.cs
- SortFieldComparer.cs
- DataGridBoundColumn.cs
- MimeMultiPart.cs
- Sentence.cs
- WindowsRichEditRange.cs
- OracleRowUpdatingEventArgs.cs
- CodeAttributeArgumentCollection.cs
- VoiceSynthesis.cs
- CodeObjectCreateExpression.cs
- XmlSchemaProviderAttribute.cs
- RuntimeArgumentHandle.cs
- Win32KeyboardDevice.cs
- EnlistmentState.cs
- AVElementHelper.cs
- BitmapEffectGroup.cs
- CharConverter.cs
- DataGridParentRows.cs
- ToolStripItemDataObject.cs
- AddInController.cs
- HtmlHead.cs
- StylusDownEventArgs.cs
- PageSettings.cs
- PathFigure.cs
- SQLBytesStorage.cs
- RSAOAEPKeyExchangeFormatter.cs
- DataTableTypeConverter.cs
- ByteRangeDownloader.cs
- PolicyLevel.cs
- TCPListener.cs
- SourceCollection.cs
- BCryptSafeHandles.cs
- NavigationExpr.cs
- EnvelopedPkcs7.cs
- MethodBuilderInstantiation.cs
- ServiceHostFactory.cs
- ProcessModuleCollection.cs
- AllMembershipCondition.cs
- InheritanceUI.cs
- StatusBarDrawItemEvent.cs
- DataGridTemplateColumn.cs
- Resources.Designer.cs
- PreviewPageInfo.cs
- ToolZoneDesigner.cs
- FormView.cs
- TdsParserHelperClasses.cs
- TextTreeFixupNode.cs
- Pointer.cs
- StatusStrip.cs
- PackageDigitalSignatureManager.cs
- SocketAddress.cs
- CodeTypeMember.cs
- DefaultDialogButtons.cs
- XmlIgnoreAttribute.cs
- CatalogZoneBase.cs
- CompositeKey.cs
- BooleanStorage.cs
- WindowsSysHeader.cs
- EncryptedKey.cs
- TransportContext.cs
- DurationConverter.cs
- AssemblyBuilder.cs
- XmlNodeComparer.cs
- Typeface.cs
- IgnoreFlushAndCloseStream.cs
- Matrix3DStack.cs
- XmlAttribute.cs
- ConsoleEntryPoint.cs
- SchemaCollectionPreprocessor.cs
- DataSourceExpressionCollection.cs
- KernelTypeValidation.cs
- FormsAuthenticationUser.cs
- SqlRewriteScalarSubqueries.cs
- GenericPrincipal.cs
- RealProxy.cs
- Deserializer.cs
- EventDescriptorCollection.cs
- StaticDataManager.cs
- WebPartExportVerb.cs
- DefinitionBase.cs
- Publisher.cs
- InheritanceContextChangedEventManager.cs
- DependencyPropertyChangedEventArgs.cs
- PerformanceCounterPermissionEntryCollection.cs
- SystemInfo.cs
- FontCacheUtil.cs
- ToolStripEditorManager.cs
- FtpCachePolicyElement.cs