Code:
/ DotNET / DotNET / 8.0 / untmp / 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 [....] 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HtmlTextArea.cs
- TransformerTypeCollection.cs
- HttpCacheVary.cs
- DesignTimeParseData.cs
- CollectionViewGroupInternal.cs
- SweepDirectionValidation.cs
- Formatter.cs
- InputLanguageSource.cs
- XPathAncestorIterator.cs
- DesignerFrame.cs
- ReturnEventArgs.cs
- ProjectionRewriter.cs
- SHA1Managed.cs
- BuildResult.cs
- SHA256.cs
- GraphicsContainer.cs
- DocumentsTrace.cs
- Stream.cs
- TdsParserHelperClasses.cs
- IApplicationTrustManager.cs
- RootBrowserWindowProxy.cs
- TypeInfo.cs
- ZipPackage.cs
- WhitespaceReader.cs
- ManipulationDeltaEventArgs.cs
- ToolStripOverflowButton.cs
- SecurityElement.cs
- NativeMethodsOther.cs
- DataGridViewEditingControlShowingEventArgs.cs
- SoapTypeAttribute.cs
- DefaultHttpHandler.cs
- ConfigurationElementCollection.cs
- MetricEntry.cs
- ScriptControlManager.cs
- DataGridCell.cs
- PreviewControlDesigner.cs
- XmlElementCollection.cs
- DataServiceHostFactory.cs
- EntityUtil.cs
- SoundPlayerAction.cs
- TypedRowHandler.cs
- ToolStripSystemRenderer.cs
- ValidationEventArgs.cs
- DuplexChannel.cs
- RawStylusInputCustomData.cs
- PkcsMisc.cs
- StylusEventArgs.cs
- Expr.cs
- TextServicesCompartmentEventSink.cs
- EntityDataSourceContainerNameConverter.cs
- ObjectDataSourceMethodEditor.cs
- EmptyCollection.cs
- Model3DCollection.cs
- TCPClient.cs
- EmissiveMaterial.cs
- Pkcs7Recipient.cs
- XmlSchemaCompilationSettings.cs
- Encoding.cs
- WizardPanel.cs
- Mapping.cs
- RenderOptions.cs
- ITextView.cs
- ResourceIDHelper.cs
- DesignerActionKeyboardBehavior.cs
- CompiledQueryCacheEntry.cs
- TreeNodeCollection.cs
- itemelement.cs
- querybuilder.cs
- CaretElement.cs
- ScrollProviderWrapper.cs
- CompiledXpathExpr.cs
- DataGrid.cs
- XsltLibrary.cs
- InheritanceRules.cs
- HashCodeCombiner.cs
- WindowsTab.cs
- SystemResources.cs
- ObjectStateManagerMetadata.cs
- SecurityDocument.cs
- RequestQueryProcessor.cs
- Part.cs
- dsa.cs
- AgileSafeNativeMemoryHandle.cs
- PageAsyncTask.cs
- Animatable.cs
- ScriptServiceAttribute.cs
- ErasingStroke.cs
- FixedTextView.cs
- DelegateArgument.cs
- Image.cs
- SchemaElementDecl.cs
- DisplayInformation.cs
- WebPartDisplayModeEventArgs.cs
- ColumnReorderedEventArgs.cs
- XmlSchemaSimpleTypeUnion.cs
- AlternateViewCollection.cs
- NetworkAddressChange.cs
- WSHttpTransportSecurityElement.cs
- HttpAsyncResult.cs
- figurelengthconverter.cs