ConfigurationSection.ShouldSerializePropertyInTargetVersion Metoda
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Určuje, zda má být zadaná vlastnost serializována, pokud je hierarchie objektu konfigurace serializována pro zadanou cílovou verzi .NET Framework.
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, System::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);
protected 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 Friend Overridable Function ShouldSerializePropertyInTargetVersion (property As ConfigurationProperty, propertyName As String, targetFramework As FrameworkName, parentConfigurationElement As ConfigurationElement) As Boolean
Protected Overridable Function ShouldSerializePropertyInTargetVersion (property As ConfigurationProperty, propertyName As String, targetFramework As FrameworkName, parentConfigurationElement As ConfigurationElement) As Boolean
Parametry
- property
- ConfigurationProperty
Objekt ConfigurationProperty , který je kandidátem pro serializaci.
- propertyName
- String
Název objektu, který ConfigurationProperty se vyskytuje v jazyce XML.
- targetFramework
- FrameworkName
Cílová verze rozhraní .NET Framework.
- parentConfigurationElement
- ConfigurationElement
Nadřazený prvek vlastnosti.
Návraty
true
property pokud by měl být serializován; jinak , false.
Poznámky
Každá část konfigurace vytvořená pro .NET Framework 4 a novější verze musí explicitně přepsat tuto metodu a vrátit true, ale pouze pokud je zadaná vlastnost platná pro zadanou verzi .NET Framework. Stávající oddíly konfigurace vytvořené pro starší verze .NET Framework není nutné měnit.
Základní typ obsahuje výchozí implementaci této metody, která vždy vrací true. Pokud implementujete oddíl konfigurace a nepřepíšete tuto metodu, ve výchozím nastavení budou všechny vlastnosti konfigurace obsažené v oddílu konfigurace serializovány pro všechny verze rozhraní.