ConfigurationSection.ShouldSerializePropertyInTargetVersion Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Gibt an, ob die angegebene Eigenschaft serialisiert werden soll, wenn die Konfigurationsobjekthierarchie für die angegebene Zielversion des .NET Framework serialisiert wird.
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
Parameter
- property
- ConfigurationProperty
Das ConfigurationProperty Objekt, das ein Kandidat für die Serialisierung ist.
- propertyName
- String
Der Name des ConfigurationProperty Objekts, wie es in XML auftritt.
- targetFramework
- FrameworkName
Die Zielversion des .NET Frameworks.
- parentConfigurationElement
- ConfigurationElement
Das übergeordnete Element der Eigenschaft.
Gibt zurück
true wenn die property Serialisierung erfolgen soll; andernfalls false.
Hinweise
Jeder Konfigurationsabschnitt, der für das .NET Framework 4 und höhere Versionen erstellt wird, muss diese Methode explizit überschreiben und true zurückgeben, jedoch nur, wenn die angegebene Eigenschaft für die angegebene Version des .NET Framework gültig ist. Vorhandene Konfigurationsabschnitte, die für frühere Versionen des .NET Frameworks erstellt wurden, müssen nicht geändert werden.
Der Basistyp enthält eine Standardimplementierung dieser Methode, die immer zurückgegeben wird true. Wenn Sie einen Konfigurationsabschnitt implementieren und diese Methode nicht außer Kraft setzen, werden standardmäßig alle Konfigurationseigenschaften, die im Konfigurationsabschnitt enthalten sind, für alle Frameworkversionen serialisiert.