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
- AssemblyAttributesGoHere.cs
- XmlAttributes.cs
- ToolStripRenderEventArgs.cs
- MultiAsyncResult.cs
- WindowsSpinner.cs
- SystemSounds.cs
- ObjectTypeMapping.cs
- GenericIdentity.cs
- WindowsListViewGroupSubsetLink.cs
- BooleanStorage.cs
- DataGridItemCollection.cs
- RecordManager.cs
- CharKeyFrameCollection.cs
- Guid.cs
- LabelTarget.cs
- WorkflowOwnershipException.cs
- QuaternionRotation3D.cs
- Propagator.cs
- RenderingEventArgs.cs
- SessionState.cs
- SearchExpression.cs
- CacheMemory.cs
- SafePointer.cs
- DbDataSourceEnumerator.cs
- AppDomain.cs
- BreakSafeBase.cs
- SymbolUsageManager.cs
- DynamicVirtualDiscoSearcher.cs
- ISCIIEncoding.cs
- Activity.cs
- DecimalAverageAggregationOperator.cs
- SqlDataSourceConfigureSortForm.cs
- WebPartManagerDesigner.cs
- WinCategoryAttribute.cs
- Fonts.cs
- SamlSerializer.cs
- TargetControlTypeCache.cs
- ZipIOExtraFieldElement.cs
- InstanceData.cs
- ObjectSelectorEditor.cs
- SqlExpressionNullability.cs
- RegionData.cs
- ValidationManager.cs
- SqlDataSourceCustomCommandPanel.cs
- RuntimeIdentifierPropertyAttribute.cs
- RawStylusActions.cs
- ServiceNameElement.cs
- AppliesToBehaviorDecisionTable.cs
- brushes.cs
- NavigationExpr.cs
- SchemaElement.cs
- RootBuilder.cs
- DeploymentSection.cs
- ToolStrip.cs
- ObjectCloneHelper.cs
- EdmScalarPropertyAttribute.cs
- ExpressionEditor.cs
- OleDbRowUpdatingEvent.cs
- SynchronizedPool.cs
- FormsAuthenticationModule.cs
- TemplateBindingExtensionConverter.cs
- FileSystemWatcher.cs
- InvokeHandlers.cs
- DoubleAverageAggregationOperator.cs
- CodePageUtils.cs
- HostingEnvironment.cs
- FileIOPermission.cs
- SmiEventSink_DeferedProcessing.cs
- SqlDataReaderSmi.cs
- TypeDescriptor.cs
- Message.cs
- DBCommand.cs
- Style.cs
- IntegerValidator.cs
- DrawingBrush.cs
- LocalizableAttribute.cs
- DeploymentExceptionMapper.cs
- BitmapEditor.cs
- LayoutSettings.cs
- SqlGatherProducedAliases.cs
- Pointer.cs
- ViewKeyConstraint.cs
- SqlAggregateChecker.cs
- StaticDataManager.cs
- IsolatedStoragePermission.cs
- EntityCommandCompilationException.cs
- BamlLocalizableResourceKey.cs
- Marshal.cs
- RootAction.cs
- PropertyPath.cs
- MailWriter.cs
- XmlReflectionImporter.cs
- ControlIdConverter.cs
- PolicyManager.cs
- DictionaryContent.cs
- CheckBoxFlatAdapter.cs
- DynamicEntity.cs
- RouteTable.cs
- Vector3DCollectionConverter.cs
- XmlCharType.cs