Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Speech / Src / Recognition / SrgsGrammar / SrgsText.cs / 1 / SrgsText.cs
//---------------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // // // Description: // // History: // 5/1/2004 jeanfp Created from the Kurosawa Code //--------------------------------------------------------------------------- using System; using System.Diagnostics; using System.Speech.Internal; using System.Speech.Internal.SrgsParser; using System.Xml; #pragma warning disable 1634, 1691 // Allows suppression of certain PreSharp messages. namespace System.Speech.Recognition.SrgsGrammar { /// TODOC <_include file='doc\SrgsText.uex' path='docs/doc[@for="SrgsText"]/*' /> [Serializable] [DebuggerDisplay ("{DebuggerDisplayString ()}")] public class SrgsText : SrgsElement, IElementText { //******************************************************************* // // Constructors // //******************************************************************* #region Constructors /// TODOC <_include file='doc\SrgsText.uex' path='docs/doc[@for="SrgsText.SrgsText1"]/*' /> public SrgsText () { } #pragma warning disable 56507 /// TODOC <_include file='doc\SrgsText.uex' path='docs/doc[@for="SrgsText.SrgsText2"]/*' /> public SrgsText (string text) { Helpers.ThrowIfNull (text, "text"); Text = text; } #endregion //******************************************************************** // // Public Properties // //******************************************************************* #region public Properties /// TODOC <_include file='doc\SrgsText.uex' path='docs/doc[@for="SrgsText.Text"]/*' /> public string Text { get { return _text; } set { Helpers.ThrowIfNull (value, "value"); // Parse the text to check for errors XmlParser.ParseText (null, value, null, null, -1f, null); _text = value; } } #pragma warning restore 56507 #endregion //******************************************************************** // // Internal Methods // //******************************************************************** #region Internal Methods internal override void WriteSrgs (XmlWriter writer) { // Write _text if any if (_text != null && _text.Length > 0) { writer.WriteString (_text); } } internal override string DebuggerDisplayString () { return "'" + _text + "'"; } #endregion //******************************************************************* // // Private Fields // //******************************************************************** #region Private Fields private string _text = string.Empty; #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // // // Description: // // History: // 5/1/2004 jeanfp Created from the Kurosawa Code //--------------------------------------------------------------------------- using System; using System.Diagnostics; using System.Speech.Internal; using System.Speech.Internal.SrgsParser; using System.Xml; #pragma warning disable 1634, 1691 // Allows suppression of certain PreSharp messages. namespace System.Speech.Recognition.SrgsGrammar { /// TODOC <_include file='doc\SrgsText.uex' path='docs/doc[@for="SrgsText"]/*' /> [Serializable] [DebuggerDisplay ("{DebuggerDisplayString ()}")] public class SrgsText : SrgsElement, IElementText { //******************************************************************* // // Constructors // //******************************************************************* #region Constructors /// TODOC <_include file='doc\SrgsText.uex' path='docs/doc[@for="SrgsText.SrgsText1"]/*' /> public SrgsText () { } #pragma warning disable 56507 /// TODOC <_include file='doc\SrgsText.uex' path='docs/doc[@for="SrgsText.SrgsText2"]/*' /> public SrgsText (string text) { Helpers.ThrowIfNull (text, "text"); Text = text; } #endregion //******************************************************************** // // Public Properties // //******************************************************************* #region public Properties /// TODOC <_include file='doc\SrgsText.uex' path='docs/doc[@for="SrgsText.Text"]/*' /> public string Text { get { return _text; } set { Helpers.ThrowIfNull (value, "value"); // Parse the text to check for errors XmlParser.ParseText (null, value, null, null, -1f, null); _text = value; } } #pragma warning restore 56507 #endregion //******************************************************************** // // Internal Methods // //******************************************************************** #region Internal Methods internal override void WriteSrgs (XmlWriter writer) { // Write _text if any if (_text != null && _text.Length > 0) { writer.WriteString (_text); } } internal override string DebuggerDisplayString () { return "'" + _text + "'"; } #endregion //******************************************************************* // // Private Fields // //******************************************************************** #region Private Fields private string _text = string.Empty; #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- cache.cs
- ManipulationDelta.cs
- OracleParameterCollection.cs
- Expression.cs
- StreamInfo.cs
- PassportAuthenticationEventArgs.cs
- GPPOINTF.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- RegexCompilationInfo.cs
- DataGridViewCheckBoxColumn.cs
- CompositeControlDesigner.cs
- XPathParser.cs
- WorkflowTransactionService.cs
- IgnoreSectionHandler.cs
- ConfigurationStrings.cs
- TimeoutTimer.cs
- TreeNodeBinding.cs
- CompiledRegexRunnerFactory.cs
- CannotUnloadAppDomainException.cs
- HtmlInputReset.cs
- DownloadProgressEventArgs.cs
- ErrorEventArgs.cs
- TcpHostedTransportConfiguration.cs
- FunctionDetailsReader.cs
- Journaling.cs
- WindowsComboBox.cs
- ByeMessageCD1.cs
- COM2Properties.cs
- XPathExpr.cs
- ListViewAutomationPeer.cs
- AdornerPresentationContext.cs
- RangeValueProviderWrapper.cs
- FamilyTypefaceCollection.cs
- _NtlmClient.cs
- GeometryHitTestResult.cs
- OdbcConnection.cs
- PackageDigitalSignatureManager.cs
- ActivityCodeDomSerializer.cs
- CodeDomExtensionMethods.cs
- XmlWrappingWriter.cs
- StyleTypedPropertyAttribute.cs
- SchemaDeclBase.cs
- WpfWebRequestHelper.cs
- SR.cs
- HandledMouseEvent.cs
- HtmlImage.cs
- StringValidatorAttribute.cs
- Message.cs
- ProvidePropertyAttribute.cs
- DocumentXPathNavigator.cs
- CounterSampleCalculator.cs
- FileFormatException.cs
- LogConverter.cs
- TreeNodeBinding.cs
- StrokeSerializer.cs
- Marshal.cs
- DataGridViewSortCompareEventArgs.cs
- WebConfigurationHostFileChange.cs
- BamlRecords.cs
- XmlSchemaComplexContentRestriction.cs
- OverflowException.cs
- BitVector32.cs
- ProgressPage.cs
- DataExchangeServiceBinder.cs
- securitymgrsite.cs
- LockCookie.cs
- SRef.cs
- JapaneseLunisolarCalendar.cs
- PropertyValueUIItem.cs
- ExpressionBindingCollection.cs
- DataControlLinkButton.cs
- TimeSpanConverter.cs
- ColumnResizeUndoUnit.cs
- DbConnectionOptions.cs
- WindowsFormsHost.cs
- LicenseContext.cs
- CodeVariableDeclarationStatement.cs
- ProfileInfo.cs
- SmiMetaDataProperty.cs
- ModelItemCollectionImpl.cs
- AssemblyFilter.cs
- DrawingBrush.cs
- TagNameToTypeMapper.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- ConnectionStringSettings.cs
- XmlAttributeProperties.cs
- IsolatedStorageFile.cs
- DetailsViewPageEventArgs.cs
- GeneratedCodeAttribute.cs
- ProfileSettingsCollection.cs
- _SingleItemRequestCache.cs
- BinaryUtilClasses.cs
- FilterEventArgs.cs
- HttpFileCollection.cs
- LayoutTable.cs
- StatusBarItem.cs
- MaskedTextProvider.cs
- MeshGeometry3D.cs
- DesignerHelpers.cs
- VBIdentifierTrimConverter.cs