Заменил SetMaxCount на MaxCount
This commit is contained in:
parent
572648c859
commit
3d5e3f3cdc
@ -48,7 +48,7 @@ namespace ProjectLiner.CollectionGenericObjects
|
|||||||
_pictureWidth = picWidth;
|
_pictureWidth = picWidth;
|
||||||
_pictureHeight = picHeight;
|
_pictureHeight = picHeight;
|
||||||
_collection = collection;
|
_collection = collection;
|
||||||
_collection.SetMaxCount = GetMaxCount;
|
_collection.MaxCount = GetMaxCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -16,7 +16,21 @@ public class ListGenericObjects<T> : ICollectionGenericObjects<T>
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private int _maxCount;
|
private int _maxCount;
|
||||||
public int Count => _collection.Keys.Count;
|
public int Count => _collection.Keys.Count;
|
||||||
public int MaxCount { set { if (value > 0) { _maxCount = value; } } }
|
public int MaxCount
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _maxCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value > 0)
|
||||||
|
{
|
||||||
|
_maxCount = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public CollectionType GetCollectionType => CollectionType.List;
|
public CollectionType GetCollectionType => CollectionType.List;
|
||||||
|
|
||||||
|
@ -17,6 +17,11 @@ namespace ProjectLiner.CollectionGenericObjects
|
|||||||
|
|
||||||
public int MaxCount
|
public int MaxCount
|
||||||
{
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _collection.Length;
|
||||||
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value > 0)
|
if (value > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user