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
- SplitterDesigner.cs
- CoTaskMemHandle.cs
- DrawingImage.cs
- SafeRightsManagementHandle.cs
- FormsAuthenticationUserCollection.cs
- COM2ColorConverter.cs
- TypeToStringValueConverter.cs
- Stack.cs
- XamlFilter.cs
- HttpRequestContext.cs
- DispatcherProcessingDisabled.cs
- IndexedString.cs
- HtmlForm.cs
- XmlSchemaSet.cs
- FlowDocumentReader.cs
- CryptoApi.cs
- Camera.cs
- ScriptControlManager.cs
- RewritingValidator.cs
- CacheMemory.cs
- HttpApplication.cs
- DataGridViewImageCell.cs
- EnumBuilder.cs
- SmtpReplyReader.cs
- DesignSurfaceCollection.cs
- BuildProviderCollection.cs
- XmlDocument.cs
- ObjRef.cs
- SQLChars.cs
- QueryContinueDragEvent.cs
- SettingsPropertyValueCollection.cs
- ContentIterators.cs
- DataGridViewTopLeftHeaderCell.cs
- RoutedEvent.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- TextContainerChangedEventArgs.cs
- PassportPrincipal.cs
- WsatTransactionHeader.cs
- ExpressionConverter.cs
- StoreItemCollection.Loader.cs
- SynchronizingStream.cs
- CallbackValidatorAttribute.cs
- IPAddressCollection.cs
- CodeGroup.cs
- _LazyAsyncResult.cs
- log.cs
- AdornerDecorator.cs
- ToolStripContentPanel.cs
- ConfigurationManagerHelper.cs
- AppLevelCompilationSectionCache.cs
- smtppermission.cs
- RectangleHotSpot.cs
- AsyncCompletedEventArgs.cs
- XmlSchemaNotation.cs
- SourceElementsCollection.cs
- PointLight.cs
- DeviceContexts.cs
- Page.cs
- FrugalMap.cs
- CollectionViewGroupRoot.cs
- Transform.cs
- TypeUtils.cs
- BaseServiceProvider.cs
- DataFieldCollectionEditor.cs
- CustomMenuItemCollection.cs
- SecurityProtocolFactory.cs
- XmlEventCache.cs
- HoistedLocals.cs
- RawAppCommandInputReport.cs
- ObjectDataSourceMethodEventArgs.cs
- TextServicesManager.cs
- MetadataArtifactLoaderComposite.cs
- ActivationServices.cs
- CatalogPartChrome.cs
- Guid.cs
- EventDescriptor.cs
- OleDbEnumerator.cs
- WebPartZone.cs
- WebPartTransformerCollection.cs
- ValidatingCollection.cs
- DataGridViewRowPostPaintEventArgs.cs
- LinkButton.cs
- DmlSqlGenerator.cs
- RecommendedAsConfigurableAttribute.cs
- ParsedAttributeCollection.cs
- DefaultTraceListener.cs
- DataGridClipboardHelper.cs
- ListDictionary.cs
- RequestCachingSection.cs
- DataGridViewButtonCell.cs
- SendActivityEventArgs.cs
- MsmqMessageProperty.cs
- LineServicesCallbacks.cs
- BrowserCapabilitiesCompiler.cs
- BufferedWebEventProvider.cs
- VirtualPathProvider.cs
- _NTAuthentication.cs
- XmlReturnWriter.cs
- PageRequestManager.cs
- SymbolMethod.cs