Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / 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
- EdmComplexPropertyAttribute.cs
- FunctionDescription.cs
- _NegotiateClient.cs
- EventDescriptorCollection.cs
- QilReference.cs
- FutureFactory.cs
- Message.cs
- DataRow.cs
- XamlTypeMapper.cs
- NetStream.cs
- SByteConverter.cs
- TextRangeProviderWrapper.cs
- WebPartDisplayModeEventArgs.cs
- CompositeControl.cs
- WebServiceMethodData.cs
- RC2.cs
- GridItem.cs
- XamlStyleSerializer.cs
- HebrewNumber.cs
- InstanceCompleteException.cs
- MouseWheelEventArgs.cs
- ProfessionalColors.cs
- DtdParser.cs
- RowUpdatingEventArgs.cs
- WebPartTracker.cs
- MimeFormatter.cs
- SqlClientPermission.cs
- Utilities.cs
- HandlerBase.cs
- RunWorkerCompletedEventArgs.cs
- ToolboxControl.cs
- BindToObject.cs
- Oid.cs
- PassportPrincipal.cs
- DbMetaDataColumnNames.cs
- PixelFormats.cs
- DecoderReplacementFallback.cs
- InputBinder.cs
- GuidConverter.cs
- HttpProcessUtility.cs
- CodeTypeParameterCollection.cs
- ClientSession.cs
- TextTreeInsertUndoUnit.cs
- ServiceHttpModule.cs
- MemberPath.cs
- SqlStatistics.cs
- ConstNode.cs
- DataChangedEventManager.cs
- ServiceProviders.cs
- DiagnosticTrace.cs
- RadioButtonDesigner.cs
- Crypto.cs
- SmtpDigestAuthenticationModule.cs
- AppDomainShutdownMonitor.cs
- DiagnosticTrace.cs
- PngBitmapEncoder.cs
- TableItemPattern.cs
- DefaultProfileManager.cs
- CorrelationManager.cs
- HttpTransportSecurityElement.cs
- ImageSourceValueSerializer.cs
- DoubleSumAggregationOperator.cs
- PropertyDescriptor.cs
- VisualStyleRenderer.cs
- PropertyGrid.cs
- EntityContainerEmitter.cs
- SrgsOneOf.cs
- ClassDataContract.cs
- StyleBamlRecordReader.cs
- XPathSelectionIterator.cs
- IdentityNotMappedException.cs
- DataBindingCollection.cs
- XmlParserContext.cs
- RSAOAEPKeyExchangeFormatter.cs
- SettingsAttributeDictionary.cs
- TokenDescriptor.cs
- HtmlElementEventArgs.cs
- CorrelationActionMessageFilter.cs
- PasswordPropertyTextAttribute.cs
- ChtmlPhoneCallAdapter.cs
- ProgressiveCrcCalculatingStream.cs
- PropertyKey.cs
- Int64Storage.cs
- WinFormsSpinner.cs
- AnimationClockResource.cs
- RelationshipNavigation.cs
- WebPartDescription.cs
- ByeOperationAsyncResult.cs
- TypeUtil.cs
- ExtendedProtectionPolicyElement.cs
- System.Data_BID.cs
- unsafeIndexingFilterStream.cs
- HttpCachePolicy.cs
- WindowsProgressbar.cs
- XmlSchemaGroupRef.cs
- MatrixAnimationBase.cs
- Range.cs
- SafeLocalMemHandle.cs
- RepeatButtonAutomationPeer.cs
- DataGridViewElement.cs