C# Класс ApplicationSettings.Internal.PropertyHelper

Helper methods for accessing property information.
Показать файл Открыть проект

Открытые методы

Метод Описание
CanReadFrom ( PropertyInfo propertyInfo ) : bool
CanWriteInto ( PropertyInfo propertyInfo ) : bool

Checks if property can be written into. If the property is read only or it is ignored then we cannot write into it.

GetFormatProvider ( PropertyInfo propertyInfo ) : IFormatProvider

Gtes the format provider for the property. If property contains SettingPropertyAttribute then it's SettingPropertyAttribute.CultureName is used. Otherwise CultureInfo.InvariantCulture is returned.

GetPropertyValue ( object instance, PropertyInfo propertyInfo, IFormatProvider formatProvider ) : string

Gets the value of the property.

GetSettingName ( PropertyInfo propertyInfo ) : string

Gets the name of the setting for the property. If property contains SettingPropertyAttribute then it is used. Otherwise property's name is returned.

IsConnectionString ( PropertyInfo propertyInfo ) : bool

Checks if the property is actually defined as connection string.

Описание методов

CanReadFrom() публичный статический Метод

public static CanReadFrom ( PropertyInfo propertyInfo ) : bool
propertyInfo System.Reflection.PropertyInfo
Результат bool

CanWriteInto() публичный статический Метод

Checks if property can be written into. If the property is read only or it is ignored then we cannot write into it.
public static CanWriteInto ( PropertyInfo propertyInfo ) : bool
propertyInfo System.Reflection.PropertyInfo /// The property info. ///
Результат bool

GetFormatProvider() публичный статический Метод

Gtes the format provider for the property. If property contains SettingPropertyAttribute then it's SettingPropertyAttribute.CultureName is used. Otherwise CultureInfo.InvariantCulture is returned.
public static GetFormatProvider ( PropertyInfo propertyInfo ) : IFormatProvider
propertyInfo System.Reflection.PropertyInfo /// The property info. ///
Результат IFormatProvider

GetPropertyValue() публичный статический Метод

Gets the value of the property.
public static GetPropertyValue ( object instance, PropertyInfo propertyInfo, IFormatProvider formatProvider ) : string
instance object Object from which the property is returned.
propertyInfo System.Reflection.PropertyInfo The property.
formatProvider IFormatProvider Format provider.
Результат string

GetSettingName() публичный статический Метод

Gets the name of the setting for the property. If property contains SettingPropertyAttribute then it is used. Otherwise property's name is returned.
public static GetSettingName ( PropertyInfo propertyInfo ) : string
propertyInfo System.Reflection.PropertyInfo /// The property info. ///
Результат string

IsConnectionString() публичный статический Метод

Checks if the property is actually defined as connection string.
public static IsConnectionString ( PropertyInfo propertyInfo ) : bool
propertyInfo System.Reflection.PropertyInfo The property info.
Результат bool