C# 클래스 Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Helpers.ReflectionHelper

Methods related to reflection.
파일 보기 프로젝트 열기: Azure/azure-iot-remote-monitoring

공개 메소드들

메소드 설명
GetNamedPropertyValue ( object item, string propertyName, bool usesCaseSensitivePropertyNameMatch, bool exceptionThrownIfNoMatch ) : object

Gets the value of an item's named property.

ProducePropertyValueExtractor ( string propertyName, bool usesCaseSensitivePropertyNameMatch, bool exceptionThrownIfNoMatch ) : dynamic>.Func

Produces a Func for extracting a named property's value from a dynamic-typed item.

SetNamedPropertyValue ( ICustomTypeDescriptor item, object newValue, string propertyName, bool usesCaseSensitivePropertyNameMatch, bool exceptionThrownIfNoMatch ) : void
SetNamedPropertyValue ( object item, object newValue, string propertyName, bool usesCaseSensitivePropertyNameMatch, bool exceptionThrownIfNoMatch ) : void

Sets a named property's value.

ToKeyValuePairs ( this item ) : object>>.IEnumerable

Gets an IDynamicMetaObjectProvider implementation's properties and their values as an IEnumerable>.

비공개 메소드들

메소드 설명
GetNamedPropertyValue ( ICustomTypeDescriptor item, string propertyName, bool usesCaseSensitivePropertyNameMatch, bool exceptionThrownIfNoMatch ) : object

Gets the value of an ICustomTypeDescriptor implementation's named property.

GetNamedPropertyValue ( IDynamicMetaObjectProvider item, string propertyName, bool usesCaseSensitivePropertyNameMatch, bool exceptionThrownIfNoMatch ) : object

Gets the value of an IDynamicMetaObjectProvider implementation's named property.

ProduceGetMethodExtractor ( string propertyName, bool usesCaseSensitivePropertyNameMatch ) : MethodInfo>.Func
ToKeyValuePairImpl ( this item ) : object>>.IEnumerable

메소드 상세

GetNamedPropertyValue() 공개 정적인 메소드

Gets the value of an item's named property.
public static GetNamedPropertyValue ( object item, string propertyName, bool usesCaseSensitivePropertyNameMatch, bool exceptionThrownIfNoMatch ) : object
item object /// The item from which to extract a named property's value. ///
propertyName string /// The name of the property. ///
usesCaseSensitivePropertyNameMatch bool /// A value indicating whether the property name match should be /// case-sensitive. ///
exceptionThrownIfNoMatch bool /// A value indicating whether an exception should be thrown if /// no matching property can be found. ///
리턴 object

ProducePropertyValueExtractor() 공개 정적인 메소드

Produces a Func for extracting a named property's value from a dynamic-typed item.
public static ProducePropertyValueExtractor ( string propertyName, bool usesCaseSensitivePropertyNameMatch, bool exceptionThrownIfNoMatch ) : dynamic>.Func
propertyName string /// The name of the property. ///
usesCaseSensitivePropertyNameMatch bool /// A value indicating wether the property name match should be /// case-sensitive. ///
exceptionThrownIfNoMatch bool /// A value indicating whether the produced /// Func should throw an /// ArgumentException if no matching property can be /// found on the current item. ///
리턴 dynamic>.Func

SetNamedPropertyValue() 공개 정적인 메소드

public static SetNamedPropertyValue ( ICustomTypeDescriptor item, object newValue, string propertyName, bool usesCaseSensitivePropertyNameMatch, bool exceptionThrownIfNoMatch ) : void
item ICustomTypeDescriptor
newValue object
propertyName string
usesCaseSensitivePropertyNameMatch bool
exceptionThrownIfNoMatch bool
리턴 void

SetNamedPropertyValue() 공개 정적인 메소드

Sets a named property's value.
public static SetNamedPropertyValue ( object item, object newValue, string propertyName, bool usesCaseSensitivePropertyNameMatch, bool exceptionThrownIfNoMatch ) : void
item object /// The ICustomTypeDescriptor implementation on which /// to set a named property's value. ///
newValue object /// The value to assign to the named property. ///
propertyName string /// The name of the property to set. ///
usesCaseSensitivePropertyNameMatch bool /// A value indicating whether the property name matching should be /// case-sensitive. ///
exceptionThrownIfNoMatch bool /// A value indicating whether an ArgumentException /// should be thrown if no matching property can be found. ///
리턴 void

ToKeyValuePairs() 공개 정적인 메소드

Gets an IDynamicMetaObjectProvider implementation's properties and their values as an IEnumerable>.
public static ToKeyValuePairs ( this item ) : object>>.IEnumerable
item this /// The IDynamicMetaObjectProvider implementation. ///
리턴 object>>.IEnumerable