YAMP.ParseContext.FindConstants C# (CSharp) Method

FindConstants() public method

Finds the constant with the specified name.
public FindConstants ( String name ) : IConstants
name String /// The symbolic name to retrieve. ///
return IConstants
        public IConstants FindConstants(String name)
        {
            if (_constants.ContainsKey(name))
            {
                return _constants[name];
            }

            if (_parent != null)
            {
                return _parent.FindConstants(name);
            }

            return null;
        }

Usage Example

コード例 #1
0
        /// <summary>
        /// Finds the constant with the specified name.
        /// </summary>
        /// <param name="name">
        /// The symbolic name to retrieve.
        /// </param>
        /// <returns>The value of the constant.</returns>
        public IConstants FindConstants(String name)
        {
            if (_constants.ContainsKey(name))
            {
                return(_constants[name]);
            }

            if (_parent != null)
            {
                return(_parent.FindConstants(name));
            }

            return(null);
        }
All Usage Examples Of YAMP.ParseContext::FindConstants