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
- MenuCommands.cs
- ExceptionHandlersDesigner.cs
- ThemeDictionaryExtension.cs
- MimeTypeMapper.cs
- XmlLoader.cs
- DataGridColumnDropSeparator.cs
- CategoryAttribute.cs
- ManagementScope.cs
- SequenceNumber.cs
- WindowsToolbarItemAsMenuItem.cs
- MenuItemStyleCollection.cs
- FormsAuthenticationModule.cs
- coordinatorscratchpad.cs
- MobileResource.cs
- Region.cs
- Int16Converter.cs
- MessageBox.cs
- TextElementAutomationPeer.cs
- MaterializeFromAtom.cs
- DropShadowEffect.cs
- COM2ExtendedTypeConverter.cs
- ConstructorBuilder.cs
- BinaryExpressionHelper.cs
- Rotation3D.cs
- UpDownEvent.cs
- LocalizableAttribute.cs
- Single.cs
- SocketPermission.cs
- UnicodeEncoding.cs
- StagingAreaInputItem.cs
- CircleHotSpot.cs
- ExceptQueryOperator.cs
- PropertyDescriptorGridEntry.cs
- DataRowView.cs
- PageCodeDomTreeGenerator.cs
- AppDomain.cs
- GridViewRowPresenter.cs
- Tokenizer.cs
- FormatStringEditor.cs
- UseManagedPresentationBindingElementImporter.cs
- ReflectionPermission.cs
- MissingMethodException.cs
- AnnouncementDispatcherAsyncResult.cs
- CubicEase.cs
- ModelTreeEnumerator.cs
- SmtpLoginAuthenticationModule.cs
- JsonDeserializer.cs
- TransformedBitmap.cs
- ObjectView.cs
- ComponentDispatcher.cs
- Console.cs
- PiiTraceSource.cs
- LinqDataSourceDeleteEventArgs.cs
- WebBaseEventKeyComparer.cs
- XmlCustomFormatter.cs
- XsdBuilder.cs
- AppDomainUnloadedException.cs
- DetailsViewModeEventArgs.cs
- PrintPageEvent.cs
- PropertyPathWorker.cs
- CodeExporter.cs
- TemplateEditingFrame.cs
- Tuple.cs
- SingleAnimationBase.cs
- TagPrefixAttribute.cs
- JapaneseCalendar.cs
- CodeMemberMethod.cs
- XmlCharCheckingWriter.cs
- SystemUdpStatistics.cs
- UpdatePanel.cs
- Utils.cs
- ToolStripRendererSwitcher.cs
- Base64Encoder.cs
- XpsInterleavingPolicy.cs
- SafeNativeMethods.cs
- GridViewAutomationPeer.cs
- StringReader.cs
- DocumentXmlWriter.cs
- WebPartChrome.cs
- DummyDataSource.cs
- ApplicationActivator.cs
- WmlValidationSummaryAdapter.cs
- TreeNodeCollection.cs
- WindowsGraphicsWrapper.cs
- COM2ComponentEditor.cs
- ObjectListCommandCollection.cs
- StrongNameMembershipCondition.cs
- IPEndPoint.cs
- ConfigurationManagerInternalFactory.cs
- AppSettingsExpressionEditor.cs
- PathNode.cs
- DetailsViewRowCollection.cs
- WebPartCollection.cs
- pingexception.cs
- CodeDomSerializer.cs
- HandlerWithFactory.cs
- Panel.cs
- CacheDependency.cs
- AnnotationResource.cs
- IDQuery.cs