using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
///
/// Define how to manage data.
///
public interface IDataManager
{
///
/// The data manager injected that know how to serialize the data.
///
The setter is actually public for testing purpose. It will be private after.
///
See:
///
IDataSerializer Serializer { get; }
///
/// The collection of all data. Each line of this dictionary has the type of the data as it key and the data for values.
///
Dictionary> Data { get; }
///
/// Load the data. Used to update data written in the save file.
///
See:
///
void LoadData();
///
/// Save the data. Call the Save method of the serializer.
///
See:
///
void SaveData();
///
/// Import data from a file.
///
See:
///
/// The type of data to import.
/// The path containing the name of the file created.
void Import(string pathOfTheFile) where T : class;
///
/// Export the data from the collection of data.
///
See:
///
/// The type of data to export
/// The object to export
/// The path containing the name of the file created.
void Export(T obj, string pathToExport) where T : class;
///
/// Get a list of an item in the data.
///
/// The type of the item
/// The list of all the item found in the data.
ICollection GetFromData() where T : class;
}
}