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 / 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. // //----------------------------------------------------------------- #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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FilteredSchemaElementLookUpTable.cs
- DeviceContexts.cs
- CodeLinePragma.cs
- securitymgrsite.cs
- CatalogPartChrome.cs
- DecimalKeyFrameCollection.cs
- GenericIdentity.cs
- SiteIdentityPermission.cs
- RuntimeEnvironment.cs
- SqlInternalConnectionTds.cs
- XPathNode.cs
- RedBlackList.cs
- TextBoxBase.cs
- NonClientArea.cs
- NamespaceListProperty.cs
- xdrvalidator.cs
- SafeFileHandle.cs
- FunctionParameter.cs
- TextServicesProperty.cs
- ChildDocumentBlock.cs
- CommandField.cs
- ColumnWidthChangingEvent.cs
- ProtocolViolationException.cs
- QuaternionKeyFrameCollection.cs
- XmlSchemaComplexContent.cs
- OdbcEnvironment.cs
- HtmlElementErrorEventArgs.cs
- TextBoxRenderer.cs
- ReferenceConverter.cs
- PrintController.cs
- NativeMethods.cs
- XmlTypeMapping.cs
- EncoderBestFitFallback.cs
- XmlSchemaChoice.cs
- HttpVersion.cs
- webeventbuffer.cs
- Menu.cs
- MaskInputRejectedEventArgs.cs
- XmlNamedNodeMap.cs
- HasActivatableWorkflowEvent.cs
- WebHeaderCollection.cs
- DocumentSequenceHighlightLayer.cs
- PortCache.cs
- WebEncodingValidator.cs
- EmptyControlCollection.cs
- BamlResourceDeserializer.cs
- ChangeProcessor.cs
- MulticastNotSupportedException.cs
- SqlServer2KCompatibilityAnnotation.cs
- SystemUnicastIPAddressInformation.cs
- IndependentAnimationStorage.cs
- OneOfTypeConst.cs
- InputBinding.cs
- XmlArrayItemAttributes.cs
- DataGridSortCommandEventArgs.cs
- SystemUnicastIPAddressInformation.cs
- ScriptControl.cs
- IndicCharClassifier.cs
- CompositeDataBoundControl.cs
- SpeechSeg.cs
- SqlConnectionPoolGroupProviderInfo.cs
- RuleDefinitions.cs
- sqlstateclientmanager.cs
- TemplateNameScope.cs
- CommandBindingCollection.cs
- RepeatInfo.cs
- DocumentCollection.cs
- TreeNodeEventArgs.cs
- DataListItemCollection.cs
- OperationValidationEventArgs.cs
- TextWriter.cs
- CountAggregationOperator.cs
- MutableAssemblyCacheEntry.cs
- SqlIdentifier.cs
- XmlCustomFormatter.cs
- StylusEventArgs.cs
- Compiler.cs
- SmtpException.cs
- NativeMethods.cs
- PartitionResolver.cs
- QilInvoke.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- PropertyChangedEventManager.cs
- TrustLevel.cs
- SynchronizedInputProviderWrapper.cs
- VariableAction.cs
- ConfigurationPropertyCollection.cs
- WebControlParameterProxy.cs
- EditingScopeUndoUnit.cs
- DataSourceCacheDurationConverter.cs
- EdmConstants.cs
- MessagePartDescriptionCollection.cs
- ZipIOLocalFileBlock.cs
- DSASignatureFormatter.cs
- DefaultParameterValueAttribute.cs
- ThreadStateException.cs
- ObsoleteAttribute.cs
- UnhandledExceptionEventArgs.cs
- ContourSegment.cs
- GridViewPageEventArgs.cs