ConfigurationSection.GetRuntimeObject メソッド
アセンブリ: System.Configuration (system.configuration.dll 内)


GetSection メソッドが実行時に呼び出されると、構成システムは最初に ConfigurationSection クラスの適切なインスタンスを作成し、次に GetRuntimeObject メソッドから取得したオブジェクトを返します。
既定では、GetRuntimeObject は、呼び出し元の ConfigurationSection を表すオブジェクトを返すだけです。
実装時の注意 GetRuntimeObject メソッドをオーバーライドして、実行時にカスタム型を返すことができます。 たとえば、ConfigurationSection クラスの設定の実行時の変更を制限するには、GetRuntimeObject をオーバーライドして、変更できる設定がある場合にはその設定に制限を適用するカスタム型を返します。 ランタイム オブジェクトが内部のみである場合、返されるオブジェクトは、オブジェクトを定義するアセンブリ外では使用できません。ConfigurationSection から派生した、実行時にアセンブリ内のコードによってのみアクセスできるオブジェクトを作成する方法の 1 つは、ConfigurationSection 実装を返すメソッドを含む内部ランタイム オブジェクトを作成することです。
ConfigurationSection を使用する方法の例を次に示します。
' Customizes the use of CustomSection ' by setting _ReadOnly to false. ' Remember you must use it along with ThrowIfReadOnly. Protected Overrides Function GetRuntimeObject() As Object ' To enable property setting just assign true to ' the following flag. _ReadOnly = True Return MyBase.GetRuntimeObject() End Function 'GetRuntimeObject
// Customizes the use of CustomSection // by setting _ReadOnly to false. // Remember you must use it along with ThrowIfReadOnly. protected override object GetRuntimeObject() { // To enable property setting just assign true to // the following flag. _ReadOnly = true; return base.GetRuntimeObject(); }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からConfigurationSection.GetRuntimeObject メソッドを検索する場合は、下記のリンクをクリックしてください。

- ConfigurationSection.GetRuntimeObject メソッドのページへのリンク