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
- NativeMethods.cs
- PreloadedPackages.cs
- EqualityComparer.cs
- PrimitiveXmlSerializers.cs
- ApplicationActivator.cs
- NetMsmqBindingCollectionElement.cs
- OneOfScalarConst.cs
- ErrorRuntimeConfig.cs
- PersistChildrenAttribute.cs
- BinaryFormatterWriter.cs
- StreamResourceInfo.cs
- DefaultTypeArgumentAttribute.cs
- RTTrackingProfile.cs
- AnimationLayer.cs
- SystemIcmpV6Statistics.cs
- ClientApiGenerator.cs
- AssemblyAttributesGoHere.cs
- Int32Converter.cs
- DesignOnlyAttribute.cs
- Maps.cs
- ActivityDesignerResources.cs
- nulltextcontainer.cs
- DocobjHost.cs
- TdsParameterSetter.cs
- SpanIndex.cs
- RequestTimeoutManager.cs
- MsdtcWrapper.cs
- BinaryEditor.cs
- _IPv6Address.cs
- StringFreezingAttribute.cs
- ListBox.cs
- NamedPipeTransportSecurity.cs
- CheckBoxField.cs
- NotifyCollectionChangedEventArgs.cs
- SelectionItemPattern.cs
- DataRowExtensions.cs
- FontStyles.cs
- DataBinder.cs
- EdmError.cs
- Query.cs
- DelegateSerializationHolder.cs
- InternalConfigHost.cs
- ActivityDesignerHighlighter.cs
- TextBoxRenderer.cs
- DataGridViewColumnCollection.cs
- Lease.cs
- CharConverter.cs
- ScopelessEnumAttribute.cs
- ConstructorExpr.cs
- BindMarkupExtensionSerializer.cs
- XmlSchemaImport.cs
- CaseStatementProjectedSlot.cs
- ChangesetResponse.cs
- NonPrimarySelectionGlyph.cs
- ContentDesigner.cs
- SectionVisual.cs
- PropertyEmitterBase.cs
- LazyTextWriterCreator.cs
- EditorPartChrome.cs
- ScriptManagerProxy.cs
- MergePropertyDescriptor.cs
- TreeViewHitTestInfo.cs
- ExtensibleClassFactory.cs
- ConfigXmlElement.cs
- XmlSchemas.cs
- Int64Animation.cs
- FileReservationCollection.cs
- SqlPersonalizationProvider.cs
- TagPrefixInfo.cs
- DesignerActionGlyph.cs
- MSG.cs
- filewebrequest.cs
- Speller.cs
- relpropertyhelper.cs
- WebPartHeaderCloseVerb.cs
- DataGridViewColumnStateChangedEventArgs.cs
- TrustLevelCollection.cs
- ConfigurationElement.cs
- StoreAnnotationsMap.cs
- SoapWriter.cs
- SelectionEditingBehavior.cs
- AlignmentXValidation.cs
- GlobalItem.cs
- EnumerableCollectionView.cs
- DataSourceXmlSubItemAttribute.cs
- TimeSpanStorage.cs
- ComplexTypeEmitter.cs
- Crypto.cs
- Typeface.cs
- CollectionViewSource.cs
- MatrixTransform3D.cs
- ElementFactory.cs
- counter.cs
- ProfileEventArgs.cs
- ClientSession.cs
- ClaimTypeRequirement.cs
- SQLString.cs
- OverflowException.cs
- hresults.cs
- SystemTcpConnection.cs