Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Speech / Src / Internal / ObjectToken / VoiceObjectToken.cs / 1 / VoiceObjectToken.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: // Encapsulation for an Object Token of type voice // // History: // 7/1/2004 jeanfp //--------------------------------------------------------------------------- using Microsoft.Win32; using System; using System.Diagnostics; using RegistryEntry = System.Collections.Generic.KeyValuePair; namespace System.Speech.Internal.ObjectTokens { /// /// Summary description for VoiceObjectToken. /// #if VSCOMPILE [DebuggerDisplay ("{Name}")] #endif internal class VoiceObjectToken : ObjectToken { //******************************************************************* // // Constructors // //******************************************************************* #region Constructors protected VoiceObjectToken (string keyId, RegistryKey hkey) : base (keyId, hkey) { } static internal VoiceObjectToken Create (string sCategoryId, string sTokenId) { string id; RegistryKey hkey = ObjectToken.CreateKey (sCategoryId, sTokenId, false, out id); if (hkey != null) { return new VoiceObjectToken (id, hkey); } return null; } #endregion //******************************************************************** // // Public Methods // //******************************************************************* #region Public Methods /// TODOC public override bool Equals (object obj) { VoiceObjectToken refObj = obj as VoiceObjectToken; if (refObj == null) { return false; } return Id == refObj.Id; } /// TODOC public override int GetHashCode () { return Id.GetHashCode (); } #endregion //******************************************************************** // // Internal Properties // //******************************************************************** #region Internal Properties ////// Returns the Age from a voice token /// ///internal string Age { get { string age; if (Attributes == null || !Attributes.TryGetString ("Age", out age)) { age = string.Empty; } return age; } } /// /// Returns the gender /// ///internal string Gender { get { string gender; if (Attributes == null || !Attributes.TryGetString ("Gender", out gender)) { gender = string.Empty; } return gender; } } #if SPEECHSERVER internal VoiceCategory VoiceCategory { set { _category = value; } get { return _category; } } #endif #endregion //******************************************************************* // // Protected Methods // //******************************************************************** #region Protected Methods protected override void Dispose (bool disposing) { base.Dispose (disposing); } #endregion //******************************************************************* // // Private Fields // //******************************************************************* #region Private Fields #if SPEECHSERVER private VoiceCategory _category = VoiceCategory.Default; #endif #endregion } //******************************************************************* // // Private Types // //******************************************************************** #region Private Types #if SPEECHSERVER internal enum VoiceCategory { Default, ScanSoft } #endif #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // // Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: // Encapsulation for an Object Token of type voice // // History: // 7/1/2004 jeanfp //--------------------------------------------------------------------------- using Microsoft.Win32; using System; using System.Diagnostics; using RegistryEntry = System.Collections.Generic.KeyValuePair; namespace System.Speech.Internal.ObjectTokens { /// /// Summary description for VoiceObjectToken. /// #if VSCOMPILE [DebuggerDisplay ("{Name}")] #endif internal class VoiceObjectToken : ObjectToken { //******************************************************************* // // Constructors // //******************************************************************* #region Constructors protected VoiceObjectToken (string keyId, RegistryKey hkey) : base (keyId, hkey) { } static internal VoiceObjectToken Create (string sCategoryId, string sTokenId) { string id; RegistryKey hkey = ObjectToken.CreateKey (sCategoryId, sTokenId, false, out id); if (hkey != null) { return new VoiceObjectToken (id, hkey); } return null; } #endregion //******************************************************************** // // Public Methods // //******************************************************************* #region Public Methods /// TODOC public override bool Equals (object obj) { VoiceObjectToken refObj = obj as VoiceObjectToken; if (refObj == null) { return false; } return Id == refObj.Id; } /// TODOC public override int GetHashCode () { return Id.GetHashCode (); } #endregion //******************************************************************** // // Internal Properties // //******************************************************************** #region Internal Properties ////// Returns the Age from a voice token /// ///internal string Age { get { string age; if (Attributes == null || !Attributes.TryGetString ("Age", out age)) { age = string.Empty; } return age; } } /// /// Returns the gender /// ///internal string Gender { get { string gender; if (Attributes == null || !Attributes.TryGetString ("Gender", out gender)) { gender = string.Empty; } return gender; } } #if SPEECHSERVER internal VoiceCategory VoiceCategory { set { _category = value; } get { return _category; } } #endif #endregion //******************************************************************* // // Protected Methods // //******************************************************************** #region Protected Methods protected override void Dispose (bool disposing) { base.Dispose (disposing); } #endregion //******************************************************************* // // Private Fields // //******************************************************************* #region Private Fields #if SPEECHSERVER private VoiceCategory _category = VoiceCategory.Default; #endif #endregion } //******************************************************************* // // Private Types // //******************************************************************** #region Private Types #if SPEECHSERVER internal enum VoiceCategory { Default, ScanSoft } #endif #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
- MultipleViewProviderWrapper.cs
- Rect.cs
- NamespaceList.cs
- TextMessageEncodingElement.cs
- Win32MouseDevice.cs
- ComEventsSink.cs
- IndentTextWriter.cs
- HtmlAnchor.cs
- Compiler.cs
- DecimalConstantAttribute.cs
- PageSettings.cs
- SqlDataReader.cs
- WebServiceEnumData.cs
- TypedRowGenerator.cs
- AppliesToBehaviorDecisionTable.cs
- AnimationException.cs
- BinaryExpression.cs
- PrinterUnitConvert.cs
- DeleteWorkflowOwnerCommand.cs
- Utils.cs
- SpellCheck.cs
- RTLAwareMessageBox.cs
- IntSecurity.cs
- DesignerActionTextItem.cs
- ContextBase.cs
- EncryptedData.cs
- ToolStripGrip.cs
- ReferencedAssembly.cs
- precedingsibling.cs
- ProcessModelSection.cs
- EnumMember.cs
- Calendar.cs
- StringValidatorAttribute.cs
- XmlSchemaSimpleTypeRestriction.cs
- VisualStyleRenderer.cs
- AsyncContentLoadedEventArgs.cs
- CollectionViewGroupInternal.cs
- ObjectDataSourceMethodEventArgs.cs
- PathFigureCollectionValueSerializer.cs
- ListViewItemEventArgs.cs
- ModuleElement.cs
- OleDbSchemaGuid.cs
- WSFederationHttpSecurity.cs
- DataErrorValidationRule.cs
- TypeUnloadedException.cs
- HtmlTitle.cs
- PersonalizationProviderHelper.cs
- SqlLiftWhereClauses.cs
- Point3DConverter.cs
- MetadataReference.cs
- ClientUrlResolverWrapper.cs
- StreamAsIStream.cs
- WebControl.cs
- QueryActivatableWorkflowsCommand.cs
- Char.cs
- ISFClipboardData.cs
- ToolboxBitmapAttribute.cs
- GeneralTransform.cs
- ToolConsole.cs
- RawUIStateInputReport.cs
- BindableTemplateBuilder.cs
- EventLogWatcher.cs
- BlockCollection.cs
- DataColumn.cs
- AssociationTypeEmitter.cs
- FacetEnabledSchemaElement.cs
- WebDisplayNameAttribute.cs
- SHA256Cng.cs
- FullTextState.cs
- Condition.cs
- RichTextBoxContextMenu.cs
- TraceHelpers.cs
- XmlUtil.cs
- NetCodeGroup.cs
- HttpDictionary.cs
- ContentDefinition.cs
- ToolboxItemAttribute.cs
- Point3DCollection.cs
- BrushValueSerializer.cs
- Command.cs
- WebPartEventArgs.cs
- OdbcHandle.cs
- Localizer.cs
- _ServiceNameStore.cs
- TransformedBitmap.cs
- ModelService.cs
- FixedSOMTextRun.cs
- GridViewPageEventArgs.cs
- KnownColorTable.cs
- SecurityElement.cs
- DataServiceRequest.cs
- Stack.cs
- _BufferOffsetSize.cs
- PaintValueEventArgs.cs
- ClientBuildManagerCallback.cs
- AsymmetricSignatureFormatter.cs
- ExpandSegment.cs
- SQLRoleProvider.cs
- VisualStyleInformation.cs
- RequestTimeoutManager.cs