ConfigurationSection.ShouldSerializePropertyInTargetVersion 메서드

정의

구성 개체 계층 구조가 지정된 대상 버전의 .NET Framework 직렬화될 때 지정된 속성을 serialize해야 하는지 여부를 나타냅니다.

protected:
 virtual bool ShouldSerializePropertyInTargetVersion(System::Configuration::ConfigurationProperty ^ property, System::String ^ propertyName, System::Runtime::Versioning::FrameworkName ^ targetFramework, System::Configuration::ConfigurationElement ^ parentConfigurationElement);
protected public:
 virtual bool ShouldSerializePropertyInTargetVersion(System::Configuration::ConfigurationProperty ^ property, System::String ^ propertyName, System::Runtime::Versioning::FrameworkName ^ targetFramework, System::Configuration::ConfigurationElement ^ parentConfigurationElement);
protected virtual bool ShouldSerializePropertyInTargetVersion (System.Configuration.ConfigurationProperty property, string propertyName, System.Runtime.Versioning.FrameworkName targetFramework, System.Configuration.ConfigurationElement parentConfigurationElement);
protected internal virtual bool ShouldSerializePropertyInTargetVersion (System.Configuration.ConfigurationProperty property, string propertyName, System.Runtime.Versioning.FrameworkName targetFramework, System.Configuration.ConfigurationElement parentConfigurationElement);
abstract member ShouldSerializePropertyInTargetVersion : System.Configuration.ConfigurationProperty * string * System.Runtime.Versioning.FrameworkName * System.Configuration.ConfigurationElement -> bool
override this.ShouldSerializePropertyInTargetVersion : System.Configuration.ConfigurationProperty * string * System.Runtime.Versioning.FrameworkName * System.Configuration.ConfigurationElement -> bool
Protected Overridable Function ShouldSerializePropertyInTargetVersion (property As ConfigurationProperty, propertyName As String, targetFramework As FrameworkName, parentConfigurationElement As ConfigurationElement) As Boolean
Protected Friend Overridable Function ShouldSerializePropertyInTargetVersion (property As ConfigurationProperty, propertyName As String, targetFramework As FrameworkName, parentConfigurationElement As ConfigurationElement) As Boolean

매개 변수

property
ConfigurationProperty

serialization 후보인 ConfigurationProperty 개체입니다.

propertyName
String

XML에 표시되는 ConfigurationProperty 개체의 이름입니다.

targetFramework
FrameworkName

.NET Framework 대상 버전입니다.

parentConfigurationElement
ConfigurationElement

속성의 부모 요소입니다.

반환

property를 serialize해야 하면 true이고, 그렇지 않으면 false입니다.

설명

.NET Framework 4 이상 버전에 대해 만들어진 각 구성 섹션은 이 메서드를 명시적으로 재정의하고 를 반환해야 하지만 지정된 속성이 지정된 버전의 .NET Framework 유효한 경우에만 를 반환true해야 합니다. 이전 버전의 .NET Framework 대해 만든 기존 구성 섹션을 변경할 필요가 없습니다.

기본 형식에는 항상 를 반환하는 이 메서드의 기본 구현이 포함되어 있습니다 true. 구성 섹션을 구현하고 이 메서드를 재정의하지 않으면 기본적으로 구성 섹션에 포함된 모든 구성 속성이 모든 프레임워크 버전에 대해 직렬화됩니다.

적용 대상

추가 정보