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
- SoapSchemaImporter.cs
- XmlNodeChangedEventManager.cs
- MetadataUtil.cs
- TreeNodeConverter.cs
- WebPart.cs
- GridViewRowPresenterBase.cs
- XmlDocumentSchema.cs
- AggregatePushdown.cs
- IPipelineRuntime.cs
- Button.cs
- DataControlFieldCollection.cs
- ColorAnimationUsingKeyFrames.cs
- CommandField.cs
- ListViewSelectEventArgs.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- Menu.cs
- XPathDocument.cs
- SequenceDesigner.cs
- ConcurrentBag.cs
- MemoryMappedViewAccessor.cs
- EventPropertyMap.cs
- SaveLedgerEntryRequest.cs
- BufferModesCollection.cs
- Vector3DIndependentAnimationStorage.cs
- DocumentScope.cs
- DoubleAnimationClockResource.cs
- DocumentViewerHelper.cs
- RijndaelManaged.cs
- ObjectPersistData.cs
- HttpTransportSecurity.cs
- HwndProxyElementProvider.cs
- ApplicationInterop.cs
- _SpnDictionary.cs
- SqlClientWrapperSmiStreamChars.cs
- ConfigXmlWhitespace.cs
- HostProtectionException.cs
- Vector.cs
- MultiPageTextView.cs
- UpdateManifestForBrowserApplication.cs
- DocumentPageView.cs
- path.cs
- MessageSmuggler.cs
- OleDbConnection.cs
- InstalledFontCollection.cs
- RepeaterItem.cs
- Emitter.cs
- SnapLine.cs
- WaitForChangedResult.cs
- ProjectionCamera.cs
- ColorInterpolationModeValidation.cs
- MenuRenderer.cs
- MatrixTransform3D.cs
- MenuItemCollection.cs
- QuaternionRotation3D.cs
- WebHostScriptMappingsInstallComponent.cs
- DES.cs
- CodeParameterDeclarationExpressionCollection.cs
- CompiledXpathExpr.cs
- BuildResultCache.cs
- UnhandledExceptionEventArgs.cs
- EncryptRequest.cs
- QuadraticBezierSegment.cs
- GeometryModel3D.cs
- RepeaterItemCollection.cs
- UpWmlMobileTextWriter.cs
- CompoundFileReference.cs
- OutputCacheProfileCollection.cs
- BamlBinaryReader.cs
- DockProviderWrapper.cs
- OutputWindow.cs
- AttributeQuery.cs
- DoubleStorage.cs
- PlainXmlDeserializer.cs
- ImageCodecInfo.cs
- PlanCompilerUtil.cs
- Odbc32.cs
- TagMapCollection.cs
- SystemIcons.cs
- LoginName.cs
- ADConnectionHelper.cs
- BaseInfoTable.cs
- CriticalFinalizerObject.cs
- ClientSponsor.cs
- SymbolType.cs
- DropDownList.cs
- SqlFunctions.cs
- DataGridColumnCollection.cs
- MarshalByRefObject.cs
- StyleBamlRecordReader.cs
- TraceSection.cs
- QueryOperator.cs
- Freezable.cs
- FileEnumerator.cs
- TextureBrush.cs
- ContentHostHelper.cs
- InputScopeConverter.cs
- AutomationEvent.cs
- ColumnHeaderConverter.cs
- EntityDataSourceQueryBuilder.cs
- XsdBuilder.cs