C# 클래스 ApplicationSettings.Internal.PropertyHelper

Helper methods for accessing property information.
파일 보기 프로젝트 열기: tparvi/appsettings

공개 메소드들

메소드 설명
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