Share via


ConfigurationSectionGroup.ShouldSerializeSectionGroupInTargetVersion メソッド

定義

指定したターゲット バージョンの.NET Frameworkに対して構成オブジェクト階層をシリアル化するときに、現在ConfigurationSectionGroupのインスタンスをシリアル化する必要があるかどうかを示します。

protected:
 virtual bool ShouldSerializeSectionGroupInTargetVersion(System::Runtime::Versioning::FrameworkName ^ targetFramework);
protected public:
 virtual bool ShouldSerializeSectionGroupInTargetVersion(System::Runtime::Versioning::FrameworkName ^ targetFramework);
protected virtual bool ShouldSerializeSectionGroupInTargetVersion (System.Runtime.Versioning.FrameworkName targetFramework);
protected internal virtual bool ShouldSerializeSectionGroupInTargetVersion (System.Runtime.Versioning.FrameworkName targetFramework);
abstract member ShouldSerializeSectionGroupInTargetVersion : System.Runtime.Versioning.FrameworkName -> bool
override this.ShouldSerializeSectionGroupInTargetVersion : System.Runtime.Versioning.FrameworkName -> bool
Protected Overridable Function ShouldSerializeSectionGroupInTargetVersion (targetFramework As FrameworkName) As Boolean
Protected Friend Overridable Function ShouldSerializeSectionGroupInTargetVersion (targetFramework As FrameworkName) As Boolean

パラメーター

targetFramework
FrameworkName

.NET Frameworkのターゲット バージョン。

戻り値

現在のセクション グループをシリアル化する必要がある場合は true。それ以外の場合は false

注釈

.NET Framework 4 以降のバージョン用に作成された各構成セクション グループは、このメソッドを明示的にオーバーライドして を返す必要がありますが、セクション グループが指定したバージョンの.NET Frameworkに対して有効な場合にのみ返trueす必要があります。 以前のバージョンの.NET Framework用に作成された既存の構成セクション グループを変更する必要はありません。

基本型には、常に を返 trueすこのメソッドの既定の実装が含まれています。 つまり、構成セクション グループの実装者がこのメソッドをオーバーライドしない場合、既定では、構成セクション グループはすべてのフレームワーク バージョンに対してシリアル化されます。

適用対象

こちらもご覧ください