Struct ListProperty<TContainer, TElement>
Assembly: Unity.Properties.dll
Syntax
public struct ListProperty<TContainer, TElement> : ICollectionProperty<TContainer, IList<TElement>>, IProperty<TContainer, IList<TElement>>, IProperty
Type Parameters
| Name |
Description |
| TContainer |
|
| TElement |
|
Constructors
ListProperty(string, Getter, Setter, IPropertyAttributeCollection)
Declaration
public ListProperty(string name, ListProperty<TContainer, TElement>.Getter getter, ListProperty<TContainer, TElement>.Setter setter, IPropertyAttributeCollection attributes = null)
Parameters
Properties
Attributes
Returns the attributes for the given property.
Declaration
public 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 IList<TElement> GetValue(ref TContainer container)
Parameters
| Type |
Name |
Description |
| TContainer |
container |
|
Returns
| Type |
Description |
| IList<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, IList<TElement>)
Sets the property value for the given container.
Declaration
public void SetValue(ref TContainer container, IList<TElement> value)
Parameters
| Type |
Name |
Description |
| TContainer |
container |
|
| IList<TElement> |
value |
|
Implements