Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / 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
- TTSEngineTypes.cs
- Italic.cs
- TypeRestriction.cs
- ObjectToken.cs
- HttpClientCertificate.cs
- ChtmlTextBoxAdapter.cs
- FocusWithinProperty.cs
- RegisteredScript.cs
- SerializationInfoEnumerator.cs
- Atom10ItemFormatter.cs
- MailWriter.cs
- FilterRepeater.cs
- DocumentPaginator.cs
- Color.cs
- CommentGlyph.cs
- CellIdBoolean.cs
- ObjectSet.cs
- ToolStripItemClickedEventArgs.cs
- WebPartTransformer.cs
- Utils.cs
- UriTemplateTableMatchCandidate.cs
- FontSourceCollection.cs
- IUnknownConstantAttribute.cs
- GenericPrincipal.cs
- SerTrace.cs
- TextRangeEditLists.cs
- DelegatingConfigHost.cs
- PrimitiveCodeDomSerializer.cs
- Int64Converter.cs
- Margins.cs
- HtmlInputReset.cs
- ScrollChangedEventArgs.cs
- WebPartDisplayModeCancelEventArgs.cs
- StringValueConverter.cs
- TypefaceCollection.cs
- ConfigDefinitionUpdates.cs
- ApplicationGesture.cs
- WCFBuildProvider.cs
- DataGridViewCheckBoxColumn.cs
- PresentationSource.cs
- SystemNetworkInterface.cs
- TextEndOfSegment.cs
- OutputScopeManager.cs
- _NegotiateClient.cs
- CreationContext.cs
- Typeface.cs
- AmbientLight.cs
- newinstructionaction.cs
- ProgressChangedEventArgs.cs
- XmlSchemaAll.cs
- InheritablePropertyChangeInfo.cs
- PKCS1MaskGenerationMethod.cs
- _SslStream.cs
- ToolStripGrip.cs
- BindingMemberInfo.cs
- FormViewInsertedEventArgs.cs
- PageThemeCodeDomTreeGenerator.cs
- PersistenceContextEnlistment.cs
- ClientTarget.cs
- TagMapCollection.cs
- CodeDefaultValueExpression.cs
- LogSwitch.cs
- TypeForwardedToAttribute.cs
- RowSpanVector.cs
- EventHandlersStore.cs
- ResponseBodyWriter.cs
- RTLAwareMessageBox.cs
- HttpHostedTransportConfiguration.cs
- Int64AnimationUsingKeyFrames.cs
- TypeTypeConverter.cs
- DescendantBaseQuery.cs
- PolyBezierSegment.cs
- AuthenticationManager.cs
- EnumMember.cs
- MappingItemCollection.cs
- ProfileService.cs
- SessionKeyExpiredException.cs
- GridEntryCollection.cs
- BufferManager.cs
- DataViewListener.cs
- SelfSignedCertificate.cs
- ListViewDataItem.cs
- WebEncodingValidatorAttribute.cs
- NameObjectCollectionBase.cs
- ResumeStoryboard.cs
- XmlSchemaExternal.cs
- SelectedGridItemChangedEvent.cs
- SchemaImporterExtensionsSection.cs
- WebDescriptionAttribute.cs
- StoryFragments.cs
- MarshalByRefObject.cs
- ParseNumbers.cs
- XMLSchema.cs
- XmlQuerySequence.cs
- connectionpool.cs
- Switch.cs
- FileSystemWatcher.cs
- ConfigXmlComment.cs
- FixedSOMGroup.cs
- DescriptionAttribute.cs