2017-04-12 17:08:54 +02:00
|
|
|
|
using SweetLib.Utils.Logger.Message;
|
|
|
|
|
|
|
|
|
|
namespace SweetLib.Utils.Logger.Memory
|
|
|
|
|
{
|
2017-04-16 18:07:30 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interface for a class to store and proceed <see cref="LogMessage"/> objects.
|
|
|
|
|
/// </summary>
|
2017-04-12 17:08:54 +02:00
|
|
|
|
public interface ILogMemory
|
|
|
|
|
{
|
2017-04-16 18:07:30 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Adds a <see cref="message"/> into the <see cref="ILogMemory"/>.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="message"><see cref="LogMessage"/> to be stored.</param>
|
2017-04-12 17:08:54 +02:00
|
|
|
|
void Remember(LogMessage message);
|
2017-04-12 17:12:35 +02:00
|
|
|
|
|
2017-04-16 18:07:30 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Removes a <see cref="message"/> from the <see cref="ILogMemory"/>.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="message"><see cref="LogMessage"/> to be removed.</param>
|
|
|
|
|
/// <remarks>This might not have any effect depending on the <see cref="ILogMemory"/> implementation.</remarks>
|
2017-04-12 17:08:54 +02:00
|
|
|
|
void Forget(LogMessage message);
|
2017-04-12 17:12:35 +02:00
|
|
|
|
|
2017-04-16 18:07:30 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Saves all remembered <see cref="LogMessage"/> objects into a persistent file.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="fullFileName">File name to store the <see cref="LogMessage"/> objects.</param>
|
2017-04-12 17:08:54 +02:00
|
|
|
|
void Archive(string fullFileName);
|
|
|
|
|
}
|
|
|
|
|
}
|