Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / 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
- WpfPayload.cs
- WebPartAddingEventArgs.cs
- Schedule.cs
- LinkLabelLinkClickedEvent.cs
- xsdvalidator.cs
- KeyedCollection.cs
- GlobalItem.cs
- SecurityManager.cs
- PointConverter.cs
- ScriptHandlerFactory.cs
- RunInstallerAttribute.cs
- MsmqAuthenticationMode.cs
- CaretElement.cs
- HttpCapabilitiesEvaluator.cs
- PriorityItem.cs
- ToolStripDesignerAvailabilityAttribute.cs
- ParameterInfo.cs
- ScriptResourceMapping.cs
- DiscoveryReferences.cs
- EntityReference.cs
- FileSystemEnumerable.cs
- RtfNavigator.cs
- SolidColorBrush.cs
- XhtmlTextWriter.cs
- InputLanguage.cs
- TextServicesDisplayAttribute.cs
- SQLStringStorage.cs
- ControlPaint.cs
- RecipientServiceModelSecurityTokenRequirement.cs
- XmlNode.cs
- CalculatedColumn.cs
- RunClient.cs
- HostingEnvironmentException.cs
- AssemblyInfo.cs
- LinkedList.cs
- SqlTypeConverter.cs
- BooleanExpr.cs
- MetadataPropertyvalue.cs
- SourceChangedEventArgs.cs
- PagesSection.cs
- UnsettableComboBox.cs
- NamespaceEmitter.cs
- FrameworkElementFactory.cs
- _NegoStream.cs
- Graphics.cs
- RemotingException.cs
- _ListenerResponseStream.cs
- COM2IDispatchConverter.cs
- TextDecorationUnitValidation.cs
- DPCustomTypeDescriptor.cs
- DataKeyCollection.cs
- ClockGroup.cs
- CharUnicodeInfo.cs
- SqlDataReaderSmi.cs
- SymbolMethod.cs
- ShaderEffect.cs
- XhtmlTextWriter.cs
- EventInfo.cs
- ArraySubsetEnumerator.cs
- Assert.cs
- TabItemWrapperAutomationPeer.cs
- ComponentChangedEvent.cs
- FrameAutomationPeer.cs
- FunctionMappingTranslator.cs
- XslNumber.cs
- BitmapCodecInfo.cs
- CommandValueSerializer.cs
- StateDesigner.Helpers.cs
- SqlAliaser.cs
- FormatPage.cs
- AttributeCollection.cs
- DataGridViewImageColumn.cs
- RequestCacheValidator.cs
- CompatibleIComparer.cs
- MSG.cs
- ContainerParagraph.cs
- DataGridViewCellEventArgs.cs
- ApplicationContext.cs
- AttributeUsageAttribute.cs
- ProviderConnectionPoint.cs
- LambdaSerializationException.cs
- HttpListenerRequest.cs
- TableCell.cs
- WindowsListViewGroup.cs
- NativeRecognizer.cs
- IdnElement.cs
- PhoneCallDesigner.cs
- XmlHierarchyData.cs
- BlurEffect.cs
- CodeMethodInvokeExpression.cs
- AuthenticodeSignatureInformation.cs
- SafeHandle.cs
- CompositeActivityMarkupSerializer.cs
- MDIClient.cs
- Int64AnimationBase.cs
- InvariantComparer.cs
- CapabilitiesState.cs
- CollectionViewGroup.cs
- VisualStyleInformation.cs
- WrappingXamlSchemaContext.cs