Class ReflectedMemberProperty<TContainer, TValue>
A ReflectedMemberProperty<TContainer, TValue> provides strongly typed access to an underlying
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, String)
Initializes a new ReflectedMemberProperty<TContainer, TValue> instance for the specified
Declaration
public ReflectedMemberProperty(FieldInfo info, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldInfo | info | The system reflection field info. |
| String | name | Use this name property--this might override the MemberInfo name |
ReflectedMemberProperty(PropertyInfo, String)
Initializes a new ReflectedMemberProperty<TContainer, TValue> instance for the specified
Declaration
public ReflectedMemberProperty(PropertyInfo info, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| PropertyInfo | info | The system reflection property info. |
| String | name | Use this name property--this might override the MemberInfo name |
Properties
IsReadOnly
Gets a value indicating whether the property is read-only or not.
Declaration
public override bool IsReadOnly { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Overrides
Name
Gets the name of the property.
Declaration
public override string Name { get; }
Property Value
| Type | Description |
|---|---|
| String |
Overrides
Methods
GetValue(ref TContainer)
Returns the property value of a specified container.
Declaration
public override TValue GetValue(ref TContainer container)
Parameters
| Type | Name | Description |
|---|---|---|
| TContainer | container | The container whose property value will be returned. |
Returns
| Type | Description |
|---|---|
| TValue | The property value of the given container. |
Overrides
SetValue(ref TContainer, TValue)
Sets the property value of a specified container.
Declaration
public override void SetValue(ref TContainer container, TValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| TContainer | container | The container whose property value will be set. |
| TValue | value | The new property value. |