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
- ValidationService.cs
- ComponentDispatcher.cs
- VirtualizedItemProviderWrapper.cs
- CounterCreationDataCollection.cs
- ElapsedEventArgs.cs
- MemoryPressure.cs
- Model3DGroup.cs
- KeyGesture.cs
- DynamicPropertyReader.cs
- ProcessThread.cs
- ProtectedConfigurationSection.cs
- GeometryDrawing.cs
- QueueProcessor.cs
- MetaTableHelper.cs
- InvalidateEvent.cs
- WinEventQueueItem.cs
- GroupLabel.cs
- InstancePersistenceContext.cs
- UnauthorizedAccessException.cs
- XmlAnyElementAttributes.cs
- CounterCreationDataCollection.cs
- Container.cs
- TableLayoutSettings.cs
- URLBuilder.cs
- TreeNodeBindingCollection.cs
- WSTrustFeb2005.cs
- StringUtil.cs
- _HeaderInfo.cs
- ModelItem.cs
- EmptyImpersonationContext.cs
- AttributeCollection.cs
- FreezableOperations.cs
- ByteStreamGeometryContext.cs
- SamlSubject.cs
- XmlSignificantWhitespace.cs
- SystemParameters.cs
- RangeBase.cs
- PublisherIdentityPermission.cs
- COAUTHINFO.cs
- KeyManager.cs
- BasicCellRelation.cs
- SelectionItemProviderWrapper.cs
- SrgsDocument.cs
- RenderingEventArgs.cs
- HttpListenerRequestUriBuilder.cs
- ServerIdentity.cs
- MsmqChannelFactory.cs
- UpDownEvent.cs
- X509InitiatorCertificateServiceElement.cs
- DBCSCodePageEncoding.cs
- KeyTime.cs
- Brush.cs
- ToolStripSeparatorRenderEventArgs.cs
- BooleanSwitch.cs
- NamedElement.cs
- UnsafeNativeMethods.cs
- TdsRecordBufferSetter.cs
- TitleStyle.cs
- BamlBinaryWriter.cs
- TargetParameterCountException.cs
- UnionExpr.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- ConfigurationValues.cs
- DataDesignUtil.cs
- FrameworkObject.cs
- HttpInputStream.cs
- ScrollBarRenderer.cs
- SchemaTableOptionalColumn.cs
- PropertyFilterAttribute.cs
- XmlObjectSerializerWriteContextComplex.cs
- TemplateControl.cs
- ImageUrlEditor.cs
- TrackingDataItemValue.cs
- UpDownBase.cs
- GetReadStreamResult.cs
- EllipticalNodeOperations.cs
- ObjectTokenCategory.cs
- TypeConverterValueSerializer.cs
- ControlEvent.cs
- PinnedBufferMemoryStream.cs
- TransportChannelListener.cs
- Int32Animation.cs
- ConstantProjectedSlot.cs
- CellTreeSimplifier.cs
- Int16Animation.cs
- DataSetMappper.cs
- DataGridViewHitTestInfo.cs
- CompilerGeneratedAttribute.cs
- XmlAttributes.cs
- Msmq4PoisonHandler.cs
- EntitySetBase.cs
- AlphaSortedEnumConverter.cs
- SelectionItemPattern.cs
- CompileXomlTask.cs
- InvalidPipelineStoreException.cs
- Repeater.cs
- Metafile.cs
- VersionUtil.cs
- PeerObject.cs
- IntranetCredentialPolicy.cs