示例#1
0
        // ----------------------------
        // ACCESSORS
        // ----------------------------

        #region Accessors

        /// <summary>
        /// Returns the application section of this instance with the specified complete name.
        /// </summary>
        /// <returns>The application section of this instance with the specified complete name.</returns>
        public IAppSection GetSectionWithCompleteName(String completeName)
        {
            if (completeName.Contains("$"))
            {
                completeName = completeName.Substring(completeName.IndexOf('$') + 1);
            }
            else
            {
                completeName = string.Empty;
            }
            string[] names = completeName.Split(new char[] { '$' });

            IAppSection moduleSection = null;

            foreach (string name in names)
            {
                if (!string.IsNullOrEmpty(name))
                {
                    if (moduleSection == null)
                    {
                        moduleSection = GetSectionWithName(name);
                    }
                    else
                    {
                        moduleSection = moduleSection.GetSubSectionWithName(name);
                    }
                }
            }

            return(moduleSection);
        }