Struct ArrayProperty<TContainer, TElement>
Assembly: Unity.Properties.dll
Syntax
public struct ArrayProperty<TContainer, TElement> : ICollectionProperty<TContainer, TElement[]>, IProperty<TContainer, TElement[]>, IProperty
Type Parameters
| Name |
Description |
| TContainer |
|
| TElement |
|
Constructors
ArrayProperty(string, Getter, Setter, IPropertyAttributeCollection)
Declaration
public ArrayProperty(string name, ArrayProperty<TContainer, TElement>.Getter getter, ArrayProperty<TContainer, TElement>.Setter setter, IPropertyAttributeCollection attributes = null)
Parameters
Properties
Attributes
Returns the attributes for the given property.
Declaration
public readonly IPropertyAttributeCollection Attributes { get; }
Property Value
IsContainer
Gets a value indicating whether the value type is a container type.
Declaration
public bool IsContainer { get; }
Property Value
IsReadOnly
Gets a value indicating whether the property is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
Methods
Clear(ref TContainer)
Removes all elements from the collection.
Declaration
public void Clear(ref TContainer container)
Parameters
| Type |
Name |
Description |
| TContainer |
container |
|
GetCount(ref TContainer)
Gets the number of elements contained in the collection.
Declaration
public int GetCount(ref TContainer container)
Parameters
| Type |
Name |
Description |
| TContainer |
container |
|
Returns
GetName()
Gets the name of the property.
Declaration
Returns
GetPropertyAtIndex<TGetter>(ref TContainer, int, ref ChangeTracker, ref TGetter)
Gets the strongly typed element at the specified index.
Declaration
public void GetPropertyAtIndex<TGetter>(ref TContainer container, int index, ref ChangeTracker changeTracker, ref TGetter getter) where TGetter : ICollectionElementPropertyGetter<TContainer>
Parameters
| Type |
Name |
Description |
| TContainer |
container |
|
| int |
index |
|
| ChangeTracker |
changeTracker |
|
| TGetter |
getter |
|
Type Parameters
GetValue(ref TContainer)
Gets the property value for the given container.
Declaration
public TElement[] GetValue(ref TContainer container)
Parameters
| Type |
Name |
Description |
| TContainer |
container |
|
Returns
| Type |
Description |
| TElement[] |
|
SetCount(ref TContainer, int)
Sets the number of elements contained in the collection.
Declaration
public void SetCount(ref TContainer container, int count)
Parameters
| Type |
Name |
Description |
| TContainer |
container |
|
| int |
count |
|
SetValue(ref TContainer, TElement[])
Sets the property value for the given container.
Declaration
public void SetValue(ref TContainer container, TElement[] value)
Parameters
| Type |
Name |
Description |
| TContainer |
container |
|
| TElement[] |
value |
|
Implements