Share via


ConfigurationProperty コンストラクター

定義

ConfigurationProperty クラスの新しいインスタンスを初期化します。

オーバーロード

ConfigurationProperty(String, Type)

この API は製品インフラストラクチャをサポートします。コードから直接使用するものではありません。

ConfigurationProperty クラスの新しいインスタンスを初期化します。

ConfigurationProperty(String, Type, Object)

この API は製品インフラストラクチャをサポートします。コードから直接使用するものではありません。

ConfigurationProperty クラスの新しいインスタンスを初期化します。

ConfigurationProperty(String, Type, Object, ConfigurationPropertyOptions)

この API は製品インフラストラクチャをサポートします。コードから直接使用するものではありません。

ConfigurationProperty クラスの新しいインスタンスを初期化します。

ConfigurationProperty(String, Type, Object, TypeConverter, ConfigurationValidatorBase, ConfigurationPropertyOptions)

この API は製品インフラストラクチャをサポートします。コードから直接使用するものではありません。

ConfigurationProperty クラスの新しいインスタンスを初期化します。

ConfigurationProperty(String, Type, Object, TypeConverter, ConfigurationValidatorBase, ConfigurationPropertyOptions, String)

この API は製品インフラストラクチャをサポートします。コードから直接使用するものではありません。

ConfigurationProperty クラスの新しいインスタンスを初期化します。

ConfigurationProperty(String, Type)

ソース:
ConfigurationProperty.cs
ソース:
ConfigurationProperty.cs
ソース:
ConfigurationProperty.cs

ConfigurationProperty クラスの新しいインスタンスを初期化します。

この API は製品インフラストラクチャをサポートします。コードから直接使用するものではありません。

public:
 ConfigurationProperty(System::String ^ name, Type ^ type);
public ConfigurationProperty (string name, Type type);
new System.Configuration.ConfigurationProperty : string * Type -> System.Configuration.ConfigurationProperty
Public Sub New (name As String, type As Type)

パラメーター

name
String

構成エンティティの名前。

type
Type

構成エンティティの型。

適用対象

ConfigurationProperty(String, Type, Object)

ソース:
ConfigurationProperty.cs
ソース:
ConfigurationProperty.cs
ソース:
ConfigurationProperty.cs

ConfigurationProperty クラスの新しいインスタンスを初期化します。

この API は製品インフラストラクチャをサポートします。コードから直接使用するものではありません。

public:
 ConfigurationProperty(System::String ^ name, Type ^ type, System::Object ^ defaultValue);
public ConfigurationProperty (string name, Type type, object defaultValue);
new System.Configuration.ConfigurationProperty : string * Type * obj -> System.Configuration.ConfigurationProperty
Public Sub New (name As String, type As Type, defaultValue As Object)

パラメーター

name
String

構成エンティティの名前。

type
Type

構成エンティティの型。

defaultValue
Object

構成エンティティの既定値。

次のコード例は、コンストラクターを使用 ConfigurationProperty.ConfigurationProperty(String, Type, Object) して configuration-property オブジェクトをインスタンス化する方法を示しています。

// Initialize the _FileName property
_FileName =
    new ConfigurationProperty("fileName",
    typeof(string), "default.txt");
' Initialize the _FileName property
_FileName = New ConfigurationProperty( _
    "fileName", GetType(String), "default.txt")

注釈

このコンストラクターを使用してオブジェクトを ConfigurationProperty インスタンス化すると、 IsRequired プロパティと IsKey プロパティは に false設定されます。 さらに、このコンストラクターで作成されたインスタンスは、既定のコレクション キー プロパティとして機能しません。

こちらもご覧ください

適用対象

ConfigurationProperty(String, Type, Object, ConfigurationPropertyOptions)

ソース:
ConfigurationProperty.cs
ソース:
ConfigurationProperty.cs
ソース:
ConfigurationProperty.cs

ConfigurationProperty クラスの新しいインスタンスを初期化します。

この API は製品インフラストラクチャをサポートします。コードから直接使用するものではありません。

public:
 ConfigurationProperty(System::String ^ name, Type ^ type, System::Object ^ defaultValue, System::Configuration::ConfigurationPropertyOptions options);
