Code:
/ DotNET / DotNET / 8.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- X509CertificateStore.cs
- XmlTypeMapping.cs
- columnmapkeybuilder.cs
- ObjectDisposedException.cs
- PropertyConverter.cs
- BaseParaClient.cs
- MemberProjectionIndex.cs
- SystemDiagnosticsSection.cs
- ByteConverter.cs
- ConnectionStringSettingsCollection.cs
- SmtpReplyReader.cs
- ThreadStaticAttribute.cs
- OleDbInfoMessageEvent.cs
- Stream.cs
- RequestQueue.cs
- RequestSecurityTokenForRemoteTokenFactory.cs
- StaticSiteMapProvider.cs
- CaseStatement.cs
- ScriptingScriptResourceHandlerSection.cs
- OptionUsage.cs
- StyleTypedPropertyAttribute.cs
- AnnotationObservableCollection.cs
- SqlOuterApplyReducer.cs
- LOSFormatter.cs
- SymmetricCryptoHandle.cs
- AspNetCacheProfileAttribute.cs
- unitconverter.cs
- DataProtection.cs
- SqlConnectionHelper.cs
- TreeNode.cs
- X509SecurityToken.cs
- PropertyCollection.cs
- PromptBuilder.cs
- CaretElement.cs
- GridProviderWrapper.cs
- SchemaImporterExtensionsSection.cs
- OdbcConnectionString.cs
- SqlCommandAsyncResult.cs
- XdrBuilder.cs
- LeftCellWrapper.cs
- FixUpCollection.cs
- DataGridViewRowConverter.cs
- DrawingVisualDrawingContext.cs
- WebConfigurationHostFileChange.cs
- Process.cs
- ListSortDescriptionCollection.cs
- MimeWriter.cs
- DefaultHttpHandler.cs
- AlternateViewCollection.cs
- XmlSchemaAttribute.cs
- FilteredReadOnlyMetadataCollection.cs
- ParameterBinding.cs
- SqlProfileProvider.cs
- FontFaceLayoutInfo.cs
- TranslateTransform3D.cs
- XPathSingletonIterator.cs
- TextWriterTraceListener.cs
- DrawingAttributes.cs
- TerminateSequence.cs
- ViewEvent.cs
- Control.cs
- UInt16Converter.cs
- WebPartDeleteVerb.cs
- WebAdminConfigurationHelper.cs
- OrderedDictionary.cs
- IndexerHelper.cs
- Zone.cs
- EtwTrackingBehavior.cs
- XmlObjectSerializerReadContextComplexJson.cs
- FixedHyperLink.cs
- PropertyGroupDescription.cs
- HMAC.cs
- MethodImplAttribute.cs
- BrowserDefinition.cs
- ContentType.cs
- InstallerTypeAttribute.cs
- DefaultHttpHandler.cs
- RegularExpressionValidator.cs
- MessageContractMemberAttribute.cs
- AdCreatedEventArgs.cs
- CodeDomSerializationProvider.cs
- CallbackValidatorAttribute.cs
- RelationshipConstraintValidator.cs
- AssemblyBuilderData.cs
- ISAPIRuntime.cs
- PropertyChangingEventArgs.cs
- Dictionary.cs
- Attributes.cs
- FixedSOMPageConstructor.cs
- HandledMouseEvent.cs
- BrowserCapabilitiesCompiler.cs
- Form.cs
- BrowserInteropHelper.cs
- Itemizer.cs
- controlskin.cs
- AssertFilter.cs
- RegexCode.cs
- FixedTextPointer.cs
- CookieProtection.cs
- NextPreviousPagerField.cs