Class ListPropertyBag<TElement>
A IPropertyBag<TContainer> implementation for a List<T> type.
Inheritance
PropertyBag<List<TElement>>
IndexedCollectionPropertyBag<List<TElement>, TElement>
ListPropertyBag<TElement>
Inherited Members
Namespace: Unity.Properties
Syntax
public class ListPropertyBag<TElement> : IndexedCollectionPropertyBag<List<TElement>, TElement>, IPropertyBagRegister, IConstructor<List<TElement>>, IListPropertyBag<List<TElement>, TElement>, ICollectionPropertyBag<List<TElement>, TElement>, IPropertyBag<List<TElement>>, IPropertyBag, ICollectionPropertyBagAccept<List<TElement>>, IListPropertyBagAccept<List<TElement>>, IListPropertyAccept<List<TElement>>, IIndexedProperties<List<TElement>>, IConstructorWithCount<List<TElement>>, IConstructor, IIndexedCollectionPropertyBagEnumerator<List<TElement>>
Type Parameters
Name | Description |
---|---|
TElement | The element type. |
Properties
InstantiationKind
Implement this property and return true to provide custom type instantiation for the container type.
Declaration
protected override InstantiationKind InstantiationKind { get; }
Property Value
Type | Description |
---|---|
InstantiationKind |
Overrides
Unity.Properties.PropertyBag<System.Collections.Generic.List<TElement>>.InstantiationKind
Methods
Instantiate()
Implement this method to provide custom type instantiation for the container type.
Declaration
protected override List<TElement> Instantiate()
Returns
Type | Description |
---|---|
List<TElement> | A new instance of |
Overrides
Unity.Properties.PropertyBag<System.Collections.Generic.List<TElement>>.Instantiate()
Remarks
You MUST also override InstantiationKind to return langword_csharp_ConstructionType.PropertyBagOverride for this method to be called.
InstantiateWithCount(Int32)
Implement this method to provide custom type instantiation with a count value for the container type.
Declaration
protected override List<TElement> InstantiateWithCount(int count)
Parameters
Type | Name | Description |
---|---|---|
Int32 | count | The requested capacity. |
Returns
Type | Description |
---|---|
List<TElement> | A new instance of |
Overrides
Unity.Properties.IndexedCollectionPropertyBag<System.Collections.Generic.List<TElement>, TElement>.InstantiateWithCount(System.Int32)
Remarks
You MUST also override InstantiationKind to return langword_csharp_ConstructionType.PropertyBagOverride for this method to be called.