Interface IProperty<TContainer>
Base interface for working with properties.
Inherited Members
Namespace: Unity.Properties
Syntax
public interface IProperty<TContainer> : IProperty
Type Parameters
Name | Description |
---|---|
TContainer | The container type this property operates on. |
Remarks
This is used to pass or store properties without knowing the underlying value type.
Methods
GetValue(ref TContainer)
Returns the property value of a specified container.
Declaration
object GetValue(ref TContainer container)
Parameters
Type | Name | Description |
---|---|---|
TContainer | container | The container whose property value will be returned. |
Returns
Type | Description |
---|---|
Object | The property value of the given container. |
TrySetValue(ref TContainer, Object)
Sets the property value of a specified container.
Declaration
bool TrySetValue(ref TContainer container, object value)
Parameters
Type | Name | Description |
---|---|---|
TContainer | container | The container whose property value will be set. |
Object | value | The new property value. |
Returns
Type | Description |
---|---|
Boolean | true if the value was set; otherwise, false. |