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
- GlobalItem.cs
- ConfigXmlCDataSection.cs
- SqlBinder.cs
- SatelliteContractVersionAttribute.cs
- CompilerGlobalScopeAttribute.cs
- ProviderBase.cs
- DesignerAdapterUtil.cs
- thaishape.cs
- UnSafeCharBuffer.cs
- SelectionUIHandler.cs
- PrintControllerWithStatusDialog.cs
- Nodes.cs
- Predicate.cs
- FontInfo.cs
- sqlnorm.cs
- Win32Native.cs
- NumberFormatInfo.cs
- ContextMenuAutomationPeer.cs
- GeneralTransformGroup.cs
- KnownAssembliesSet.cs
- SecurityContext.cs
- DataSourceCacheDurationConverter.cs
- LinqDataSourceSelectEventArgs.cs
- Timer.cs
- TrustSection.cs
- COAUTHIDENTITY.cs
- WebMethodAttribute.cs
- StrokeSerializer.cs
- PenContexts.cs
- ToolStripLocationCancelEventArgs.cs
- HttpListenerContext.cs
- WindowsListViewItemCheckBox.cs
- InstanceDataCollection.cs
- DataGridColumn.cs
- PropertyMapper.cs
- DataFormats.cs
- CertificateManager.cs
- mediapermission.cs
- PasswordPropertyTextAttribute.cs
- CodeNamespace.cs
- DataSetMappper.cs
- DefaultWorkflowSchedulerService.cs
- ConfigurationElementCollection.cs
- XmlProcessingInstruction.cs
- MetadataPropertyCollection.cs
- XmlSchemaProviderAttribute.cs
- RegexWorker.cs
- Composition.cs
- UIElement.cs
- PenContexts.cs
- MethodCallConverter.cs
- NotFiniteNumberException.cs
- StylusPointPropertyInfo.cs
- ArgumentException.cs
- TripleDESCryptoServiceProvider.cs
- DirectoryLocalQuery.cs
- PropertyDescriptorCollection.cs
- TableHeaderCell.cs
- SerializationStore.cs
- SystemDiagnosticsSection.cs
- EntityModelBuildProvider.cs
- GreenMethods.cs
- DataGridCell.cs
- AttachedPropertyMethodSelector.cs
- FormsAuthenticationTicket.cs
- WebReferenceOptions.cs
- ResourceReferenceExpressionConverter.cs
- _PooledStream.cs
- ListDataHelper.cs
- Menu.cs
- SerialErrors.cs
- AttributeEmitter.cs
- GenerateScriptTypeAttribute.cs
- InputProcessorProfilesLoader.cs
- RequestSecurityTokenSerializer.cs
- ConvertersCollection.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- Vector3DCollectionConverter.cs
- Emitter.cs
- SyntaxCheck.cs
- WebPartEventArgs.cs
- RectangleConverter.cs
- FileUtil.cs
- ExternalException.cs
- PersonalizationAdministration.cs
- KeySplineConverter.cs
- HtmlInputImage.cs
- FloaterParagraph.cs
- XappLauncher.cs
- DisplayNameAttribute.cs
- TypeConstant.cs
- CodeGeneratorAttribute.cs
- MarshalDirectiveException.cs
- SystemEvents.cs
- ListViewItemMouseHoverEvent.cs
- FileNotFoundException.cs
- NativeMethodsCLR.cs
- FormClosedEvent.cs
- EndpointDispatcherTable.cs
- RijndaelManagedTransform.cs