Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Speech / Src / Internal / GrammarBuilding / RuleRefElement.cs / 1 / RuleRefElement.cs
//------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------- using System.Collections.Generic; using System.Diagnostics; using System.Speech.Recognition; using System.Speech.Internal.SrgsParser; using System.Text; namespace System.Speech.Internal.GrammarBuilding { ////// /// [DebuggerDisplay ("{DebugSummary}")] internal sealed class RuleRefElement : GrammarBuilderBase { //******************************************************************* // // Constructors // //******************************************************************* #region Constructors ////// /// /// internal RuleRefElement (RuleElement rule) { _rule = rule; } ////// /// /// /// internal RuleRefElement (RuleElement rule, string semanticKey) { _rule = rule; _semanticKey = semanticKey; } #endregion //******************************************************************** // // Public Methods // //******************************************************************* #region Public Methods /// TODOC <_include file='doc\SpeechAudioFormatInfo.uex' path='docs/doc[@for="SpeechAudioFormatInfo.Equals"]/*' /> public override bool Equals (object obj) { RuleRefElement refObj = obj as RuleRefElement; if (refObj == null) { return false; } return _semanticKey == refObj._semanticKey && _rule.Equals (refObj._rule); } /// TODOC <_include file='doc\SpeechAudioFormatInfo.uex' path='docs/doc[@for="SpeechAudioFormatInfo.GetHashCode"]/*' /> public override int GetHashCode () { return base.GetHashCode (); } #endregion //******************************************************************** // // Internal Methods // //******************************************************************** #region Internal Methods ////// /// /// internal void Add (GrammarBuilderBase item) { _rule.Add (item); } ////// /// ///override internal GrammarBuilderBase Clone () { return new RuleRefElement (_rule, _semanticKey); } /// /// /// ////// internal void CloneItems (RuleRefElement builders) { _rule.CloneItems (builders._rule); } /// /// /// /// /// /// /// ///override internal IElement CreateElement (IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds) { // Create the new rule and add the reference to the item return elementFactory.CreateRuleRef (parent, new Uri ("#" + Rule.RuleName, UriKind.Relative), _semanticKey, null); } #endregion //******************************************************************* // // Internal Properties // //******************************************************************** #region Internal Properties internal RuleElement Rule { get { return _rule; } } override internal string DebugSummary { get { return "#" + Rule.Name + (_semanticKey != null ? ":" + _semanticKey : ""); } } #endregion //******************************************************************* // // Private Fields // //******************************************************************* #region Private Fields /// /// /// private readonly RuleElement _rule; private readonly string _semanticKey; #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
- PersistenceMetadataNamespace.cs
- StaticFileHandler.cs
- FixedSOMLineCollection.cs
- SerialPort.cs
- StatusBarAutomationPeer.cs
- SplashScreen.cs
- CompressEmulationStream.cs
- MultitargetUtil.cs
- RoleService.cs
- TaiwanLunisolarCalendar.cs
- BCLDebug.cs
- SqlDeflator.cs
- StringUtil.cs
- DoubleAnimationUsingPath.cs
- ThemeInfoAttribute.cs
- NullableDoubleMinMaxAggregationOperator.cs
- FixedNode.cs
- GridEntryCollection.cs
- TailPinnedEventArgs.cs
- TransformedBitmap.cs
- GenerateScriptTypeAttribute.cs
- SrgsNameValueTag.cs
- ToolStripPanelSelectionBehavior.cs
- QueryOutputWriter.cs
- BuildProviderAppliesToAttribute.cs
- BlurEffect.cs
- ConfigurationElementProperty.cs
- XmlImplementation.cs
- MdiWindowListItemConverter.cs
- SpellerHighlightLayer.cs
- TagMapCollection.cs
- DataError.cs
- CmsInterop.cs
- XmlSchemaFacet.cs
- AppSettingsSection.cs
- MetaData.cs
- BuildProviderAppliesToAttribute.cs
- DbSetClause.cs
- GPPOINT.cs
- DataGridRowAutomationPeer.cs
- SerializableAttribute.cs
- TypeNameConverter.cs
- StateMachineTimers.cs
- Process.cs
- Region.cs
- RecordManager.cs
- PerformanceCountersElement.cs
- UpdateTranslator.cs
- StateMachine.cs
- GradientStop.cs
- DelegatingConfigHost.cs
- HtmlControlPersistable.cs
- CSharpCodeProvider.cs
- IdentityModelDictionary.cs
- Size.cs
- EntityDataSourceWrapper.cs
- WorkflowServiceHostFactory.cs
- InternalControlCollection.cs
- MethodInfo.cs
- Atom10FormatterFactory.cs
- CodeConditionStatement.cs
- StoreContentChangedEventArgs.cs
- ExternalCalls.cs
- HtmlControl.cs
- WpfWebRequestHelper.cs
- PackWebResponse.cs
- CustomWebEventKey.cs
- PermissionSet.cs
- SolidBrush.cs
- XmlDocumentFragment.cs
- HttpGetClientProtocol.cs
- CTreeGenerator.cs
- FormCollection.cs
- BlockUIContainer.cs
- AccessViolationException.cs
- SelectionRange.cs
- GZipStream.cs
- MiniCustomAttributeInfo.cs
- ClientBuildManager.cs
- AdapterUtil.cs
- QilName.cs
- PopupRootAutomationPeer.cs
- PageThemeParser.cs
- Cursors.cs
- ItemsControl.cs
- DesignColumn.cs
- dbdatarecord.cs
- ObservableCollection.cs
- SafeHandle.cs
- LayoutUtils.cs
- XmlUTF8TextReader.cs
- UnsafeNativeMethods.cs
- BinaryKeyIdentifierClause.cs
- StateMachine.cs
- MessageQueuePermissionAttribute.cs
- MessageSecurityVersion.cs
- ManagedWndProcTracker.cs
- SqlNotificationRequest.cs
- FixedSOMLineCollection.cs
- HtmlShim.cs