Class ReflectedExternalMemberProperty<TContainer, TValue>
A ReflectedMemberProperty<TContainer, TValue> provides strongly typed access to an underlying FieldInfo or PropertyInfo object.
Inherited Members
Namespace: Unity.RuntimeSceneSerialization
Syntax
public class ReflectedExternalMemberProperty<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
ReflectedExternalMemberProperty(FieldInfo, String, String)
Initializes a new ReflectedMemberProperty<TContainer, TValue> instance for the specified FieldInfo.
Declaration
public ReflectedExternalMemberProperty(FieldInfo info, string name, string externalContainerType)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldInfo | info | The system reflection field info. |
| String | name | Use this name property--this might override the MemberInfo name |
| String | externalContainerType | The external type which should be wrapped, if any |
ReflectedExternalMemberProperty(PropertyInfo, String, String)
Initializes a new ReflectedMemberProperty<TContainer, TValue> instance for the specified PropertyInfo.
Declaration
public ReflectedExternalMemberProperty(PropertyInfo info, string name, string externalContainerType)
Parameters
| Type | Name | Description |
|---|---|---|
| PropertyInfo | info | The system reflection property info. |
| String | name | Use this name property--this might override the MemberInfo name |
| String | externalContainerType | The external type which should be wrapped, if any |
Properties
IsReadOnly
Declaration
public override bool IsReadOnly { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Overrides
Name
Declaration
public override string Name { get; }
Property Value
| Type | Description |
|---|---|
| String |
Overrides
Methods
GetValue(ref TContainer)
Declaration
public override TValue GetValue(ref TContainer container)
Parameters
| Type | Name | Description |
|---|---|---|
| TContainer | container |
Returns
| Type | Description |
|---|---|
| TValue |
Overrides
SetValue(ref TContainer, TValue)
Declaration
public override void SetValue(ref TContainer container, TValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| TContainer | container | |
| TValue | value |