Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Speech / Src / Internal / GrammarBuilding / GrammarBuilderRuleRef.cs / 1 / GrammarBuilderRuleRef.cs
//------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------
#define CODE_ANALYSIS
using System.Speech.Recognition;
using System.Speech.Internal.SrgsParser;
using System.Diagnostics;
namespace System.Speech.Internal.GrammarBuilding
{
///
///
///
internal sealed class GrammarBuilderRuleRef : GrammarBuilderBase
{
//*******************************************************************
//
// Constructors
//
//*******************************************************************
#region Constructors
///
///
///
///
///
internal GrammarBuilderRuleRef (Uri uri, string rule)
{
_uri = uri.OriginalString + ((rule != null) ? "#" + rule : "");
}
///
///
///
///
private GrammarBuilderRuleRef (string sgrsUri)
{
_uri = sgrsUri;
}
#endregion
//********************************************************************
//
// Public Methods
//
//*******************************************************************
#region Public Methods
/// TODOC <_include file='doc\SpeechAudioFormatInfo.uex' path='docs/doc[@for="SpeechAudioFormatInfo.Equals"]/*' />
public override bool Equals (object obj)
{
GrammarBuilderRuleRef refObj = obj as GrammarBuilderRuleRef;
if (refObj == null)
{
return false;
}
return _uri == refObj._uri;
}
/// TODOC <_include file='doc\SpeechAudioFormatInfo.uex' path='docs/doc[@for="SpeechAudioFormatInfo.GetHashCode"]/*' />
public override int GetHashCode ()
{
return _uri.GetHashCode ();
}
#endregion
//********************************************************************
//
// Internal Methods
//
//********************************************************************
#region Internal Methods
///
///
///
///
internal override GrammarBuilderBase Clone ()
{
return new GrammarBuilderRuleRef (_uri);
}
///
///
///
///
///
///
///
///
internal override IElement CreateElement (IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds)
{
Uri ruleUri = new Uri (_uri, UriKind.RelativeOrAbsolute);
return elementFactory.CreateRuleRef (parent, ruleUri, null, null);
}
#endregion
//*******************************************************************
//
// Internal Properties
//
//********************************************************************
#region Internal Properties
override internal string DebugSummary
{
get
{
return "#" + _uri;
}
}
#endregion
//*******************************************************************
//
// Private Fields
//
//*******************************************************************
#region Private Fields
///
///
///
private readonly string _uri;
#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
- Matrix3D.cs
- QilUnary.cs
- ExternalDataExchangeClient.cs
- ListItemCollection.cs
- SessionPageStateSection.cs
- SchemaTableColumn.cs
- XsdDuration.cs
- CorrelationToken.cs
- RowCache.cs
- Utility.cs
- CodeFieldReferenceExpression.cs
- XmlElement.cs
- SelectionHighlightInfo.cs
- TextDecoration.cs
- TextPointer.cs
- OperationValidationEventArgs.cs
- ButtonStandardAdapter.cs
- EditModeSwitchButton.cs
- HScrollBar.cs
- EntitySetBaseCollection.cs
- Size3DValueSerializer.cs
- BaseResourcesBuildProvider.cs
- TemplatedMailWebEventProvider.cs
- _BaseOverlappedAsyncResult.cs
- CultureTableRecord.cs
- ScrollItemProviderWrapper.cs
- StickyNoteContentControl.cs
- DataKeyCollection.cs
- CompiledAction.cs
- OleDbEnumerator.cs
- EncryptedXml.cs
- Helper.cs
- Soap12ProtocolReflector.cs
- List.cs
- Int32CAMarshaler.cs
- ProviderUtil.cs
- KnownColorTable.cs
- querybuilder.cs
- AncestorChangedEventArgs.cs
- EqualityComparer.cs
- SplitterCancelEvent.cs
- SelectionItemProviderWrapper.cs
- ScriptServiceAttribute.cs
- LongValidatorAttribute.cs
- NumericUpDownAcceleration.cs
- ThreadExceptionDialog.cs
- LookupBindingPropertiesAttribute.cs
- BufferedWebEventProvider.cs
- Configuration.cs
- SelectionEditor.cs
- URLString.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- RegexWorker.cs
- WebBrowser.cs
- ZipIOFileItemStream.cs
- Base64Encoder.cs
- UserControlParser.cs
- ResourceWriter.cs
- Accessible.cs
- AbsoluteQuery.cs
- URIFormatException.cs
- WS2007FederationHttpBindingElement.cs
- StickyNoteHelper.cs
- FileFormatException.cs
- DesignerObjectListAdapter.cs
- SqlNodeAnnotation.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- ListViewEditEventArgs.cs
- WindowsSlider.cs
- FrameworkElementAutomationPeer.cs
- DocumentXmlWriter.cs
- RootProfilePropertySettingsCollection.cs
- ButtonChrome.cs
- securitycriticaldataformultiplegetandset.cs
- CoTaskMemHandle.cs
- StdValidatorsAndConverters.cs
- ScrollContentPresenter.cs
- UpdatableGenericsFeature.cs
- PriorityItem.cs
- Util.cs
- dsa.cs
- OdbcFactory.cs
- ErasingStroke.cs
- ReversePositionQuery.cs
- CacheDependency.cs
- ExpressionEditor.cs
- FormView.cs
- SqlPersonalizationProvider.cs
- HttpHandlerAction.cs
- PrintPageEvent.cs
- TemplatedWizardStep.cs
- EventHandlersStore.cs
- safelinkcollection.cs
- ViewBase.cs
- MetaChildrenColumn.cs
- XmlUtil.cs
- TextTreeFixupNode.cs
- DPTypeDescriptorContext.cs
- Rect3DConverter.cs
- PeerCollaboration.cs