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
- FormViewDeletedEventArgs.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- SettingsPropertyIsReadOnlyException.cs
- HMACSHA512.cs
- MatrixCamera.cs
- XmlSchemaDocumentation.cs
- Win32.cs
- MultiByteCodec.cs
- ColorBuilder.cs
- SecurityTokenContainer.cs
- DbResourceAllocator.cs
- Propagator.JoinPropagator.cs
- Roles.cs
- RectangleGeometry.cs
- TakeOrSkipWhileQueryOperator.cs
- CheckBoxField.cs
- CharacterBuffer.cs
- WorkflowViewService.cs
- ToolStripContentPanel.cs
- BuildProviderAppliesToAttribute.cs
- HwndSourceKeyboardInputSite.cs
- XmlUtil.cs
- ContextDataSourceContextData.cs
- DbDataAdapter.cs
- XhtmlBasicValidationSummaryAdapter.cs
- FixedSOMGroup.cs
- DataGridViewSelectedColumnCollection.cs
- DataGrid.cs
- Size3D.cs
- ScriptControlDescriptor.cs
- SimpleBitVector32.cs
- invalidudtexception.cs
- BufferedGraphics.cs
- AttributeSetAction.cs
- NavigatorInput.cs
- TextEndOfSegment.cs
- DataListItem.cs
- TextTreeUndoUnit.cs
- PeerApplication.cs
- ExpressionConverter.cs
- typedescriptorpermission.cs
- TimeSpanValidator.cs
- ConfigurationLockCollection.cs
- Image.cs
- XmlILStorageConverter.cs
- URL.cs
- StorageTypeMapping.cs
- WhiteSpaceTrimStringConverter.cs
- WebPartDeleteVerb.cs
- EntityAdapter.cs
- GACIdentityPermission.cs
- WebPartDescription.cs
- RtfControlWordInfo.cs
- ResolveMatches11.cs
- CodeExpressionCollection.cs
- FontCacheUtil.cs
- BCLDebug.cs
- ExpandCollapseProviderWrapper.cs
- ShapingEngine.cs
- WmlLabelAdapter.cs
- ExtensibleClassFactory.cs
- XamlWriter.cs
- SqlServer2KCompatibilityCheck.cs
- ConversionContext.cs
- AttributeCollection.cs
- CalendarAutoFormatDialog.cs
- ProfilePropertyNameValidator.cs
- TextBox.cs
- XNameConverter.cs
- SpecialFolderEnumConverter.cs
- WindowsToolbar.cs
- DesignerVerbCollection.cs
- SimpleLine.cs
- MdImport.cs
- WSSecurityJan2004.cs
- CollectionConverter.cs
- PartialTrustVisibleAssemblyCollection.cs
- MouseWheelEventArgs.cs
- ListBox.cs
- FreezableDefaultValueFactory.cs
- WindowsStartMenu.cs
- MulticastDelegate.cs
- DataTableReaderListener.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- CoTaskMemSafeHandle.cs
- SystemWebCachingSectionGroup.cs
- Configuration.cs
- IndentedWriter.cs
- XmlDocument.cs
- SystemWebSectionGroup.cs
- CopyNodeSetAction.cs
- ChtmlMobileTextWriter.cs
- MsmqMessage.cs
- MtomMessageEncodingBindingElement.cs
- ListSortDescriptionCollection.cs
- Grid.cs
- Crypto.cs
- ToolStripDropDownItem.cs
- WindowsClaimSet.cs
- GenericEnumerator.cs