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

info PropertyInfo

Properties

Info

More detailed info about the property.

public PropertyInfo Info { get; }

Property Value

PropertyInfo

Type

The type of the value behind the property.

public Type Type { get; }

Property Value

Type

Methods

Get<T>(object)

Gets the value of this property in the current object obj.

public T? Get<T>(object obj)

Parameters

obj object

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

obj object
value T

Type Parameters

T