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
- KeyPullup.cs
- ManagementBaseObject.cs
- BaseAddressElement.cs
- ObjectReferenceStack.cs
- ObjectListField.cs
- DataRelationCollection.cs
- XmlDomTextWriter.cs
- TagPrefixAttribute.cs
- AstNode.cs
- LinearGradientBrush.cs
- DocumentCollection.cs
- DataColumnSelectionConverter.cs
- FixUp.cs
- ModelItemCollectionImpl.cs
- XmlDictionaryReader.cs
- TextWriter.cs
- ChangeDirector.cs
- NoClickablePointException.cs
- SubpageParaClient.cs
- PersonalizableTypeEntry.cs
- altserialization.cs
- PagesSection.cs
- CloudCollection.cs
- TextServicesCompartmentEventSink.cs
- HtmlInputText.cs
- ListViewCommandEventArgs.cs
- GraphicsPath.cs
- UrlMappingCollection.cs
- TableLayoutPanelCellPosition.cs
- RelationshipWrapper.cs
- bidPrivateBase.cs
- GenericWebPart.cs
- EasingQuaternionKeyFrame.cs
- ImageListStreamer.cs
- GridLength.cs
- SubpageParagraph.cs
- TranslateTransform.cs
- DataColumnMappingCollection.cs
- DataGridViewCellStyle.cs
- DBPropSet.cs
- CodeValidator.cs
- SqlRowUpdatedEvent.cs
- TraceHandlerErrorFormatter.cs
- Baml2006SchemaContext.cs
- SizeF.cs
- CommentAction.cs
- XamlPointCollectionSerializer.cs
- PeerResolverBindingElement.cs
- XPathCompileException.cs
- TripleDESCryptoServiceProvider.cs
- DataRelationPropertyDescriptor.cs
- ThrowHelper.cs
- CompensationExtension.cs
- StrongNameUtility.cs
- XmlSchemaImporter.cs
- DocComment.cs
- DragDeltaEventArgs.cs
- ReadOnlyPropertyMetadata.cs
- CommonServiceBehaviorElement.cs
- SqlDataSourceCustomCommandPanel.cs
- PlainXmlDeserializer.cs
- PageAsyncTask.cs
- Regex.cs
- ScopedKnownTypes.cs
- AppLevelCompilationSectionCache.cs
- ISAPIApplicationHost.cs
- PageThemeBuildProvider.cs
- VScrollProperties.cs
- ItemCheckedEvent.cs
- WithStatement.cs
- ProjectionCamera.cs
- ToolStripHighContrastRenderer.cs
- TemplateBindingExpressionConverter.cs
- Multiply.cs
- UriSection.cs
- ExpandCollapsePattern.cs
- RequestCacheManager.cs
- SchemaTableColumn.cs
- ProviderBase.cs
- FileReservationCollection.cs
- DataConnectionHelper.cs
- Dictionary.cs
- AttributeProviderAttribute.cs
- XmlDataProvider.cs
- CqlQuery.cs
- UIHelper.cs
- QuaternionValueSerializer.cs
- AvTraceDetails.cs
- HTMLTextWriter.cs
- FloaterParaClient.cs
- AlphaSortedEnumConverter.cs
- ImpersonateTokenRef.cs
- TypeLoadException.cs
- ListViewSelectEventArgs.cs
- BamlBinaryWriter.cs
- SqlTriggerAttribute.cs
- TCEAdapterGenerator.cs
- File.cs
- ItemsControlAutomationPeer.cs
- UIPermission.cs