public ConfigurationProperty (string name, Type type, object defaultValue, System.Configuration.ConfigurationPropertyOptions options);
new System.Configuration.ConfigurationProperty : string * Type * obj * System.Configuration.ConfigurationPropertyOptions -> System.Configuration.ConfigurationProperty
Public Sub New (name As String, type As Type, defaultValue As Object, options As ConfigurationPropertyOptions)

パラメーター

name
String

構成エンティティの名前。

type
Type

構成エンティティの型。

defaultValue
Object

構成エンティティの既定値。

options
ConfigurationPropertyOptions

ConfigurationPropertyOptions 列挙値のいずれか。

次のコード例は、コンストラクターを使用 ConfigurationProperty.ConfigurationProperty(String, Type, Object, ConfigurationPropertyOptions) して configuration-property オブジェクトをインスタンス化する方法を示しています。

// Initialize the _MaxUsers property
_MaxUsers =
    new ConfigurationProperty("maxUsers",
    typeof(long), (long)1000,
    ConfigurationPropertyOptions.None);
' Initialize the _MaxUsers property
_MaxUsers = New ConfigurationProperty( _
    "maxUsers", GetType(Long), 1000L, _
    ConfigurationPropertyOptions.None)

こちらもご覧ください

適用対象

ConfigurationProperty(String, Type, Object, TypeConverter, ConfigurationValidatorBase, ConfigurationPropertyOptions)

ソース:
ConfigurationProperty.cs
ソース:
ConfigurationProperty.cs
ソース:
ConfigurationProperty.cs

ConfigurationProperty クラスの新しいインスタンスを初期化します。

この API は製品インフラストラクチャをサポートします。コードから直接使用するものではありません。

public:
 ConfigurationProperty(System::String ^ name, Type ^ type, System::Object ^ defaultValue, System::ComponentModel::TypeConverter ^ typeConverter, System::Configuration::ConfigurationValidatorBase ^ validator, System::Configuration::ConfigurationPropertyOptions options);
public ConfigurationProperty (string name, Type type, object defaultValue, System.ComponentModel.TypeConverter typeConverter, System.Configuration.ConfigurationValidatorBase validator, System.Configuration.ConfigurationPropertyOptions options);
new System.Configuration.ConfigurationProperty : string * Type * obj * System.ComponentModel.TypeConverter * System.Configuration.ConfigurationValidatorBase * System.Configuration.ConfigurationPropertyOptions -> System.Configuration.ConfigurationProperty
Public Sub New (name As String, type As Type, defaultValue As Object, typeConverter As TypeConverter, validator As ConfigurationValidatorBase, options As ConfigurationPropertyOptions)

パラメーター

name
String

構成エンティティの名前。

type
Type

構成エンティティの型。

defaultValue
Object

構成エンティティの既定値。

typeConverter
TypeConverter

適用するコンバーターの型。

validator
ConfigurationValidatorBase

使用する検証コントロール。

options
ConfigurationPropertyOptions

ConfigurationPropertyOptions 列挙値のいずれか。

次のコード例は、コンストラクターを呼び出すときに使用するパラメーターの種類を ConfigurationProperty.ConfigurationProperty(String, Type, Object, TypeConverter, ConfigurationValidatorBase, ConfigurationPropertyOptions) 示しています。

// Initialize the _MaxIdleTime property
TimeSpan minTime = TimeSpan.FromSeconds(30);
TimeSpan maxTime = TimeSpan.FromMinutes(5);

ConfigurationValidatorBase _TimeSpanValidator =
    new TimeSpanValidator(minTime, maxTime, false);

_MaxIdleTime =
    new ConfigurationProperty("maxIdleTime",
    typeof(TimeSpan), TimeSpan.FromMinutes(5),
    TypeDescriptor.GetConverter(typeof(TimeSpan)),
    _TimeSpanValidator,
    ConfigurationPropertyOptions.IsRequired,
    "[Description:This is the max idle time.]");
