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
- SqlProfileProvider.cs
- EntityTransaction.cs
- TempFiles.cs
- WrapperEqualityComparer.cs
- FocusManager.cs
- BounceEase.cs
- WebPartCatalogCloseVerb.cs
- Message.cs
- BaseResourcesBuildProvider.cs
- EdmProviderManifest.cs
- InvariantComparer.cs
- RijndaelManagedTransform.cs
- PenThread.cs
- SerTrace.cs
- FormsAuthenticationUserCollection.cs
- SecurityTokenValidationException.cs
- Command.cs
- milexports.cs
- DateTimeOffset.cs
- GridViewUpdateEventArgs.cs
- HashStream.cs
- DBSchemaTable.cs
- ExpanderAutomationPeer.cs
- DynamicPropertyHolder.cs
- DbResourceAllocator.cs
- OracleRowUpdatingEventArgs.cs
- Header.cs
- EncoderExceptionFallback.cs
- TimeZoneNotFoundException.cs
- LineMetrics.cs
- EditingCoordinator.cs
- DataControlImageButton.cs
- ResourceReferenceKeyNotFoundException.cs
- Site.cs
- _TLSstream.cs
- ResXFileRef.cs
- ScrollChangedEventArgs.cs
- XmlParserContext.cs
- PixelFormats.cs
- XmlNodeReader.cs
- CatalogPartDesigner.cs
- BinaryMessageEncoder.cs
- Table.cs
- LineMetrics.cs
- XPathChildIterator.cs
- CodeConstructor.cs
- XmlRawWriterWrapper.cs
- LicenseException.cs
- IndexingContentUnit.cs
- ChangePassword.cs
- App.cs
- DefaultDialogButtons.cs
- Property.cs
- SimpleModelProvider.cs
- HttpCapabilitiesEvaluator.cs
- ImageSourceValueSerializer.cs
- OleDbEnumerator.cs
- PackagingUtilities.cs
- ReceiveMessageContent.cs
- DefaultConfirmation.cs
- XmlElementAttributes.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- BitmapSourceSafeMILHandle.cs
- NamedPipeProcessProtocolHandler.cs
- Parser.cs
- SettingsPropertyWrongTypeException.cs
- Assembly.cs
- KeyGestureConverter.cs
- WebPartVerbCollection.cs
- LookupNode.cs
- PeerCollaborationPermission.cs
- CryptoApi.cs
- DataServiceProcessingPipelineEventArgs.cs
- WebEventTraceProvider.cs
- CancelRequestedRecord.cs
- DataBoundLiteralControl.cs
- FormViewPageEventArgs.cs
- PeerNameRecord.cs
- DbConnectionInternal.cs
- FileDialog.cs
- SchemaNamespaceManager.cs
- TraceHandler.cs
- TabItemWrapperAutomationPeer.cs
- XmlSchemaComplexType.cs
- ResponseBodyWriter.cs
- ClientConfigurationHost.cs
- TabItem.cs
- SkewTransform.cs
- TraceHandlerErrorFormatter.cs
- LoadWorkflowCommand.cs
- EntityTypeBase.cs
- TextSelectionHelper.cs
- UnsafePeerToPeerMethods.cs
- DataGridTextBoxColumn.cs
- dbenumerator.cs
- RegexWorker.cs
- GestureRecognitionResult.cs
- UserControlCodeDomTreeGenerator.cs
- WebPartsPersonalization.cs
- BufferedStream2.cs