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
- HandlerWithFactory.cs
- CollectionChangeEventArgs.cs
- ValidatingReaderNodeData.cs
- LabelDesigner.cs
- ComContractElementCollection.cs
- XmlNodeReader.cs
- CheckBoxAutomationPeer.cs
- RtType.cs
- HttpServerProtocol.cs
- PropertyDescriptorGridEntry.cs
- LoginCancelEventArgs.cs
- CloseCollectionAsyncResult.cs
- XmlJsonWriter.cs
- ListDictionary.cs
- XamlPathDataSerializer.cs
- GridViewRowCollection.cs
- CodeNamespace.cs
- SortedDictionary.cs
- AttributeInfo.cs
- PreviewKeyDownEventArgs.cs
- StatusBar.cs
- NameValueFileSectionHandler.cs
- ListBindingHelper.cs
- CallbackException.cs
- SecureConversationVersion.cs
- SqlBuilder.cs
- DrawingBrush.cs
- DictionaryBase.cs
- MaskPropertyEditor.cs
- RemoteHelper.cs
- TypeLoadException.cs
- Normalization.cs
- InstalledVoice.cs
- EmptyElement.cs
- ResourceReader.cs
- ObjectFullSpanRewriter.cs
- ToolStripEditorManager.cs
- ByteConverter.cs
- FontDifferentiator.cs
- ImageBrush.cs
- AsyncPostBackTrigger.cs
- QilReference.cs
- WpfPayload.cs
- Pen.cs
- ResourceDefaultValueAttribute.cs
- CqlBlock.cs
- EmbeddedObject.cs
- SqlTriggerAttribute.cs
- FileClassifier.cs
- WebControlAdapter.cs
- NullableConverter.cs
- EditingScopeUndoUnit.cs
- DesignerTransactionCloseEvent.cs
- FileSecurity.cs
- TemplateContent.cs
- WebAdminConfigurationHelper.cs
- SqlUserDefinedTypeAttribute.cs
- GeometryModel3D.cs
- GregorianCalendarHelper.cs
- TrustManagerMoreInformation.cs
- InstallerTypeAttribute.cs
- FacetChecker.cs
- RawStylusInputCustomDataList.cs
- DataPagerFieldCommandEventArgs.cs
- DataTableMappingCollection.cs
- PersianCalendar.cs
- Vars.cs
- MulticastIPAddressInformationCollection.cs
- WindowVisualStateTracker.cs
- SchemaImporterExtensionElement.cs
- ConsoleEntryPoint.cs
- ReadOnlyNameValueCollection.cs
- ConversionContext.cs
- WebPart.cs
- Vector3DCollectionConverter.cs
- BitmapEffect.cs
- RSAPKCS1SignatureDeformatter.cs
- SiteMap.cs
- OutputCacheSettings.cs
- JulianCalendar.cs
- ValidatingCollection.cs
- ReadOnlyCollection.cs
- MimeWriter.cs
- MouseWheelEventArgs.cs
- DispatcherHookEventArgs.cs
- CTreeGenerator.cs
- XPathNavigator.cs
- TextRunCacheImp.cs
- StringFunctions.cs
- StrokeCollectionDefaultValueFactory.cs
- ProtocolsSection.cs
- GroupByExpressionRewriter.cs
- QueueProcessor.cs
- SafeEventLogReadHandle.cs
- BatchWriter.cs
- PlatformNotSupportedException.cs
- HiddenFieldDesigner.cs
- RenderDataDrawingContext.cs
- PropertyChangedEventManager.cs
- SpeechSynthesizer.cs