ElementInformationとは? わかりやすく解説

ElementInformation クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

構成内の個々要素に関するメタ情報含まれています。このクラス継承できません。

名前空間: System.Configuration
アセンブリ: System.Configuration (system.configuration.dll 内)
構文構文

Public NotInheritable Class
 ElementInformation
Dim instance As ElementInformation
public sealed class ElementInformation
public ref class ElementInformation sealed
public final class ElementInformation
public final class ElementInformation
解説解説
使用例使用例

ConfigurationElement オブジェクト関連付けられている ElementInformation取得するコード例次に示します

Public Shared Function GetElementInformation()
 _
As ElementInformation

    ' Get the current configuration file.
    Dim config _
    As System.Configuration.Configuration = _
    ConfigurationManager.OpenExeConfiguration( _
    ConfigurationUserLevel.None)

    ' Get the section.
    Dim section As UrlsSection = CType( _
    config.GetSection("MyUrls"), UrlsSection)

    ' Get the element.
    Dim url As UrlConfigElement = _
    section.Simple

    Dim eInfo As ElementInformation = _
    url.ElementInformation

    Return eInfo

End Function 'GetElementInformation
     
static public ElementInformation
    GetElementInformation()
{

    // Get the current configuration file.
    System.Configuration.Configuration config =
            ConfigurationManager.OpenExeConfiguration(
            ConfigurationUserLevel.None);

    // Get the section.
    UrlsSection section =
        (UrlsSection)config.GetSection("MyUrls");

    // Get the element.
    UrlConfigElement url = section.Simple;

    ElementInformation eInfo =
        url.ElementInformation;

    return eInfo;

}

前述コード例使用されている構成抜粋次に示します

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="MyUrls" type="Samples.AspNet.UrlsSection,
      ConfigurationElement, Version=1.0.0.0, Culture=neutral,
      PublicKeyToken=null" allowDefinition="Everywhere"
      allowExeDefinition="MachineToApplication"
      restartOnExternalChanges="true" />
  </configSections>
  <MyUrls name="MyFavorites">
    <simple name="Contoso" url="http://www.contoso.com" port="8080" />
    <urls>
      <clear />
      <add name="Microsoft" url="http://www.microsoft.com" port="0" />
    </urls>
  </MyUrls>
</configuration>
継承階層継承階層
System.Object
  System.Configuration.ElementInformation
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ElementInformation メンバ
System.Configuration 名前空間
ConfigurationElement クラス

ElementInformation プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ Errors 関連付けられている要素およびサブ要素エラー取得します
パブリック プロパティ IsCollection 関連付けられている ConfigurationElement オブジェクトが ConfigurationElementCollection コレクションであるかどうかを示す値を取得します
パブリック プロパティ IsLocked ConfigurationElement オブジェクト変更できないかどうかを示す値を取得します
パブリック プロパティ IsPresent 関連付けられている ConfigurationElement オブジェクト構成ファイル内に存在するかどうかを示す値を取得します
パブリック プロパティ LineNumber 構成ファイル内の関連付けられている ConfigurationElement オブジェクト定義されている位置行番号取得します
パブリック プロパティ Properties 関連付けられている ConfigurationElement オブジェクトプロパティの PropertyInformationCollection コレクション取得します
パブリック プロパティ Source 関連付けられている ConfigurationElement オブジェクト生成元であるソース ファイル取得します
パブリック プロパティ Type 関連付けられている ConfigurationElement オブジェクトType取得します
パブリック プロパティ Validator 関連付けられている ConfigurationElement オブジェクト検証使用されるオブジェクト取得します
参照参照

関連項目

ElementInformation クラス
System.Configuration 名前空間
ConfigurationElement クラス

ElementInformation メソッド


ElementInformation メンバ

構成内の個々要素に関するメタ情報含まれています。このクラス継承できません。

ElementInformation データ型公開されるメンバを以下の表に示します


パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ Errors 関連付けられている要素およびサブ要素エラー取得します
パブリック プロパティ IsCollection 関連付けられている ConfigurationElement オブジェクトが ConfigurationElementCollection コレクションであるかどうかを示す値を取得します
パブリック プロパティ IsLocked ConfigurationElement オブジェクト変更できないかどうかを示す値を取得します
パブリック プロパティ IsPresent 関連付けられている ConfigurationElement オブジェクト構成ファイル内に存在するかどうかを示す値を取得します
パブリック プロパティ LineNumber 構成ファイル内の関連付けられている ConfigurationElement オブジェクト定義されている位置行番号取得します
パブリック プロパティ Properties 関連付けられている ConfigurationElement オブジェクトプロパティの PropertyInformationCollection コレクション取得します
パブリック プロパティ Source 関連付けられている ConfigurationElement オブジェクト生成元であるソース ファイル取得します
パブリック プロパティ Type 関連付けられている ConfigurationElement オブジェクトType取得します
パブリック プロパティ Validator 関連付けられている ConfigurationElement オブジェクト検証使用されるオブジェクト取得します
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

ElementInformation クラス
System.Configuration 名前空間
ConfigurationElement クラス



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「ElementInformation」の関連用語

ElementInformationのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ElementInformationのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS