ProfileGroupSettings 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
구성 파일 섹션의 하위 섹션에 groupprofiles 프로그래밍 방식으로 액세스할 수 있도록 합니다.
public ref class ProfileGroupSettings sealed : System::Configuration::ConfigurationElement
public sealed class ProfileGroupSettings : System.Configuration.ConfigurationElement
type ProfileGroupSettings = class
inherit ConfigurationElement
Public NotInheritable Class ProfileGroupSettings
Inherits ConfigurationElement
- 상속
예제
다음 코드 예제에서는 형식을 사용하는 ProfileGroupSettings 방법을 보여줍니다. 이 코드 예제는 클래스에 제공된 더 큰 예제의 ProfileSection 일부입니다.
// Add a new group.
ProfileGroupSettings newPropGroup = new ProfileGroupSettings("Forum");
profileSection.PropertySettings.GroupSettings.Add(newPropGroup);
// Add a new PropertySettings to the group.
ProfilePropertySettings newProp = new ProfilePropertySettings("AvatarImage");
newProp.Type = "System.String, System.dll";
newPropGroup.PropertySettings.Add(newProp);
// Remove a PropertySettings from the group.
newPropGroup.PropertySettings.Remove("AvatarImage");
newPropGroup.PropertySettings.RemoveAt(0);
// Clear all PropertySettings from the group.
newPropGroup.PropertySettings.Clear();
' Add a new group.
Dim newPropGroup As ProfileGroupSettings = new ProfileGroupSettings("Forum")
profileSection.PropertySettings.GroupSettings.Add(newPropGroup)
' Add a new PropertySettings to the group.
Dim newProp As ProfilePropertySettings = new ProfilePropertySettings("AvatarImage")
newProp.Type = "System.String, System.dll"
newPropGroup.PropertySettings.Add(newProp)
' Remove a PropertySettings from the group.
newPropGroup.PropertySettings.Remove("AvatarImage")
newPropGroup.PropertySettings.RemoveAt(0)
' Clear all PropertySettings from the group.
newPropGroup.PropertySettings.Clear()
설명
이 클래스는 ProfileGroupSettings 구성 파일 섹션의 하위 섹션 profile 에 추가된 속성 그룹을 프로그래밍 방식으로 만들고, 액세스하고, 수정하는 group 방법을 제공합니다.
구성 파일의 섹션은 profile 사용자 프로필에 대한 스키마를 지정합니다. 런타임에 ASP.NET 컴파일 시스템은 섹션에 profile 지정된 정보를 사용하여 파생되는 ProfileBase클래스ProfileCommon를 생성합니다.
ProfileCommon 클래스 정의는 구성 파일 섹션의 하위 섹션에 propertiesprofile 정의된 속성을 기반으로 합니다. 이 클래스의 인스턴스는 각 사용자 프로필에 대해 만들어지고 속성을 통해 HttpContext.Profile 코드의 개별 프로필 값에 액세스할 수 있습니다. ASP.NET 2.0에 추가된 프로필 기능에 대한 자세한 내용은 ASP.NET 프로필 속성 개요를 참조하세요.
생성자
| Name | Description |
|---|---|
| ProfileGroupSettings(String) |
기본 설정을 사용하여 클래스의 새 인스턴스를 ProfileGroupSettings 초기화합니다. |