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
- LogicalTreeHelper.cs
- RoleGroup.cs
- ThreadPoolTaskScheduler.cs
- FormattedTextSymbols.cs
- BaseServiceProvider.cs
- Parameter.cs
- MULTI_QI.cs
- ChineseLunisolarCalendar.cs
- XmlObjectSerializer.cs
- xmlglyphRunInfo.cs
- TextCompositionEventArgs.cs
- ExeContext.cs
- Invariant.cs
- PageResolution.cs
- UInt16.cs
- MouseEvent.cs
- MenuAutomationPeer.cs
- CqlQuery.cs
- InfoCard.cs
- SQLDouble.cs
- Variable.cs
- WebPartTransformer.cs
- PropertyTab.cs
- ParagraphVisual.cs
- SelectionRange.cs
- HostProtectionException.cs
- Claim.cs
- GridViewDeleteEventArgs.cs
- DataGridPagerStyle.cs
- CurrentTimeZone.cs
- DesignBindingPicker.cs
- nulltextcontainer.cs
- File.cs
- cookiecollection.cs
- SettingsPropertyValueCollection.cs
- RenderOptions.cs
- ColumnCollection.cs
- RegexMatchCollection.cs
- Parser.cs
- RegexRunnerFactory.cs
- SecureConversationServiceElement.cs
- NativeCppClassAttribute.cs
- EntityDataSourceViewSchema.cs
- Vector3DKeyFrameCollection.cs
- NullableLongSumAggregationOperator.cs
- OletxEnlistment.cs
- CommentAction.cs
- BasicHttpMessageSecurityElement.cs
- MetafileHeaderWmf.cs
- CopyOnWriteList.cs
- CodeParameterDeclarationExpression.cs
- QuaternionAnimation.cs
- InputScopeManager.cs
- DrawingContextWalker.cs
- InvokeGenerator.cs
- SystemThemeKey.cs
- ApplicationSecurityInfo.cs
- SiteMembershipCondition.cs
- TypeUsageBuilder.cs
- DateTimeOffsetStorage.cs
- HtmlGenericControl.cs
- RtfControlWordInfo.cs
- InputMethodStateChangeEventArgs.cs
- BufferedWebEventProvider.cs
- BaseCodePageEncoding.cs
- BindingObserver.cs
- NextPreviousPagerField.cs
- StringWriter.cs
- DbMetaDataColumnNames.cs
- Graphics.cs
- ClusterSafeNativeMethods.cs
- ProviderBase.cs
- ListItemsCollectionEditor.cs
- MessageBuilder.cs
- ObfuscationAttribute.cs
- RequiredAttributeAttribute.cs
- WeakReadOnlyCollection.cs
- HtmlControlPersistable.cs
- DataView.cs
- XmlSchemaAnyAttribute.cs
- EnumCodeDomSerializer.cs
- WebFaultClientMessageInspector.cs
- OracleCommandBuilder.cs
- OdbcEnvironment.cs
- GridItemProviderWrapper.cs
- PropertyManager.cs
- DynamicMethod.cs
- BaseInfoTable.cs
- AndCondition.cs
- SystemIcmpV4Statistics.cs
- ExpressionBuilder.cs
- DefaultTextStore.cs
- arclist.cs
- WebConfigurationHostFileChange.cs
- Knowncolors.cs
- CommandBindingCollection.cs
- PaperSource.cs
- _WinHttpWebProxyDataBuilder.cs
- ErrorsHelper.cs
- XPathMultyIterator.cs