Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Speech / Src / Internal / SapiAttributeParser.cs / 1 / SapiAttributeParser.cs
//------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------- using System; using System.Collections.Generic; using System.Globalization; using System.Speech.Internal.SapiInterop; #if !SPEECHSERVER using System.Speech.AudioFormat; #endif namespace System.Speech.Internal { internal static class SapiAttributeParser { //******************************************************************* // // Internal Methods // //******************************************************************* #region Internal Methods static internal CultureInfo GetCultureInfoFromLanguageString (string valueString) { string [] strings = valueString.Split (';'); string langStringTrim = strings [0].Trim (); if (!string.IsNullOrEmpty (langStringTrim)) { try { return new CultureInfo (Int32.Parse (langStringTrim, NumberStyles.HexNumber, CultureInfo.InvariantCulture), false); } catch (ArgumentException) { return null; // If we have an invalid language id ignore it. Otherwise enumerating recognizers or voices would fail. } } return null; } #if !SPEECHSERVER static internal ListGetAudioFormatsFromString(string valueString) { List formatList = new List (); string [] strings = valueString.Split (';'); for (int i = 0; i < strings.Length; i++) { string formatString = strings [i].Trim (); if (!string.IsNullOrEmpty (formatString)) { SpeechAudioFormatInfo formatInfo = AudioFormatConverter.ToSpeechAudioFormatInfo (formatString); if (formatInfo != null) // Skip cases where a Guid is used. { formatList.Add (formatInfo); } } } return formatList; } #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
- BrushValueSerializer.cs
- XamlVector3DCollectionSerializer.cs
- WindowsEditBox.cs
- WaitForChangedResult.cs
- JsonByteArrayDataContract.cs
- RepeaterItem.cs
- PersonalizationDictionary.cs
- PartialTrustVisibleAssembly.cs
- SoapInteropTypes.cs
- ProfileManager.cs
- RecognizerStateChangedEventArgs.cs
- GuidConverter.cs
- NativeMethods.cs
- BrowserCapabilitiesCompiler.cs
- EraserBehavior.cs
- CancellationTokenSource.cs
- ListBase.cs
- PropertyInformationCollection.cs
- NativeMethods.cs
- FamilyMap.cs
- DBBindings.cs
- SafeEventLogWriteHandle.cs
- WebPartConnectionsDisconnectVerb.cs
- NonVisualControlAttribute.cs
- Rectangle.cs
- WebScriptClientGenerator.cs
- UTF8Encoding.cs
- MediaElementAutomationPeer.cs
- Inline.cs
- Triplet.cs
- StopStoryboard.cs
- CodeCommentStatementCollection.cs
- RunClient.cs
- ComMethodElement.cs
- TrustManagerPromptUI.cs
- DataMisalignedException.cs
- DataGridViewCellFormattingEventArgs.cs
- ColumnCollection.cs
- DictionaryEntry.cs
- SerTrace.cs
- Stream.cs
- TreeNodeStyle.cs
- TypeUtil.cs
- GridLengthConverter.cs
- DataGridViewLinkColumn.cs
- TdsValueSetter.cs
- MethodToken.cs
- BaseCodePageEncoding.cs
- WSDualHttpBindingCollectionElement.cs
- SoapAttributeAttribute.cs
- UriTemplateDispatchFormatter.cs
- FlowDocumentPaginator.cs
- AnalyzedTree.cs
- _ProxyChain.cs
- HierarchicalDataBoundControl.cs
- followingsibling.cs
- PathData.cs
- XmlObjectSerializerWriteContext.cs
- WebPartEditVerb.cs
- ReservationNotFoundException.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- MethodImplAttribute.cs
- AnimationClockResource.cs
- XmlSchemaSimpleTypeRestriction.cs
- ApplicationSecurityManager.cs
- XsdBuildProvider.cs
- FunctionMappingTranslator.cs
- Int32CAMarshaler.cs
- CheckBox.cs
- RoleExceptions.cs
- AllMembershipCondition.cs
- XLinq.cs
- Label.cs
- AutomationAttributeInfo.cs
- ClientProtocol.cs
- HttpGetServerProtocol.cs
- SmtpDigestAuthenticationModule.cs
- SafeFileMapViewHandle.cs
- IgnoreFileBuildProvider.cs
- TaiwanLunisolarCalendar.cs
- RuntimeHandles.cs
- HttpStreamXmlDictionaryReader.cs
- StrokeSerializer.cs
- DateTime.cs
- XmlAttribute.cs
- EmptyControlCollection.cs
- MetadataArtifactLoaderCompositeResource.cs
- ComEventsMethod.cs
- HostingEnvironmentException.cs
- WebPartEditorOkVerb.cs
- RegexCompiler.cs
- CharacterShapingProperties.cs
- Dump.cs
- MarkupObject.cs
- DataServices.cs
- SessionIDManager.cs
- GridViewItemAutomationPeer.cs
- CatalogPartCollection.cs
- HttpValueCollection.cs
- ExpressionEditorAttribute.cs