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
- CreateUserWizard.cs
- thaishape.cs
- UidPropertyAttribute.cs
- ChangesetResponse.cs
- HttpRequestCacheValidator.cs
- TextElementEditingBehaviorAttribute.cs
- ChannelFactory.cs
- oledbconnectionstring.cs
- DecimalAnimationUsingKeyFrames.cs
- COM2TypeInfoProcessor.cs
- MediaContextNotificationWindow.cs
- WindowsBrush.cs
- HtmlLink.cs
- RtType.cs
- CollectionEditor.cs
- PropertyGridView.cs
- ScriptResourceAttribute.cs
- OutputCacheModule.cs
- BamlResourceSerializer.cs
- DbProviderFactory.cs
- TextViewBase.cs
- RenderCapability.cs
- DrawingVisualDrawingContext.cs
- ToolboxItem.cs
- InternalBufferOverflowException.cs
- SerializationObjectManager.cs
- CompilationPass2Task.cs
- EventPropertyMap.cs
- Point3DAnimationBase.cs
- HttpCacheVary.cs
- CodeCommentStatement.cs
- PenThreadWorker.cs
- TargetFrameworkAttribute.cs
- ApplicationFileParser.cs
- ToolStripItemBehavior.cs
- ProfilePropertyNameValidator.cs
- MultitargetingHelpers.cs
- EntityDataSourceViewSchema.cs
- RelationshipDetailsRow.cs
- BulletedListEventArgs.cs
- Conditional.cs
- BaseCodePageEncoding.cs
- ParallelTimeline.cs
- TypeInfo.cs
- KeyInfo.cs
- ProfilePropertySettingsCollection.cs
- QuadTree.cs
- ReferenceEqualityComparer.cs
- XmlText.cs
- SqlParameter.cs
- OpenTypeCommon.cs
- DllNotFoundException.cs
- LogWriteRestartAreaState.cs
- ArrayList.cs
- EpmTargetTree.cs
- StoreItemCollection.Loader.cs
- ControlParameter.cs
- DataStreamFromComStream.cs
- XmlConvert.cs
- BaseDataList.cs
- ConfigurationSectionGroupCollection.cs
- Matrix3D.cs
- SmtpReplyReaderFactory.cs
- SQlBooleanStorage.cs
- WSTrustDec2005.cs
- SecondaryIndexList.cs
- ColorAnimation.cs
- SqlNodeTypeOperators.cs
- _PooledStream.cs
- COM2TypeInfoProcessor.cs
- StrokeCollectionDefaultValueFactory.cs
- ServiceNotStartedException.cs
- XomlDesignerLoader.cs
- BlockCollection.cs
- QuaternionRotation3D.cs
- ConfigUtil.cs
- DataShape.cs
- XmlSerializerOperationGenerator.cs
- TableStyle.cs
- SetIterators.cs
- SynchronizedChannelCollection.cs
- ResourceDescriptionAttribute.cs
- EventSourceCreationData.cs
- X509Certificate.cs
- EDesignUtil.cs
- DeviceContext2.cs
- ZipIOExtraFieldPaddingElement.cs
- SafeNativeMethodsCLR.cs
- EventInfo.cs
- DesignerActionGlyph.cs
- CheckBoxField.cs
- ExcludePathInfo.cs
- SymbolEqualComparer.cs
- DataSourceNameHandler.cs
- Constants.cs
- HtmlInputText.cs
- OrderByBuilder.cs
- Currency.cs
- PresentationAppDomainManager.cs
- Missing.cs