Class PropertyAccessor
- Namespace
- FluentCommand.Reflection
- Assembly
- FluentCommand.dll
An accessor class for PropertyInfo.
public class PropertyAccessor : MemberAccessor, IMemberAccessor, IMemberInformation, IEquatable<IMemberAccessor>
- Inheritance
-
PropertyAccessor
- Implements
- Inherited Members
Constructors
PropertyAccessor(PropertyInfo)
Initializes a new instance of the PropertyAccessor class.
public PropertyAccessor(PropertyInfo propertyInfo)
Parameters
propertyInfo
PropertyInfoThe PropertyInfo instance to use for this accessor.
Properties
HasGetter
Gets a value indicating whether this member has getter.
public override bool HasGetter { get; }
Property Value
- bool
true
if this member has getter; otherwise,false
.
HasSetter
Gets a value indicating whether this member has setter.
public override bool HasSetter { get; }
Property Value
- bool
true
if this member has setter; otherwise,false
.
MemberType
Gets the type of the member.
public override Type MemberType { get; }
Property Value
- Type
The type of the member.
Name
Gets the name of the member.
public override string Name { get; }
Property Value
- string
The name of the member.
Methods
GetValue(object)
Returns the value of the member.
public override object GetValue(object instance)
Parameters
instance
objectThe object whose member value will be returned.
Returns
- object
The member value for the instance parameter.
SetValue(object, object)
Sets the value of the member.
public override void SetValue(object instance, object value)