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
- TerminateSequenceResponse.cs
- StylusPoint.cs
- ColumnResizeAdorner.cs
- ScriptControl.cs
- ToolStripMenuItem.cs
- CanExecuteRoutedEventArgs.cs
- DefaultPropertyAttribute.cs
- DropDownList.cs
- Logging.cs
- SerializationSectionGroup.cs
- DataGridRow.cs
- Composition.cs
- ScriptHandlerFactory.cs
- ToolStripItemImageRenderEventArgs.cs
- EventMappingSettings.cs
- SessionPageStateSection.cs
- DataServiceQueryProvider.cs
- CompatibleComparer.cs
- SchemaDeclBase.cs
- NewArray.cs
- StdValidatorsAndConverters.cs
- UseManagedPresentationBindingElementImporter.cs
- SynchronizedDispatch.cs
- GridViewColumn.cs
- ThemeDirectoryCompiler.cs
- GenerateDerivedKeyRequest.cs
- PropertyOverridesDialog.cs
- TraceContext.cs
- ContractComponent.cs
- ItemChangedEventArgs.cs
- CompilerGlobalScopeAttribute.cs
- LambdaCompiler.Address.cs
- DataObjectFieldAttribute.cs
- EncodingNLS.cs
- JavascriptCallbackBehaviorAttribute.cs
- UserNameSecurityTokenAuthenticator.cs
- BitmapEffectInput.cs
- RealProxy.cs
- WebBrowserUriTypeConverter.cs
- XPathSingletonIterator.cs
- ListBoxItemAutomationPeer.cs
- DocumentsTrace.cs
- SafeNativeMethods.cs
- QueryOutputWriter.cs
- IriParsingElement.cs
- versioninfo.cs
- GlyphRun.cs
- BridgeDataRecord.cs
- UserMapPath.cs
- EditorZone.cs
- SqlDataSourceStatusEventArgs.cs
- ToolStripGripRenderEventArgs.cs
- LinkedList.cs
- CultureSpecificCharacterBufferRange.cs
- WSDualHttpBinding.cs
- ObjectSet.cs
- SubstitutionList.cs
- Point3DCollectionValueSerializer.cs
- DataBindingHandlerAttribute.cs
- DataGridViewCellCollection.cs
- NetworkInformationException.cs
- DBConcurrencyException.cs
- Encoder.cs
- IdentityReference.cs
- NonNullItemCollection.cs
- HttpApplicationFactory.cs
- ExpressionVisitor.cs
- DynamicControlParameter.cs
- Constants.cs
- Encoding.cs
- ScriptingRoleServiceSection.cs
- XamlUtilities.cs
- ScalarConstant.cs
- updatecommandorderer.cs
- TiffBitmapDecoder.cs
- GlobalizationSection.cs
- BinaryConverter.cs
- Scene3D.cs
- XamlSerializerUtil.cs
- StrokeNodeEnumerator.cs
- StylusPointPropertyInfoDefaults.cs
- OutputCacheProfileCollection.cs
- AccessViolationException.cs
- KnownTypesHelper.cs
- EpmTargetPathSegment.cs
- CancellationState.cs
- XPathDocumentBuilder.cs
- XamlRtfConverter.cs
- Completion.cs
- DurableErrorHandler.cs
- ConstraintConverter.cs
- BitmapPalettes.cs
- StreamSecurityUpgradeInitiator.cs
- SmtpFailedRecipientsException.cs
- IpcServerChannel.cs
- EmbeddedMailObjectsCollection.cs
- EdmFunctionAttribute.cs
- ResourceDictionaryCollection.cs
- EntityDataSourceValidationException.cs
- IdentityReference.cs