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
- XamlTreeBuilder.cs
- NetworkStream.cs
- PlatformCulture.cs
- GestureRecognitionResult.cs
- StateMachineAction.cs
- ToolStripSplitButton.cs
- TextMessageEncodingBindingElement.cs
- IndexingContentUnit.cs
- Int32Rect.cs
- HttpConfigurationSystem.cs
- BamlResourceContent.cs
- DataControlReferenceCollection.cs
- SocketElement.cs
- DrawingGroup.cs
- PointHitTestResult.cs
- ShaderRenderModeValidation.cs
- ScrollItemPattern.cs
- FontFamily.cs
- StylusPointProperty.cs
- UInt16.cs
- IPAddress.cs
- CryptoStream.cs
- CodeSnippetTypeMember.cs
- ThreadPool.cs
- WebPartConnectionsCancelVerb.cs
- TrustLevel.cs
- PerfProviderCollection.cs
- DurableErrorHandler.cs
- MultiAsyncResult.cs
- TableLayoutSettingsTypeConverter.cs
- ReaderWriterLock.cs
- SiteMapNodeItemEventArgs.cs
- CalendarButton.cs
- ConfigurationSectionGroupCollection.cs
- MeshGeometry3D.cs
- Control.cs
- LicFileLicenseProvider.cs
- BrowserCapabilitiesFactory35.cs
- As.cs
- ObservableDictionary.cs
- DataGridViewTopLeftHeaderCell.cs
- HtmlEmptyTagControlBuilder.cs
- AuthorizationSection.cs
- QilInvoke.cs
- HitTestDrawingContextWalker.cs
- Attribute.cs
- DoubleUtil.cs
- FileCodeGroup.cs
- SchemaDeclBase.cs
- ListControlConvertEventArgs.cs
- RequestCacheValidator.cs
- Registry.cs
- XmlSchemaAnyAttribute.cs
- SqlBuilder.cs
- InputBuffer.cs
- Setter.cs
- ApplicationProxyInternal.cs
- RoleServiceManager.cs
- ToolStripItemImageRenderEventArgs.cs
- DataBoundControlDesigner.cs
- RightNameExpirationInfoPair.cs
- BuildProvider.cs
- SynchronizedDispatch.cs
- MultiBinding.cs
- TableRow.cs
- AssemblyInfo.cs
- SafeNativeMethods.cs
- Tablet.cs
- PtsHost.cs
- TerminateDesigner.cs
- HtmlTableRow.cs
- LocalizationCodeDomSerializer.cs
- CodeAttributeArgument.cs
- Oid.cs
- PointF.cs
- XMLSyntaxException.cs
- TagPrefixInfo.cs
- ExtenderControl.cs
- HashAlgorithm.cs
- SlipBehavior.cs
- XmlSchemaImport.cs
- Helpers.cs
- HostingEnvironmentWrapper.cs
- FileDialog.cs
- NumericPagerField.cs
- DrawingAttributes.cs
- UniqueEventHelper.cs
- EntityException.cs
- LayoutTableCell.cs
- CodeDirectoryCompiler.cs
- IsolatedStoragePermission.cs
- HashRepartitionStream.cs
- CircleHotSpot.cs
- connectionpool.cs
- PolicyImporterElement.cs
- DocumentXmlWriter.cs
- DrawingContextDrawingContextWalker.cs
- ImageButton.cs
- NonBatchDirectoryCompiler.cs
- RijndaelManagedTransform.cs