ManagementConfiguration.GetSection Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the specified configuration section.
Overloads
GetSection(String) |
Retrieves the configuration section at the specified path. |
GetSection(String, Type) |
Retrieves the configuration section at the specified section path. |
GetSection(String, ManagementConfigurationPath, Boolean) |
Retrieves the configuration section at the specified path. |
GetSection(String, Type, ManagementConfigurationPath, Boolean) |
Retrieves the configuration section at the specified path. |
GetSection(String)
Retrieves the configuration section at the specified path.
public:
Microsoft::Web::Administration::ConfigurationSection ^ GetSection(System::String ^ sectionPath);
public Microsoft.Web.Administration.ConfigurationSection GetSection (string sectionPath);
member this.GetSection : string -> Microsoft.Web.Administration.ConfigurationSection
Public Function GetSection (sectionPath As String) As ConfigurationSection
Parameters
- sectionPath
- String
The section string.
Returns
A ConfigurationSection that contains the contents of the specified section.
Examples
The following example uses the GetSection(String) method to retrieve the contents of the "appSettings" section.
public class DemoModuleService : ModuleService {
[ModuleServiceMethod]
public ArrayList GetSettings() {
ManagementConfiguration manConfig = this.ManagementUnit.Configuration;
ConfigurationSection appSetSect = manConfig.GetSection("appSettings");
ConfigurationElementCollection settings = appSetSect.GetCollection();
}
}
Applies to
GetSection(String, Type)
Retrieves the configuration section at the specified section path.
public:
Microsoft::Web::Administration::ConfigurationSection ^ GetSection(System::String ^ sectionPath, Type ^ sectionType);
public Microsoft.Web.Administration.ConfigurationSection GetSection (string sectionPath, Type sectionType);
member this.GetSection : string * Type -> Microsoft.Web.Administration.ConfigurationSection
Public Function GetSection (sectionPath As String, sectionType As Type) As ConfigurationSection
Parameters
- sectionPath
- String
The section path.
Returns
A ConfigurationSection that contains the contents of the specified section.
Applies to
GetSection(String, ManagementConfigurationPath, Boolean)
Retrieves the configuration section at the specified path.
public:
Microsoft::Web::Administration::ConfigurationSection ^ GetSection(System::String ^ sectionPath, Microsoft::Web::Management::Server::ManagementConfigurationPath ^ path, bool respectDelegation);
public Microsoft.Web.Administration.ConfigurationSection GetSection (string sectionPath, Microsoft.Web.Management.Server.ManagementConfigurationPath path, bool respectDelegation);
member this.GetSection : string * Microsoft.Web.Management.Server.ManagementConfigurationPath * bool -> Microsoft.Web.Administration.ConfigurationSection
Public Function GetSection (sectionPath As String, path As ManagementConfigurationPath, respectDelegation As Boolean) As ConfigurationSection
Parameters
- sectionPath
- String
The section path.
A ManagementConfigurationPath that specifies the management configuration path.
- respectDelegation
- Boolean
true
to respect delegation; false
to disregard delegation.
Returns
A ConfigurationSection that contains the contents of the specified section.
Applies to
GetSection(String, Type, ManagementConfigurationPath, Boolean)
Retrieves the configuration section at the specified path.
public:
Microsoft::Web::Administration::ConfigurationSection ^ GetSection(System::String ^ sectionPath, Type ^ sectionType, Microsoft::Web::Management::Server::ManagementConfigurationPath ^ path, bool respectDelegation);
public Microsoft.Web.Administration.ConfigurationSection GetSection (string sectionPath, Type sectionType, Microsoft.Web.Management.Server.ManagementConfigurationPath path, bool respectDelegation);
member this.GetSection : string * Type * Microsoft.Web.Management.Server.ManagementConfigurationPath * bool -> Microsoft.Web.Administration.ConfigurationSection
Public Function GetSection (sectionPath As String, sectionType As Type, path As ManagementConfigurationPath, respectDelegation As Boolean) As ConfigurationSection
Parameters
- sectionPath
- String
The section path.
A ManagementConfigurationPath that specifies the management configuration path.
- respectDelegation
- Boolean
true
to respect delegation; false
to disregard delegation.
Returns
A ConfigurationSection that contains the contents of the specified section.