diff --git a/ProjectTank/ProjectTank/CollectionGenericObjects/.CollectionType.cs.swp b/ProjectTank/ProjectTank/CollectionGenericObjects/.CollectionType.cs.swp new file mode 100644 index 0000000..a66b189 Binary files /dev/null and b/ProjectTank/ProjectTank/CollectionGenericObjects/.CollectionType.cs.swp differ diff --git a/ProjectTank/ProjectTank/CollectionGenericObjects/.CollectionType_BASE_1418.cs.swp b/ProjectTank/ProjectTank/CollectionGenericObjects/.CollectionType_BASE_1418.cs.swp new file mode 100644 index 0000000..d624aeb Binary files /dev/null and b/ProjectTank/ProjectTank/CollectionGenericObjects/.CollectionType_BASE_1418.cs.swp differ diff --git a/ProjectTank/ProjectTank/CollectionGenericObjects/.CollectionType_LOCAL_1418.cs.swp b/ProjectTank/ProjectTank/CollectionGenericObjects/.CollectionType_LOCAL_1418.cs.swp new file mode 100644 index 0000000..88434f7 Binary files /dev/null and b/ProjectTank/ProjectTank/CollectionGenericObjects/.CollectionType_LOCAL_1418.cs.swp differ diff --git a/ProjectTank/ProjectTank/CollectionGenericObjects/.CollectionType_REMOTE_1418.cs.swp b/ProjectTank/ProjectTank/CollectionGenericObjects/.CollectionType_REMOTE_1418.cs.swp new file mode 100644 index 0000000..92fd602 Binary files /dev/null and b/ProjectTank/ProjectTank/CollectionGenericObjects/.CollectionType_REMOTE_1418.cs.swp differ diff --git a/ProjectTank/ProjectTank/CollectionGenericObjects/CollectionType_BACKUP_1418.cs b/ProjectTank/ProjectTank/CollectionGenericObjects/CollectionType_BACKUP_1418.cs new file mode 100644 index 0000000..9e5e365 --- /dev/null +++ b/ProjectTank/ProjectTank/CollectionGenericObjects/CollectionType_BACKUP_1418.cs @@ -0,0 +1,25 @@ +namespace ProjectTank.CollectionGenericObjects; +<<<<<<< HEAD +/// +/// Тип коллекции +/// +======= + +>>>>>>> d84f98706403d56e8dae185838815e23bb91f4d7 +public enum CollectionType +{ + /// + /// Неопределено + /// + None = 0, + + /// + /// Массив + /// + Massive = 1, + + /// + /// Список + /// + List = 2 +} \ No newline at end of file diff --git a/ProjectTank/ProjectTank/CollectionGenericObjects/CollectionType_BASE_1418.cs b/ProjectTank/ProjectTank/CollectionGenericObjects/CollectionType_BASE_1418.cs new file mode 100644 index 0000000..75d6067 --- /dev/null +++ b/ProjectTank/ProjectTank/CollectionGenericObjects/CollectionType_BASE_1418.cs @@ -0,0 +1,17 @@ +namespace ProjectLinkor.CollectionGenericObjects; + +public enum CollectionType +{ + /// + /// Неопределено + /// + None = 0, + /// + /// Массив + /// + Massive = 1, + /// + /// Список + /// + List = 2 +} \ No newline at end of file diff --git a/ProjectTank/ProjectTank/CollectionGenericObjects/CollectionType_LOCAL_1418.cs b/ProjectTank/ProjectTank/CollectionGenericObjects/CollectionType_LOCAL_1418.cs new file mode 100644 index 0000000..93d9dff --- /dev/null +++ b/ProjectTank/ProjectTank/CollectionGenericObjects/CollectionType_LOCAL_1418.cs @@ -0,0 +1,21 @@ +namespace ProjectTank.CollectionGenericObjects; +/// +/// Тип коллекции +/// +public enum CollectionType +{ + /// + /// Неопределено + /// + None = 0, + + /// + /// Массив + /// + Massive = 1, + + /// + /// Список + /// + List = 2 +} \ No newline at end of file diff --git a/ProjectTank/ProjectTank/CollectionGenericObjects/CollectionType_REMOTE_1418.cs b/ProjectTank/ProjectTank/CollectionGenericObjects/CollectionType_REMOTE_1418.cs new file mode 100644 index 0000000..f4bf31f --- /dev/null +++ b/ProjectTank/ProjectTank/CollectionGenericObjects/CollectionType_REMOTE_1418.cs @@ -0,0 +1,17 @@ +namespace ProjectTank.CollectionGenericObjects; + +public enum CollectionType +{ + /// + /// Неопределено + /// + None = 0, + /// + /// Массив + /// + Massive = 1, + /// + /// Список + /// + List = 2 +} \ No newline at end of file diff --git a/ProjectTank/ProjectTank/CollectionGenericObjects/StorageCollection_BACKUP_1588.cs b/ProjectTank/ProjectTank/CollectionGenericObjects/StorageCollection_BACKUP_1588.cs new file mode 100644 index 0000000..24dd440 --- /dev/null +++ b/ProjectTank/ProjectTank/CollectionGenericObjects/StorageCollection_BACKUP_1588.cs @@ -0,0 +1,83 @@ +<<<<<<< HEAD + +======= +using ProjectLinkor.CollectionGenericObjects; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +>>>>>>> parent of 5665ee3 (fix) +namespace ProjectTank.CollectionGenericObjects +{ + public class StorageCollection + where T : class + { + /// + /// Словарь (хранилище) с коллекциями + /// + readonly Dictionary> _storages; + /// + /// Возвращение списка названий коллекций + /// + public List Keys => _storages.Keys.ToList(); + /// + /// Конструктор + /// + public StorageCollection() + { + _storages = new Dictionary>(); + } + /// + /// Добавление коллекции в хранилище + /// + /// Название коллекции + /// тип коллекции + public void AddCollection(string name, CollectionType collectionType) + { + // TODO проверка, что name не пустой и нет в словаре записи с таким ключом + // TODO Прописать логику для добавления + if (name == null || _storages.ContainsKey(name)) + return; + switch (collectionType) + { + case CollectionType.None: + return; + case CollectionType.Massive: + _storages[name] = new MassiveGenericObjects(); + return; + case CollectionType.List: + _storages[name] = new ListGenericObjects(); + return; + } + + } + /// + /// Удаление коллекции + /// + /// Название коллекции + public void DelCollection(string name) + { + // TODO Прописать логику для удаления коллекции + if (_storages.ContainsKey(name)) + _storages.Remove(name); + } + /// + /// Доступ к коллекции + /// + /// Название коллекции + /// + public ICollectionGenericObjects? this[string name] + { + get + { + // TODO Продумать логику получения объекта + if (name == null || !_storages.ContainsKey(name)) + return null; + return _storages[name]; + } + } + + } +} diff --git a/ProjectTank/ProjectTank/CollectionGenericObjects/StorageCollection_BASE_1588.cs b/ProjectTank/ProjectTank/CollectionGenericObjects/StorageCollection_BASE_1588.cs new file mode 100644 index 0000000..4345763 --- /dev/null +++ b/ProjectTank/ProjectTank/CollectionGenericObjects/StorageCollection_BASE_1588.cs @@ -0,0 +1,75 @@ +using ProjectLinkor.CollectionGenericObjects; + + +namespace ProjectTank.CollectionGenericObjects +{ + public class StorageCollection + where T : class + { + /// + /// Словарь (хранилище) с коллекциями + /// + readonly Dictionary> _storages; + /// + /// Возвращение списка названий коллекций + /// + public List Keys => _storages.Keys.ToList(); + /// + /// Конструктор + /// + public StorageCollection() + { + _storages = new Dictionary>(); + } + /// + /// Добавление коллекции в хранилище + /// + /// Название коллекции + /// тип коллекции + public void AddCollection(string name, CollectionType collectionType) + { + // TODO проверка, что name не пустой и нет в словаре записи с таким ключом + // TODO Прописать логику для добавления + if (name == null || _storages.ContainsKey(name)) + return; + switch (collectionType) + { + case CollectionType.None: + return; + case CollectionType.Massive: + _storages[name] = new MassiveGenericObjects(); + return; + case CollectionType.List: + _storages[name] = new ListGenericObjects(); + return; + } + + } + /// + /// Удаление коллекции + /// + /// Название коллекции + public void DelCollection(string name) + { + // TODO Прописать логику для удаления коллекции + if (_storages.ContainsKey(name)) + _storages.Remove(name); + } + /// + /// Доступ к коллекции + /// + /// Название коллекции + /// + public ICollectionGenericObjects? this[string name] + { + get + { + // TODO Продумать логику получения объекта + if (name == null || !_storages.ContainsKey(name)) + return null; + return _storages[name]; + } + } + + } +} diff --git a/ProjectTank/ProjectTank/CollectionGenericObjects/StorageCollection_LOCAL_1588.cs b/ProjectTank/ProjectTank/CollectionGenericObjects/StorageCollection_LOCAL_1588.cs new file mode 100644 index 0000000..6b0bc15 --- /dev/null +++ b/ProjectTank/ProjectTank/CollectionGenericObjects/StorageCollection_LOCAL_1588.cs @@ -0,0 +1,73 @@ + +namespace ProjectTank.CollectionGenericObjects +{ + public class StorageCollection + where T : class + { + /// + /// Словарь (хранилище) с коллекциями + /// + readonly Dictionary> _storages; + /// + /// Возвращение списка названий коллекций + /// + public List Keys => _storages.Keys.ToList(); + /// + /// Конструктор + /// + public StorageCollection() + { + _storages = new Dictionary>(); + } + /// + /// Добавление коллекции в хранилище + /// + /// Название коллекции + /// тип коллекции + public void AddCollection(string name, CollectionType collectionType) + { + // TODO проверка, что name не пустой и нет в словаре записи с таким ключом + // TODO Прописать логику для добавления + if (name == null || _storages.ContainsKey(name)) + return; + switch (collectionType) + { + case CollectionType.None: + return; + case CollectionType.Massive: + _storages[name] = new MassiveGenericObjects(); + return; + case CollectionType.List: + _storages[name] = new ListGenericObjects(); + return; + } + + } + /// + /// Удаление коллекции + /// + /// Название коллекции + public void DelCollection(string name) + { + // TODO Прописать логику для удаления коллекции + if (_storages.ContainsKey(name)) + _storages.Remove(name); + } + /// + /// Доступ к коллекции + /// + /// Название коллекции + /// + public ICollectionGenericObjects? this[string name] + { + get + { + // TODO Продумать логику получения объекта + if (name == null || !_storages.ContainsKey(name)) + return null; + return _storages[name]; + } + } + + } +} diff --git a/ProjectTank/ProjectTank/CollectionGenericObjects/StorageCollection_REMOTE_1588.cs b/ProjectTank/ProjectTank/CollectionGenericObjects/StorageCollection_REMOTE_1588.cs new file mode 100644 index 0000000..368bdcb --- /dev/null +++ b/ProjectTank/ProjectTank/CollectionGenericObjects/StorageCollection_REMOTE_1588.cs @@ -0,0 +1,79 @@ +using ProjectLinkor.CollectionGenericObjects; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTank.CollectionGenericObjects +{ + public class StorageCollection + where T : class + { + /// + /// Словарь (хранилище) с коллекциями + /// + readonly Dictionary> _storages; + /// + /// Возвращение списка названий коллекций + /// + public List Keys => _storages.Keys.ToList(); + /// + /// Конструктор + /// + public StorageCollection() + { + _storages = new Dictionary>(); + } + /// + /// Добавление коллекции в хранилище + /// + /// Название коллекции + /// тип коллекции + public void AddCollection(string name, CollectionType collectionType) + { + // TODO проверка, что name не пустой и нет в словаре записи с таким ключом + // TODO Прописать логику для добавления + if (name == null || _storages.ContainsKey(name)) + return; + switch (collectionType) + { + case CollectionType.None: + return; + case CollectionType.Massive: + _storages[name] = new MassiveGenericObjects(); + return; + case CollectionType.List: + _storages[name] = new ListGenericObjects(); + return; + } + + } + /// + /// Удаление коллекции + /// + /// Название коллекции + public void DelCollection(string name) + { + // TODO Прописать логику для удаления коллекции + if (_storages.ContainsKey(name)) + _storages.Remove(name); + } + /// + /// Доступ к коллекции + /// + /// Название коллекции + /// + public ICollectionGenericObjects? this[string name] + { + get + { + // TODO Продумать логику получения объекта + if (name == null || !_storages.ContainsKey(name)) + return null; + return _storages[name]; + } + } + + } +}