C# Класс Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Helpers.ReflectionHelper

Methods related to reflection.
Показать файл Открыть проект

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

Метод Описание
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