Show / Hide Table of Contents

Class ReflectionObjectValueProvider

Implementation of IGetsValueFromObject which uses reflection to get values from public properties, methods or fields of objects.

Inheritance
System.Object
ReflectionObjectValueProvider
Implements
IGetsValueFromObject
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ZptSharp.Expressions.PathExpressions
Assembly: ZptSharp.dll
Syntax
public class ReflectionObjectValueProvider : IGetsValueFromObject

Constructors

| Improve this Doc View Source

ReflectionObjectValueProvider(IGetsValueFromObject, IGetsValueFromReflection)

Initializes a new instance of the ReflectionObjectValueProvider class.

Declaration
public ReflectionObjectValueProvider(IGetsValueFromObject wrapped, IGetsValueFromReflection valueProvider)
Parameters
Type Name Description
IGetsValueFromObject wrapped

The wrapped service.

IGetsValueFromReflection valueProvider

The reflection value provider

Methods

| Improve this Doc View Source

TryGetValueAsync(String, Object, CancellationToken)

Attempts to get a value for a named reference, from the specified object.

This will return a value by using the getter of a property, or by executing a method (which takes no parameters) or by accessing a field (checking for members in this same order). Only public members will be considered.

Declaration
public Task<GetValueResult> TryGetValueAsync(string name, object object, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String name

The value name.

System.Object object

The object from which to retrieve the value.

System.Threading.CancellationToken cancellationToken

An optional cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<GetValueResult>

An object indicating whether a value was successfully retrieved or not, along with the retrieved value (if applicable).

Implements

IGetsValueFromObject
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX