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
- DataGridAutoGeneratingColumnEventArgs.cs
- DataRecordObjectView.cs
- TypeBuilder.cs
- AppliedDeviceFiltersEditor.cs
- NumericUpDownAcceleration.cs
- MinMaxParagraphWidth.cs
- control.ime.cs
- TextEndOfSegment.cs
- ActivationServices.cs
- MarkupCompilePass2.cs
- FullTextBreakpoint.cs
- Control.cs
- NavigateEvent.cs
- JsonReader.cs
- XsltOutput.cs
- counter.cs
- WebUtil.cs
- ContentIterators.cs
- ExpressionList.cs
- RoleGroupCollection.cs
- FixedSOMFixedBlock.cs
- Mapping.cs
- ResolveResponseInfo.cs
- MaskPropertyEditor.cs
- WorkflowDesignerMessageFilter.cs
- LeftCellWrapper.cs
- WebAdminConfigurationHelper.cs
- RelOps.cs
- OdbcException.cs
- MediaTimeline.cs
- _HeaderInfoTable.cs
- BorderGapMaskConverter.cs
- CorrelationValidator.cs
- DLinqTableProvider.cs
- StrokeFIndices.cs
- SqlClientMetaDataCollectionNames.cs
- DateTimeFormat.cs
- MemoryRecordBuffer.cs
- ChangeNode.cs
- ChannelSettingsElement.cs
- WSTrust.cs
- ClientConfigurationSystem.cs
- TextTreeUndo.cs
- XamlTreeBuilderBamlRecordWriter.cs
- EventLevel.cs
- ProfilePropertySettings.cs
- RemoteWebConfigurationHost.cs
- MaterialCollection.cs
- DataGridTableCollection.cs
- SqlTriggerAttribute.cs
- WebPartAddingEventArgs.cs
- CheckBoxPopupAdapter.cs
- AmbientLight.cs
- ByteStack.cs
- ReliableChannelBinder.cs
- XmlLinkedNode.cs
- XmlSchemaAll.cs
- DataObject.cs
- AssemblyName.cs
- EncoderNLS.cs
- LinqDataSourceDisposeEventArgs.cs
- ThumbAutomationPeer.cs
- EventLogReader.cs
- DrawingContextDrawingContextWalker.cs
- PropertyMap.cs
- BufferCache.cs
- ActiveDocumentEvent.cs
- SnapshotChangeTrackingStrategy.cs
- DirectionalLight.cs
- SplineKeyFrames.cs
- UidPropertyAttribute.cs
- SortedList.cs
- HttpModuleCollection.cs
- WebPartZoneDesigner.cs
- webclient.cs
- HttpPostProtocolImporter.cs
- SystemIPv6InterfaceProperties.cs
- ProjectionAnalyzer.cs
- ZeroOpNode.cs
- GregorianCalendarHelper.cs
- RequestResizeEvent.cs
- _FtpControlStream.cs
- SamlAuthorityBinding.cs
- UnauthorizedWebPart.cs
- DESCryptoServiceProvider.cs
- XhtmlBasicValidatorAdapter.cs
- LogReservationCollection.cs
- QilValidationVisitor.cs
- FileDialog_Vista_Interop.cs
- PopupRootAutomationPeer.cs
- BaseProcessor.cs
- _CommandStream.cs
- CustomCredentialPolicy.cs
- ToolStripTemplateNode.cs
- ObjRef.cs
- StylusEditingBehavior.cs
- ObjectDataSourceEventArgs.cs
- ZipIOCentralDirectoryBlock.cs
- DataGrid.cs
- DefaultValueConverter.cs