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
- AssemblyAttributes.cs
- RenderingBiasValidation.cs
- Stylesheet.cs
- invalidudtexception.cs
- HttpRawResponse.cs
- DataGridTextBox.cs
- ErrorsHelper.cs
- CustomAttribute.cs
- Debug.cs
- ToolStripItem.cs
- SettingsPropertyValue.cs
- SchemaMerger.cs
- SafeArrayRankMismatchException.cs
- FileUtil.cs
- VisualStyleInformation.cs
- SafePEFileHandle.cs
- CodeMethodReturnStatement.cs
- ObfuscateAssemblyAttribute.cs
- QuaternionAnimationBase.cs
- CheckBoxStandardAdapter.cs
- XmlSchemaException.cs
- PersistenceTypeAttribute.cs
- WebPartDisplayMode.cs
- VectorValueSerializer.cs
- AnchoredBlock.cs
- CurrentChangingEventArgs.cs
- BaseAddressElement.cs
- XmlTextWriter.cs
- TabControlEvent.cs
- FormatConvertedBitmap.cs
- PointAnimationUsingPath.cs
- SafeWaitHandle.cs
- DataPagerFieldCollection.cs
- UniqueConstraint.cs
- MessagePropertyFilter.cs
- CreateUserWizard.cs
- BamlRecordReader.cs
- ObjectSpanRewriter.cs
- ToolStripControlHost.cs
- SafeEventLogReadHandle.cs
- LeftCellWrapper.cs
- _UriSyntax.cs
- Decorator.cs
- Rect3D.cs
- PageBuildProvider.cs
- RestHandler.cs
- InstanceNormalEvent.cs
- HtmlInputControl.cs
- Normalization.cs
- TextSyndicationContent.cs
- Focus.cs
- SystemEvents.cs
- WindowsComboBox.cs
- InsufficientMemoryException.cs
- SqlConnectionHelper.cs
- Schedule.cs
- SoapSchemaImporter.cs
- FolderLevelBuildProviderCollection.cs
- MessageEventSubscriptionService.cs
- StringSorter.cs
- ConfigurationErrorsException.cs
- __TransparentProxy.cs
- DesignerVerbCollection.cs
- RegexReplacement.cs
- HttpMethodConstraint.cs
- ControlCachePolicy.cs
- XmlNode.cs
- ToolStripKeyboardHandlingService.cs
- InputLanguageSource.cs
- InputScopeAttribute.cs
- HttpInputStream.cs
- X509Extension.cs
- PartialList.cs
- OleDbRowUpdatingEvent.cs
- ContentType.cs
- DataGridViewCellStyle.cs
- BuildProvider.cs
- DependencyObjectType.cs
- NamespaceList.cs
- DrawingImage.cs
- DurableEnlistmentState.cs
- DataSourceSelectArguments.cs
- RoleManagerEventArgs.cs
- MeasureItemEvent.cs
- SmtpNegotiateAuthenticationModule.cs
- SmiGettersStream.cs
- AnnotationStore.cs
- Triplet.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- AddInAdapter.cs
- SystemIPv4InterfaceProperties.cs
- Renderer.cs
- ExtenderHelpers.cs
- HttpStreamXmlDictionaryWriter.cs
- BinaryCommonClasses.cs
- TypeBuilderInstantiation.cs
- Int32AnimationBase.cs
- LogExtentCollection.cs
- WebEvents.cs
- PerformanceCounterPermissionAttribute.cs