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
- SchemaConstraints.cs
- FileDialogCustomPlace.cs
- RouteTable.cs
- WeakReference.cs
- Constants.cs
- LockCookie.cs
- SafeEventLogWriteHandle.cs
- DesignerDataSchemaClass.cs
- InsufficientMemoryException.cs
- ComplexTypeEmitter.cs
- CommonGetThemePartSize.cs
- TemplateInstanceAttribute.cs
- PinnedBufferMemoryStream.cs
- SrgsElementFactoryCompiler.cs
- BoundField.cs
- ExceptionHelpers.cs
- SerializationBinder.cs
- WebService.cs
- CodeExporter.cs
- MarshalByRefObject.cs
- LocatorPart.cs
- TiffBitmapEncoder.cs
- SerTrace.cs
- ToolboxItemAttribute.cs
- Debugger.cs
- MeasurementDCInfo.cs
- RichTextBoxConstants.cs
- ScriptResourceAttribute.cs
- MarkupExtensionParser.cs
- AuthenticodeSignatureInformation.cs
- TimeSpanOrInfiniteConverter.cs
- Int32CollectionConverter.cs
- UserControlAutomationPeer.cs
- WrappedKeySecurityToken.cs
- TextEditorTyping.cs
- dsa.cs
- XpsPackagingException.cs
- TypedAsyncResult.cs
- KeyFrames.cs
- ActivityBindForm.Designer.cs
- RoutedCommand.cs
- XpsFilter.cs
- ParserContext.cs
- FtpCachePolicyElement.cs
- Vars.cs
- HttpCacheVary.cs
- Policy.cs
- AttachedPropertyMethodSelector.cs
- Point3DAnimationBase.cs
- Wizard.cs
- InputDevice.cs
- ExpressionVisitor.cs
- PasswordTextNavigator.cs
- Drawing.cs
- BStrWrapper.cs
- CommandPlan.cs
- DataGridTextBoxColumn.cs
- ExpressionCopier.cs
- ByteFacetDescriptionElement.cs
- InlineCategoriesDocument.cs
- TypeConverterValueSerializer.cs
- CharacterBuffer.cs
- OdbcEnvironmentHandle.cs
- SoapEnvelopeProcessingElement.cs
- HtmlHead.cs
- TimerTable.cs
- RegionData.cs
- Material.cs
- DATA_BLOB.cs
- Utils.cs
- CommonXSendMessage.cs
- TransactedBatchingBehavior.cs
- ToolStripButton.cs
- SqlCommandSet.cs
- DataServiceQuery.cs
- CommandExpr.cs
- UiaCoreTypesApi.cs
- FileDialogCustomPlace.cs
- DataGridSortCommandEventArgs.cs
- DataControlField.cs
- ObfuscateAssemblyAttribute.cs
- CriticalExceptions.cs
- formatstringdialog.cs
- DefaultPrintController.cs
- X509Certificate2Collection.cs
- InternalCache.cs
- BrushMappingModeValidation.cs
- VerificationAttribute.cs
- XmlCompatibilityReader.cs
- LayoutTable.cs
- TableChangeProcessor.cs
- ChangePassword.cs
- MimePart.cs
- TouchFrameEventArgs.cs
- RadioButton.cs
- ScrollEvent.cs
- ControlCachePolicy.cs
- BamlRecordWriter.cs
- WindowsFormsSynchronizationContext.cs
- PrintDialog.cs