Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Speech / Src / Internal / GrammarBuilding / OneOfElement.cs / 1 / OneOfElement.cs
//------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------
using System.Diagnostics;
using System.Speech.Recognition;
using System.Speech.Internal.SrgsParser;
using System.Text;
namespace System.Speech.Internal.GrammarBuilding
{
#if VSCOMPILE
[DebuggerDisplay ("{DebugSummary}")]
#endif
internal sealed class OneOfElement : BuilderElements
{
//*******************************************************************
//
// Constructors
//
//*******************************************************************
#region Constructors
internal OneOfElement ()
{
}
#endregion
//********************************************************************
//
// Internal Methods
//
//*******************************************************************
#region Internal Methods
///
///
///
///
internal override GrammarBuilderBase Clone ()
{
OneOfElement oneOf = new OneOfElement ();
oneOf.CloneItems (this);
return oneOf;
}
///
///
///
///
///
///
///
///
internal override IElement CreateElement (IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds)
{
// Create and return the IOneOf representing the current object
IOneOf oneOf = elementFactory.CreateOneOf (parent, rule);
foreach (GrammarBuilderBase item in Items)
{
ItemElement newItem = item as ItemElement;
if (newItem == null)
{
newItem = new ItemElement (item);
}
IItem element = (IItem) newItem.CreateElement (elementFactory, oneOf, rule, ruleIds);
element.PostParse (oneOf);
elementFactory.AddItem (oneOf, element);
}
return oneOf;
}
#endregion
//********************************************************************
//
// Internal Properties
//
//********************************************************************
#region Internal Properties
override internal string DebugSummary
{
get
{
StringBuilder sb = new StringBuilder ();
foreach (GrammarBuilderBase item in Items)
{
if (sb.Length > 0)
{
sb.Append (",");
}
sb.Append (item.DebugSummary);
}
return "[" + sb.ToString () + "]";
}
}
#endregion
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------
using System.Diagnostics;
using System.Speech.Recognition;
using System.Speech.Internal.SrgsParser;
using System.Text;
namespace System.Speech.Internal.GrammarBuilding
{
#if VSCOMPILE
[DebuggerDisplay ("{DebugSummary}")]
#endif
internal sealed class OneOfElement : BuilderElements
{
//*******************************************************************
//
// Constructors
//
//*******************************************************************
#region Constructors
internal OneOfElement ()
{
}
#endregion
//********************************************************************
//
// Internal Methods
//
//*******************************************************************
#region Internal Methods
///
///
///
///
internal override GrammarBuilderBase Clone ()
{
OneOfElement oneOf = new OneOfElement ();
oneOf.CloneItems (this);
return oneOf;
}
///
///
///
///
///
///
///
///
internal override IElement CreateElement (IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds)
{
// Create and return the IOneOf representing the current object
IOneOf oneOf = elementFactory.CreateOneOf (parent, rule);
foreach (GrammarBuilderBase item in Items)
{
ItemElement newItem = item as ItemElement;
if (newItem == null)
{
newItem = new ItemElement (item);
}
IItem element = (IItem) newItem.CreateElement (elementFactory, oneOf, rule, ruleIds);
element.PostParse (oneOf);
elementFactory.AddItem (oneOf, element);
}
return oneOf;
}
#endregion
//********************************************************************
//
// Internal Properties
//
//********************************************************************
#region Internal Properties
override internal string DebugSummary
{
get
{
StringBuilder sb = new StringBuilder ();
foreach (GrammarBuilderBase item in Items)
{
if (sb.Length > 0)
{
sb.Append (",");
}
sb.Append (item.DebugSummary);
}
return "[" + sb.ToString () + "]";
}
}
#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
- TripleDESCryptoServiceProvider.cs
- metrodevice.cs
- Vertex.cs
- AlternateViewCollection.cs
- ElementUtil.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- CachingHintValidation.cs
- QilInvokeEarlyBound.cs
- StreamInfo.cs
- TaskFormBase.cs
- ListViewTableRow.cs
- Base64Encoder.cs
- SetIterators.cs
- PageParser.cs
- DesignerSerializationManager.cs
- BaseProcessor.cs
- DocumentEventArgs.cs
- WebEventCodes.cs
- SqlUtil.cs
- WebPartEventArgs.cs
- PropertyPathWorker.cs
- PrtTicket_Public.cs
- Point3DAnimation.cs
- DocumentReference.cs
- ConfigurationPermission.cs
- DynamicVirtualDiscoSearcher.cs
- Win32.cs
- PlatformCulture.cs
- ConfigurationSchemaErrors.cs
- HandleValueEditor.cs
- CacheRequest.cs
- OperatingSystem.cs
- XmlWriterDelegator.cs
- DateTimeEditor.cs
- PackageStore.cs
- UInt64Converter.cs
- TCPListener.cs
- LabelLiteral.cs
- EventLogPermissionEntry.cs
- SecurityUtils.cs
- Attributes.cs
- CodeSnippetStatement.cs
- DebuggerAttributes.cs
- SymDocumentType.cs
- LogManagementAsyncResult.cs
- VisualSerializer.cs
- CodeTypeMember.cs
- LogEntryHeaderSerializer.cs
- FlowDocumentPage.cs
- XPathDocumentNavigator.cs
- TextServicesProperty.cs
- ItemsControl.cs
- DataServiceResponse.cs
- PersistenceMetadataNamespace.cs
- ActivityTypeCodeDomSerializer.cs
- DetailsViewCommandEventArgs.cs
- ListViewDeleteEventArgs.cs
- ConfigurationProperty.cs
- ActionMismatchAddressingException.cs
- SqlUDTStorage.cs
- ModuleBuilder.cs
- ServerValidateEventArgs.cs
- Mouse.cs
- _UriTypeConverter.cs
- DocumentOrderQuery.cs
- SynchronizedDispatch.cs
- PropertyInformation.cs
- SQLInt64Storage.cs
- ProxyWebPartManager.cs
- RegularExpressionValidator.cs
- AtomServiceDocumentSerializer.cs
- ReflectionTypeLoadException.cs
- ResolveMatchesCD1.cs
- ScrollItemPattern.cs
- TypeUnloadedException.cs
- ConfigXmlElement.cs
- CommandBinding.cs
- ObjectResult.cs
- RequestContext.cs
- IntMinMaxAggregationOperator.cs
- UnsafeNativeMethodsPenimc.cs
- GradientStop.cs
- XmlWhitespace.cs
- Menu.cs
- CollectionBase.cs
- QueryPageSettingsEventArgs.cs
- Barrier.cs
- CloseCryptoHandleRequest.cs
- LayoutInformation.cs
- SelectionService.cs
- WindowsListBox.cs
- SqlRecordBuffer.cs
- BuildProvider.cs
- DBPropSet.cs
- TableRowCollection.cs
- DecimalAnimationUsingKeyFrames.cs
- PropertyTab.cs
- WizardDesigner.cs
- BuildProvider.cs
- CallbackHandler.cs