CustomConfigurations.Config.EncryptConfigurationSection C# (CSharp) Method

EncryptConfigurationSection() public method

public EncryptConfigurationSection ( ) : void
return void
        public void EncryptConfigurationSection()
        {
            var pathToConfig = FindConfigFileLocation("");

            foreach (var path in DetermineConfigurationPath(pathToConfig))
            {
                if (!string.IsNullOrEmpty(path.Trim()))
                {
                    EncryptConfigurationSection(pathToConfig, path);
                }
            }
        }

Same methods

Config::EncryptConfigurationSection ( string sectionName ) : void
Config::EncryptConfigurationSection ( string configPath, string sectionName ) : void

Usage Example

 public static void EncryptDeployments()
 {
     var config = new Config();
     config.EncryptConfigurationSection("deployments");
 }