SemanticTag.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Speech / Src / Internal / SrgsCompiler / SemanticTag.cs / 1 / SemanticTag.cs

                            //------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------- 

using System; 
using System.Runtime.InteropServices; 
using System.Speech.Internal.SrgsParser;
 
namespace System.Speech.Internal.SrgsCompiler
{
    /// 
    /// Summary description for Rule. 
    /// 
    internal sealed class SemanticTag : ParseElement, ISemanticTag 
    { 
        //*******************************************************************
        // 
        // Constructors
        //
        //*******************************************************************
 
        #region Constructors
 
        internal SemanticTag (ParseElement parent, Backend backend) 
            : base (parent._rule)
        { 
        }

        #endregion
 
        //********************************************************************
        // 
        // Internal Methods 
        //
        //******************************************************************* 

        #region Internal Methods

        /// TODOC <_include file='doc\Tag.uex' path='docs/doc[@for="Tag.RepeatProbability"]/*' /> 
        // The probability that this item will be repeated.
        void ISemanticTag.Content (IElement parentElement, string sTag, int iLine) 
        { 
            //Return if the Tag content is empty
            sTag = sTag.Trim (Helpers._achTrimChars); 

            if (string.IsNullOrEmpty (sTag))
            {
                return; 
            }
 
            // Build semantic properties to attach to epsilon transition. 
            // script
            _propInfo._ulId = (uint) iLine; 
            _propInfo._comValue = sTag;

            ParseElementCollection parent = (ParseElementCollection) parentElement;
 
            // Attach the semantic properties on the parent element.
            parent.AddSemanticInterpretationTag (_propInfo); 
        } 

        #endregion 

        //********************************************************************
        //
        // Private Fields 
        //
        //******************************************************************** 
 
        #region Private Fields
 
        private CfgGrammar.CfgProperty _propInfo = new CfgGrammar.CfgProperty ();

        #endregion
 
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK