コード例 #1
0
        private static void AddPath(UnpublishOverridesPathElement pathElement)
        {
            if (pathElement == null)
            {
                return;
            }

            if (!Paths.Contains(pathElement))
            {
                Paths.Add(pathElement);
            }
        }
コード例 #2
0
        private static void GetPaths()
        {
            var connectionManagerDataSection = ConfigurationManager.GetSection(UnpublishOverridesSection.SectionName) as UnpublishOverridesSection;

            if (connectionManagerDataSection != null)
            {
                foreach (UnpublishOverridesPathElement pathElement in connectionManagerDataSection.Paths)
                {
                    var path = new UnpublishOverridesPathElement
                    {
                        Name     = pathElement.Name.ToLower(),
                        Children = pathElement.Children
                    };
                    AddPath(path);
                }
            }
        }