Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Speech / Src / Recognition / SrgsGrammar / SrgsElement.cs / 1 / SrgsElement.cs
//----------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
//
//
// Description:
//
// History:
// 5/1/2004 [....] Created from the Kurosawa Code
//---------------------------------------------------------------------------
using System;
using System.Xml;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Speech.Internal.SrgsParser;
namespace System.Speech.Recognition.SrgsGrammar
{
///
/// Base class for all SRGS object to build XML fragment corresponding to the object.
///
[Serializable]
[DebuggerDisplay ("SrgsElement Children:[{_items.Count}]")]
[DebuggerTypeProxy (typeof (SrgsElementDebugDisplay))]
public abstract class SrgsElement : MarshalByRefObject, IElement
{
///
/// TODOC
///
protected SrgsElement ()
{
}
//*******************************************************************
//
// Internal Methods
//
//*******************************************************************
#region Internal methods
// Write the XML fragment describing the object.
internal abstract void WriteSrgs (XmlWriter writer);
// Debugger display string.
internal abstract string DebuggerDisplayString ();
// Validate the SRGS element.
///
/// Validate each element and recurse through all the children srgs
/// elements if any.
/// Any derived class implementing this mehod must call the base class
/// in order for the children to be processed.
///
internal virtual void Validate (SrgsGrammar grammar)
{
foreach (SrgsElement element in Children)
{
// Child validation
element.Validate (grammar);
}
}
void IElement.PostParse (IElement parent)
{
}
#endregion
//********************************************************************
//
// Protected Properties
//
//*******************************************************************
#region Protected Properties
//TODOC Add Documentation
virtual internal SrgsElement [] Children
{
get
{
return new SrgsElement [0];
}
}
#endregion
//********************************************************************
//
// Private Types
//
//********************************************************************
#region Private Types
// Used by the debugger display attribute
internal class SrgsElementDebugDisplay
{
public SrgsElementDebugDisplay (SrgsElement element)
{
_elements = element.Children;
}
[DebuggerBrowsable (DebuggerBrowsableState.RootHidden)]
public SrgsElement [] AKeys
{
get
{
return _elements;
}
}
private SrgsElement [] _elements;
}
#endregion
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CodeRemoveEventStatement.cs
- View.cs
- RowUpdatedEventArgs.cs
- RegexMatch.cs
- NumberAction.cs
- ByteStack.cs
- MtomMessageEncodingElement.cs
- XPathEmptyIterator.cs
- COAUTHIDENTITY.cs
- SqlFactory.cs
- PtsCache.cs
- ExpressionCopier.cs
- DbConnectionClosed.cs
- safesecurityhelperavalon.cs
- FixedDSBuilder.cs
- WebHeaderCollection.cs
- EqualityComparer.cs
- ParentQuery.cs
- FocusManager.cs
- MobileUserControl.cs
- NameGenerator.cs
- CompilerState.cs
- AbsoluteQuery.cs
- QilName.cs
- CodeDomDesignerLoader.cs
- DefaultIfEmptyQueryOperator.cs
- WebScriptEnablingElement.cs
- AsyncDataRequest.cs
- PackWebRequestFactory.cs
- GeometryCombineModeValidation.cs
- Range.cs
- AdCreatedEventArgs.cs
- LineMetrics.cs
- PackageDigitalSignature.cs
- DataGridPagerStyle.cs
- RectangleConverter.cs
- TextBounds.cs
- HtmlSelect.cs
- Empty.cs
- FontFamily.cs
- Bold.cs
- IndentedWriter.cs
- StyleCollection.cs
- HttpConfigurationSystem.cs
- FunctionCommandText.cs
- panel.cs
- OLEDB_Enum.cs
- EntityDataSourceContextCreatedEventArgs.cs
- VisualStyleTypesAndProperties.cs
- WebPartConnectionCollection.cs
- MessageQueue.cs
- SystemFonts.cs
- ModelPerspective.cs
- XPathNodeIterator.cs
- ImmComposition.cs
- FlowDocumentFormatter.cs
- ServiceKnownTypeAttribute.cs
- SafeNativeMethods.cs
- MbpInfo.cs
- RawUIStateInputReport.cs
- PrintPreviewGraphics.cs
- SqlMethodCallConverter.cs
- MultiPageTextView.cs
- Color.cs
- SchemeSettingElement.cs
- TableRowGroup.cs
- EndpointBehaviorElementCollection.cs
- ThreadAttributes.cs
- RenderTargetBitmap.cs
- TextProperties.cs
- SessionStateModule.cs
- MultiTrigger.cs
- DocobjHost.cs
- SQLDouble.cs
- HtmlWindow.cs
- DrawingContextWalker.cs
- PeerContact.cs
- TextCollapsingProperties.cs
- EntityDataSourceStatementEditorForm.cs
- SqlReferenceCollection.cs
- GridViewUpdatedEventArgs.cs
- Evaluator.cs
- MemoryFailPoint.cs
- InputLanguageManager.cs
- WindowsEditBoxRange.cs
- DefaultShape.cs
- SystemGatewayIPAddressInformation.cs
- FontWeightConverter.cs
- _Win32.cs
- DataGridRelationshipRow.cs
- linebase.cs
- Literal.cs
- DateTimeValueSerializer.cs
- CodeCommentStatement.cs
- BindStream.cs
- HttpResponseWrapper.cs
- PassportIdentity.cs
- AssociationSetMetadata.cs
- ReadOnlyState.cs
- MemoryMappedFile.cs