ConfigurationProperty 생성자

정의

ConfigurationProperty 클래스의 새 인스턴스를 초기화합니다.

오버로드

Name Description
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 클래스의 새 인스턴스를 초기화합니다.

이 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 클래스의 새 인스턴스를 초기화합니다.

이 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) 인스턴스화 하려면 생성자를 사용 하는 방법을 보여 있습니다.

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

설명

이 생성자를 IsRequired 사용하여 개체를 ConfigurationProperty 인스턴스화하면 속성과 IsKey 속성이 .로 false설정됩니다. 또한 이 생성자로 만든 인스턴스는 기본 컬렉션 키 속성으로 작동하지 않습니다.

추가 정보

적용 대상

ConfigurationProperty(String, Type, Object, ConfigurationPropertyOptions)

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) 구성 속성 개체를 인스턴스화하는 방법을 보여 있습니다.

// 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 클래스의 새 인스턴스를 초기화합니다.

이 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 클래스의 새 인스턴스를 초기화합니다.

이 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) 인스턴스화 하려면 생성자를 사용 하는 방법을 보여 있습니다.

// 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.]")

추가 정보

적용 대상