Class PropertyWrapper
- Namespace
- Elegy.Common.Reflection
- Assembly
- Elegy.Common.dll
Utility to easily interact with C# properties.
public class PropertyWrapper : MemberWrapper
- Inheritance
-
PropertyWrapper
- Inherited Members
Constructors
PropertyWrapper(PropertyInfo)
Constructs a PropertyWrapper from the given info,
caching its metadata.
public PropertyWrapper(PropertyInfo info)
Parameters
infoPropertyInfo
Properties
Info
More detailed info about the property.
public PropertyInfo Info { get; }
Property Value
Type
The type of the value behind the property.
public Type Type { get; }
Property Value
Methods
Get<T>(object)
Gets the value of this property in the current object obj.
public T? Get<T>(object obj)
Parameters
objobject
Returns
- T
Type Parameters
T
Set<T>(object, T)
Sets the value of this property in the current object obj.
public void Set<T>(object obj, T value)
Parameters
objobjectvalueT
Type Parameters
T