Class ReflectedMemberProperty<TContainer, TValue>
A ReflectedMemberProperty<TContainer, TValue> provides strongly typed access to an underlying FieldInfo or PropertyInfo object.
Inherited Members
Namespace: Unity.Properties
Syntax
public class ReflectedMemberProperty<TContainer, TValue> : Property<TContainer, TValue>, IProperty<TContainer>, IProperty, IPropertyAccept<TContainer>, IAttributes
Type Parameters
| Name | Description |
|---|---|
| TContainer | The container type for this property. |
| TValue | The value type for this property. |
Remarks
The implementation uses slow reflection calls internally. This is intended to be used as an intermediate solution for quick editor iteration.
Constructors
ReflectedMemberProperty(FieldInfo)
Initializes a new ReflectedMemberProperty<TContainer, TValue> instance for the specified FieldInfo.
Declaration
public ReflectedMemberProperty(FieldInfo info)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldInfo | info | The system reflection field info. |
ReflectedMemberProperty(PropertyInfo)
Initializes a new ReflectedMemberProperty<TContainer, TValue> instance for the specified PropertyInfo.
Declaration
public ReflectedMemberProperty(PropertyInfo info)
Parameters
| Type | Name | Description |
|---|---|---|
| PropertyInfo | info | The system reflection property info. |
Properties
IsReadOnly
Declaration
public override bool IsReadOnly { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Overrides
Unity.Properties.Property<TContainer, TValue>.IsReadOnly
Name
Declaration
public override string Name { get; }
Property Value
| Type | Description |
|---|---|
| String |
Overrides
Unity.Properties.Property<TContainer, TValue>.Name
Methods
GetValue(ref TContainer)
Declaration
public override TValue GetValue(ref TContainer container)
Parameters
| Type | Name | Description |
|---|---|---|
| TContainer | container |
Returns
| Type | Description |
|---|---|
| TValue |
Overrides
Unity.Properties.Property<TContainer, TValue>.GetValue(TContainer)
SetValue(ref TContainer, TValue)
Declaration
public override void SetValue(ref TContainer container, TValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| TContainer | container | |
| TValue | value |
Overrides
Unity.Properties.Property<TContainer, TValue>.SetValue(TContainer, TValue)