Ejemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sectionNode"></param>
 /// <returns></returns>
 protected string GetProtectionProviderName(ConfigurationSectionNode sectionNode)
 {
     if (sectionNode == null || string.Compare(Resources.NoProtectionProvider, sectionNode.ProtectionProvider) == 0)
     {
         return(string.Empty);
     }
     return(sectionNode.ProtectionProvider);
 }
        /// <summary>
        /// <para>Creates a <see cref="ConfigurationSectionNode"/> for the parent node.</para>
        /// </summary>
        /// <param name="node">
        /// <para>The parent node to add the newly created <see cref="ConfigurationSectionNode"/>.</para>
        /// </param>
        protected override void ExecuteCore(ConfigurationNode node)
        {
            ConfigurationSectionCollectionNode sectionsNode = SelectConfigurationSectionsNode();
            ConfigurationSectionNode           sectionNode  = UIHierarchyService.SelectedHierarchy.FindNodeByName(sectionsNode, sectionName) as ConfigurationSectionNode;

            newSectionNode = sectionNode;
            if (sectionNode == null)
            {
                newSectionNode = ConfigurationSectionNode.CreateReadOnlyDefault(sectionName, sectionsNode);
            }
            base.ExecuteCore(node);
        }
Ejemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="configurationSection"></param>
 /// <param name="sectionNode"></param>
 protected void SetProtectionProvider(ConfigurationSection configurationSection, ConfigurationSectionNode sectionNode)
 {
     if (null != configurationSection && null != configurationSection.SectionInformation.ProtectionProvider)
     {
         sectionNode.ProtectionProvider = configurationSection.SectionInformation.ProtectionProvider.Name;
     }
 }