Заменил SetMaxCount на MaxCount

This commit is contained in:
gettterot 2024-04-20 06:59:05 +04:00
parent 572648c859
commit 3d5e3f3cdc
3 changed files with 21 additions and 2 deletions

View File

@ -48,7 +48,7 @@ namespace ProjectLiner.CollectionGenericObjects
_pictureWidth = picWidth;
_pictureHeight = picHeight;
_collection = collection;
_collection.SetMaxCount = GetMaxCount;
_collection.MaxCount = GetMaxCount;
}
/// <summary>

View File

@ -16,7 +16,21 @@ public class ListGenericObjects<T> : ICollectionGenericObjects<T>
/// </summary>
private int _maxCount;
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;

View File

@ -17,6 +17,11 @@ namespace ProjectLiner.CollectionGenericObjects
public int MaxCount
{
get
{
return _collection.Length;
}
set
{
if (value > 0)