' Initialize the _MaxIdleTime property
Dim minTime As TimeSpan = TimeSpan.FromSeconds(30)
Dim maxTime As TimeSpan = TimeSpan.FromMinutes(5)
Dim _TimeSpanValidator = _
    New TimeSpanValidator(minTime, maxTime, False)

_MaxIdleTime = New ConfigurationProperty( _
    "maxIdleTime", GetType(TimeSpan), _
    TimeSpan.FromMinutes(5), _
    TypeDescriptor.GetConverter(GetType(TimeSpan)), _
    _TimeSpanValidator, _
    ConfigurationPropertyOptions.IsRequired, _
    "[Description:This is the max idle time.]")

こちらもご覧ください

適用対象

ConfigurationProperty(String, Type, Object, TypeConverter, ConfigurationValidatorBase, ConfigurationPropertyOptions, String)

ソース:
ConfigurationProperty.cs
ソース:
ConfigurationProperty.cs
ソース:
ConfigurationProperty.cs

ConfigurationProperty クラスの新しいインスタンスを初期化します。

この API は製品インフラストラクチャをサポートします。コードから直接使用するものではありません。

public:
 ConfigurationProperty(System::String ^ name, Type ^ type, System::Object ^ defaultValue, System::ComponentModel::TypeConverter ^ typeConverter, System::Configuration::ConfigurationValidatorBase ^ validator, System::Configuration::ConfigurationPropertyOptions options, System::String ^ description);
public ConfigurationProperty (string name, Type type, object defaultValue, System.ComponentModel.TypeConverter typeConverter, System.Configuration.ConfigurationValidatorBase validator, System.Configuration.ConfigurationPropertyOptions options, string description);
new System.Configuration.ConfigurationProperty : string * Type * obj * System.ComponentModel.TypeConverter * System.Configuration.ConfigurationValidatorBase * System.Configuration.ConfigurationPropertyOptions * string -> System.Configuration.ConfigurationProperty
Public Sub New (name As String, type As Type, defaultValue As Object, typeConverter As TypeConverter, validator As ConfigurationValidatorBase, options As ConfigurationPropertyOptions, description As String)

パラメーター

name
String

構成エンティティの名前。

type
Type

構成エンティティの型。

defaultValue
Object

構成エンティティの既定値。

typeConverter
TypeConverter

適用するコンバーターの型。

validator
ConfigurationValidatorBase

使用する検証コントロール。

options
ConfigurationPropertyOptions

ConfigurationPropertyOptions 列挙値のいずれか。

description
String

構成エンティティの説明。

次のコード例は、コンストラクターを使用 ConfigurationProperty.ConfigurationProperty(String, Type, Object, TypeConverter, ConfigurationValidatorBase, ConfigurationPropertyOptions, String) して configuration-property オブジェクトをインスタンス化する方法を示しています。

// Initialize the _MaxIdleTime property
TimeSpan minTime = TimeSpan.FromSeconds(30);
TimeSpan maxTime = TimeSpan.FromMinutes(5);

ConfigurationValidatorBase _TimeSpanValidator =
    new TimeSpanValidator(minTime, maxTime, false);

_MaxIdleTime =
    new ConfigurationProperty("maxIdleTime",
    typeof(TimeSpan), TimeSpan.FromMinutes(5),
    TypeDescriptor.GetConverter(typeof(TimeSpan)),
    _TimeSpanValidator,
    ConfigurationPropertyOptions.IsRequired,
    "[Description:This is the max idle time.]");
' Initialize the _MaxIdleTime property
Dim minTime As TimeSpan = TimeSpan.FromSeconds(30)
Dim maxTime As TimeSpan = TimeSpan.FromMinutes(5)
Dim _TimeSpanValidator = _
    New TimeSpanValidator(minTime, maxTime, False)

_MaxIdleTime = New ConfigurationProperty( _
    "maxIdleTime", GetType(TimeSpan), _
    TimeSpan.FromMinutes(5), _
    TypeDescriptor.GetConverter(GetType(TimeSpan)), _
    _TimeSpanValidator, _
    ConfigurationPropertyOptions.IsRequired, _
    "[Description:This is the max idle time.]")

こちらもご覧ください

適用対象