Share via


ConfigurationProperty Oluşturucular

Tanım

ConfigurationProperty sınıfının yeni bir örneğini başlatır.

Aşırı Yüklemeler

ConfigurationProperty(String, Type)

Bu API, ürün altyapısını destekler ve doğrudan kodunuzdan kullanıma yönelik değildir.

ConfigurationProperty sınıfının yeni bir örneğini başlatır.

ConfigurationProperty(String, Type, Object)

Bu API, ürün altyapısını destekler ve doğrudan kodunuzdan kullanıma yönelik değildir.

ConfigurationProperty sınıfının yeni bir örneğini başlatır.

ConfigurationProperty(String, Type, Object, ConfigurationPropertyOptions)

Bu API, ürün altyapısını destekler ve doğrudan kodunuzdan kullanıma yönelik değildir.

ConfigurationProperty sınıfının yeni bir örneğini başlatır.

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

Bu API, ürün altyapısını destekler ve doğrudan kodunuzdan kullanıma yönelik değildir.

ConfigurationProperty sınıfının yeni bir örneğini başlatır.

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

Bu API, ürün altyapısını destekler ve doğrudan kodunuzdan kullanıma yönelik değildir.

ConfigurationProperty sınıfının yeni bir örneğini başlatır.

ConfigurationProperty(String, Type)

Kaynak:
ConfigurationProperty.cs
Kaynak:
ConfigurationProperty.cs
Kaynak:
ConfigurationProperty.cs

ConfigurationProperty sınıfının yeni bir örneğini başlatır.

Bu API, ürün altyapısını destekler ve doğrudan kodunuzdan kullanıma yönelik değildir.

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)

Parametreler

name
String

Yapılandırma varlığının adı.

type
Type

Yapılandırma varlığının türü.

Şunlara uygulanır

ConfigurationProperty(String, Type, Object)

Kaynak:
ConfigurationProperty.cs
Kaynak:
ConfigurationProperty.cs
Kaynak:
ConfigurationProperty.cs

ConfigurationProperty sınıfının yeni bir örneğini başlatır.

Bu API, ürün altyapısını destekler ve doğrudan kodunuzdan kullanıma yönelik değildir.

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)

Parametreler

name
String

Yapılandırma varlığının adı.

type
Type

Yapılandırma varlığının türü.

defaultValue
Object

Yapılandırma varlığının varsayılan değeri.

Örnekler

Aşağıdaki kod örneği, bir configuration-property nesnesinin örneğini oluşturmak için oluşturucunun ConfigurationProperty.ConfigurationProperty(String, Type, Object) nasıl kullanılacağını gösterir.

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

Açıklamalar

Bu oluşturucuyu kullanarak bir ConfigurationProperty nesne örneği oluşturduğunuzda ve IsKey özellikleri olarak falseIsRequired ayarlanır. Ayrıca, bu oluşturucuyla yapılan bir örnek varsayılan koleksiyon anahtarı özelliği olarak çalışmaz.

Ayrıca bkz.

Şunlara uygulanır

ConfigurationProperty(String, Type, Object, ConfigurationPropertyOptions)

Kaynak:
ConfigurationProperty.cs
Kaynak:
ConfigurationProperty.cs
Kaynak:
ConfigurationProperty.cs

ConfigurationProperty sınıfının yeni bir örneğini başlatır.

Bu API, ürün altyapısını destekler ve doğrudan kodunuzdan kullanıma yönelik değildir.

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)

Parametreler

name
String

Yapılandırma varlığının adı.

type
Type

Yapılandırma varlığının türü.

defaultValue
Object

Yapılandırma varlığının varsayılan değeri.

options
ConfigurationPropertyOptions

Numaralandırma değerlerinden ConfigurationPropertyOptions biri.

Örnekler

Aşağıdaki kod örneği, bir configuration-property nesnesinin örneğini oluşturmak için oluşturucunun nasıl kullanılacağını ConfigurationProperty.ConfigurationProperty(String, Type, Object, ConfigurationPropertyOptions) gösterir.

// 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)

Ayrıca bkz.

Şunlara uygulanır

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

Kaynak:
ConfigurationProperty.cs
Kaynak:
ConfigurationProperty.cs
Kaynak:
ConfigurationProperty.cs

ConfigurationProperty sınıfının yeni bir örneğini başlatır.

Bu API, ürün altyapısını destekler ve doğrudan kodunuzdan kullanıma yönelik değildir.

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)

Parametreler

name
String

Yapılandırma varlığının adı.

type
Type

Yapılandırma varlığının türü.

defaultValue
Object

Yapılandırma varlığının varsayılan değeri.

typeConverter
TypeConverter

Uygulanacak dönüştürücü türü.

validator
ConfigurationValidatorBase

Kullanılacak doğrulayıcı.

options
ConfigurationPropertyOptions

Numaralandırma değerlerinden ConfigurationPropertyOptions biri.

Örnekler

Aşağıdaki kod örneği, oluşturucuyu çağırırken ConfigurationProperty.ConfigurationProperty(String, Type, Object, TypeConverter, ConfigurationValidatorBase, ConfigurationPropertyOptions) kullanılacak parametre türünü gösterir.

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

Ayrıca bkz.

Şunlara uygulanır

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

Kaynak:
ConfigurationProperty.cs
Kaynak:
ConfigurationProperty.cs
Kaynak:
ConfigurationProperty.cs

ConfigurationProperty sınıfının yeni bir örneğini başlatır.

Bu API, ürün altyapısını destekler ve doğrudan kodunuzdan kullanıma yönelik değildir.

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)

Parametreler

name
String

Yapılandırma varlığının adı.

type
Type

Yapılandırma varlığının türü.

defaultValue
Object

Yapılandırma varlığının varsayılan değeri.

typeConverter
TypeConverter

Uygulanacak dönüştürücü türü.

validator
ConfigurationValidatorBase

Kullanılacak doğrulayıcı.

options
ConfigurationPropertyOptions

Numaralandırma değerlerinden ConfigurationPropertyOptions biri.

description
String

Yapılandırma varlığının açıklaması.

Örnekler

Aşağıdaki kod örneği, bir configuration-property nesnesinin örneğini oluşturmak için oluşturucunun ConfigurationProperty.ConfigurationProperty(String, Type, Object, TypeConverter, ConfigurationValidatorBase, ConfigurationPropertyOptions, String) nasıl kullanılacağını gösterir.

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

Ayrıca bkz.

Şunlara uygulanır