Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Speech / Src / Internal / GrammarBuilding / GrammarBuilderDictation.cs / 1 / GrammarBuilderDictation.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 GrammarBuilderDictation : GrammarBuilderBase { //******************************************************************* // // Constructors // //******************************************************************* #region Constructors ////// /// internal GrammarBuilderDictation () : this (null) { } ////// /// /// internal GrammarBuilderDictation (string category) { _category = category; } #endregion //******************************************************************** // // Public Methods // //******************************************************************* #region Public Methods /// TODOC <_include file='doc\SpeechAudioFormatInfo.uex' path='docs/doc[@for="SpeechAudioFormatInfo.Equals"]/*' /> public override bool Equals (object obj) { GrammarBuilderDictation refObj = obj as GrammarBuilderDictation; if (refObj == null) { return false; } return _category == refObj._category; } /// TODOC <_include file='doc\SpeechAudioFormatInfo.uex' path='docs/doc[@for="SpeechAudioFormatInfo.GetHashCode"]/*' /> public override int GetHashCode () { return _category == null ? 0 : _category.GetHashCode (); } #endregion //******************************************************************** // // Internal Methods // //******************************************************************** #region Internal Methods ////// /// ///internal override GrammarBuilderBase Clone () { return new GrammarBuilderDictation (_category); } /// /// /// /// /// /// /// ///internal override IElement CreateElement (IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds) { // Return the IRuleRef to the dictation grammar return CreateRuleRefToDictation (elementFactory, parent); } #endregion //******************************************************************* // // Internal Properties // //******************************************************************** #region Internal Properties override internal string DebugSummary { get { string category = _category != null ? ":" + _category : string.Empty; return "dictation" + category; } } #endregion //******************************************************************* // // Private Methods // //******************************************************************* #region Private Methods /// /// /// /// /// ///private IRuleRef CreateRuleRefToDictation (IElementFactory elementFactory, IElement parent) { Uri ruleUri; if (!string.IsNullOrEmpty (_category) && _category == "spelling") { ruleUri = new Uri ("grammar:dictation#spelling", UriKind.RelativeOrAbsolute); } else { ruleUri = new Uri ("grammar:dictation", UriKind.RelativeOrAbsolute); } return elementFactory.CreateRuleRef (parent, ruleUri, null, null); } #endregion //******************************************************************* // // Private Fields // //******************************************************************** #region Private Fields /// /// /// private readonly string _category; #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
- CryptoKeySecurity.cs
- UniqueConstraint.cs
- ObjectMemberMapping.cs
- StylusEventArgs.cs
- WorkflowOwnershipException.cs
- TeredoHelper.cs
- ApplicationSettingsBase.cs
- XsltQilFactory.cs
- CellQuery.cs
- XmlChildEnumerator.cs
- HasCopySemanticsAttribute.cs
- DropSource.cs
- HttpResponse.cs
- WebPartDisplayModeEventArgs.cs
- VisualTreeUtils.cs
- ActivityExecutorOperation.cs
- MenuAutomationPeer.cs
- WindowsComboBox.cs
- EventArgs.cs
- mactripleDES.cs
- XPathNodePointer.cs
- DebugHandleTracker.cs
- PTConverter.cs
- CompiledELinqQueryState.cs
- ChtmlTextBoxAdapter.cs
- StorageRoot.cs
- DeferredTextReference.cs
- SqlEnums.cs
- GPPOINT.cs
- XamlBrushSerializer.cs
- BitmapEffectDrawingContextWalker.cs
- SelectionHighlightInfo.cs
- KerberosSecurityTokenAuthenticator.cs
- FilterEventArgs.cs
- CorrelationToken.cs
- ToolTip.cs
- MetadataCollection.cs
- VirtualizingPanel.cs
- DataServiceCollectionOfT.cs
- errorpatternmatcher.cs
- MethodCallExpression.cs
- ExpressionParser.cs
- Label.cs
- UpDownEvent.cs
- BitStack.cs
- DateTimeOffsetAdapter.cs
- Selector.cs
- ZipFileInfoCollection.cs
- DataKeyArray.cs
- Pointer.cs
- HttpListener.cs
- ListenerElementsCollection.cs
- PeerNearMe.cs
- NotCondition.cs
- UnsafeNativeMethods.cs
- AuthenticationService.cs
- JournalNavigationScope.cs
- ContainerUIElement3D.cs
- Figure.cs
- _NegoStream.cs
- TextRangeEditTables.cs
- AnnouncementEndpointElement.cs
- PrintDocument.cs
- EndEvent.cs
- ApplyHostConfigurationBehavior.cs
- ScriptReferenceEventArgs.cs
- CheckBoxRenderer.cs
- PropertyIDSet.cs
- TypedElement.cs
- SelectionWordBreaker.cs
- TimeSpanMinutesConverter.cs
- InvalidComObjectException.cs
- MetadataCacheItem.cs
- ClassicBorderDecorator.cs
- SystemNetworkInterface.cs
- PropagatorResult.cs
- Table.cs
- SByte.cs
- LoginAutoFormat.cs
- TransactionManager.cs
- FacetDescriptionElement.cs
- CroppedBitmap.cs
- KeyConstraint.cs
- OutputCacheProfileCollection.cs
- WindowsStatusBar.cs
- XmlSchemaImport.cs
- ComponentChangingEvent.cs
- SystemWebSectionGroup.cs
- BinaryObjectWriter.cs
- FontFamilyValueSerializer.cs
- RandomNumberGenerator.cs
- CellParaClient.cs
- WebPartVerb.cs
- ObjectSpanRewriter.cs
- Int16Storage.cs
- InvokeWebService.cs
- HandleExceptionArgs.cs
- PolyBezierSegmentFigureLogic.cs
- ConfigurationLockCollection.cs
- XamlWriter.cs