Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / 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
- AttachmentService.cs
- ObjectListFieldsPage.cs
- Context.cs
- PixelFormat.cs
- AnnotationMap.cs
- DataBoundControl.cs
- SettingsPropertyValueCollection.cs
- MultiSelector.cs
- TabletDevice.cs
- CellRelation.cs
- FontCacheLogic.cs
- RecordsAffectedEventArgs.cs
- _BaseOverlappedAsyncResult.cs
- DoubleAnimation.cs
- QuaternionKeyFrameCollection.cs
- BasicKeyConstraint.cs
- KeyInfo.cs
- WindowAutomationPeer.cs
- HandleCollector.cs
- EncryptedType.cs
- HtmlInputButton.cs
- Deflater.cs
- NetworkStream.cs
- RowToParametersTransformer.cs
- TypeCollectionPropertyEditor.cs
- IdSpace.cs
- InkCanvasSelection.cs
- MultiView.cs
- FileAuthorizationModule.cs
- XmlAttributeCollection.cs
- HwndHostAutomationPeer.cs
- Vector3dCollection.cs
- TransformerConfigurationWizardBase.cs
- SerializationException.cs
- OdbcReferenceCollection.cs
- UrlMapping.cs
- SplitterEvent.cs
- PerformanceCounterPermissionEntryCollection.cs
- XmlSecureResolver.cs
- BitmapCodecInfoInternal.cs
- SHA512CryptoServiceProvider.cs
- altserialization.cs
- ToolStripItemDesigner.cs
- ExpandoClass.cs
- CacheVirtualItemsEvent.cs
- HtmlInputImage.cs
- ServiceProviders.cs
- KeyValueInternalCollection.cs
- XsdCachingReader.cs
- SortKey.cs
- UpDownBase.cs
- InplaceBitmapMetadataWriter.cs
- FlowDocumentReaderAutomationPeer.cs
- GatewayDefinition.cs
- PropertyMapper.cs
- ActiveXHost.cs
- LayoutTableCell.cs
- QueryOpcode.cs
- RNGCryptoServiceProvider.cs
- HtmlGenericControl.cs
- ASCIIEncoding.cs
- IxmlLineInfo.cs
- BinHexDecoder.cs
- HtmlDocument.cs
- NamespaceInfo.cs
- StylusCollection.cs
- RegexParser.cs
- TcpActivation.cs
- MessageAction.cs
- WindowsGrip.cs
- WebHostScriptMappingsInstallComponent.cs
- Models.cs
- TextEffect.cs
- TextFormatterContext.cs
- SessionEndingCancelEventArgs.cs
- PartialCachingControl.cs
- ComponentResourceKeyConverter.cs
- ExpandButtonVisibilityConverter.cs
- InheritanceAttribute.cs
- IgnoreDataMemberAttribute.cs
- DataSourceSelectArguments.cs
- DataTableCollection.cs
- StatusStrip.cs
- XmlSchemaDocumentation.cs
- ContractMethodInfo.cs
- LicenseException.cs
- _SslState.cs
- CookieHandler.cs
- DesignerSerializationOptionsAttribute.cs
- HebrewCalendar.cs
- SimpleWebHandlerParser.cs
- DesignerVerb.cs
- Parameter.cs
- Message.cs
- QueryExtender.cs
- SymbolEqualComparer.cs
- TextTreeDeleteContentUndoUnit.cs
- SoapObjectInfo.cs
- TablePatternIdentifiers.cs
- ConfigurationErrorsException.cs