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
- UIPermission.cs
- PEFileEvidenceFactory.cs
- DSASignatureFormatter.cs
- WindowsIPAddress.cs
- DocumentPageViewAutomationPeer.cs
- EditorResources.cs
- Column.cs
- AuthenticatingEventArgs.cs
- MetadataCache.cs
- CaseInsensitiveHashCodeProvider.cs
- ObjectResult.cs
- SingletonInstanceContextProvider.cs
- PropertyTab.cs
- GeometryDrawing.cs
- UnauthorizedWebPart.cs
- VerticalAlignConverter.cs
- ModelUIElement3D.cs
- ConversionContext.cs
- StructuralObject.cs
- PerformanceCounter.cs
- SerialPinChanges.cs
- ProviderCommandInfoUtils.cs
- RightsManagementLicense.cs
- RemotingServices.cs
- EventLogInternal.cs
- QilFunction.cs
- TransportManager.cs
- ObjectTag.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- rsa.cs
- DataFormats.cs
- KoreanCalendar.cs
- ItemList.cs
- EdmProperty.cs
- EdmTypeAttribute.cs
- XmlSchemaValidator.cs
- KeysConverter.cs
- XpsDocumentEvent.cs
- ToolStripSplitButton.cs
- Html32TextWriter.cs
- BounceEase.cs
- DesignerLoader.cs
- SqlProcedureAttribute.cs
- XAMLParseException.cs
- ContextStack.cs
- PrimarySelectionGlyph.cs
- XmlElementAttributes.cs
- metadatamappinghashervisitor.cs
- TextDecoration.cs
- Claim.cs
- StringUtil.cs
- FreezableDefaultValueFactory.cs
- MtomMessageEncodingElement.cs
- SizeAnimationClockResource.cs
- RenamedEventArgs.cs
- CounterSampleCalculator.cs
- Currency.cs
- PostBackOptions.cs
- OdbcConnectionFactory.cs
- PlatformNotSupportedException.cs
- WindowsSlider.cs
- ItemsControlAutomationPeer.cs
- ListCollectionView.cs
- FormViewDeletedEventArgs.cs
- Win32.cs
- WebPartCloseVerb.cs
- DataFormat.cs
- DebuggerAttributes.cs
- OpenTypeLayoutCache.cs
- ComboBox.cs
- WindowsFormsHostPropertyMap.cs
- webeventbuffer.cs
- Mouse.cs
- InkCanvasSelection.cs
- SwitchLevelAttribute.cs
- NetNamedPipeBinding.cs
- Utility.cs
- ComponentRenameEvent.cs
- EndPoint.cs
- ClientApiGenerator.cs
- CompositeCollectionView.cs
- FixedHighlight.cs
- PartialCachingAttribute.cs
- ReferentialConstraintRoleElement.cs
- HostDesigntimeLicenseContext.cs
- WebDisplayNameAttribute.cs
- ConfigsHelper.cs
- ShapingEngine.cs
- HtmlLabelAdapter.cs
- XmlSecureResolver.cs
- _SSPISessionCache.cs
- ManifestSignedXml.cs
- LockedActivityGlyph.cs
- DesignSurfaceServiceContainer.cs
- StandardToolWindows.cs
- ImageClickEventArgs.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- DCSafeHandle.cs
- HttpListenerContext.cs
- Event.cs