using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Torch.API.Managers;
namespace Torch.API.Session
{
///
/// Creates a manager for the given session if applicable.
///
///
/// This is for creating managers that will live inside the session, not the manager that controls sesssions.
///
/// The session to construct a bound manager for
/// The manager that will live in the session, or null if none.
public delegate IManager SessionManagerFactoryDel(ITorchSession session);
///
/// Fired when the given session has been completely loaded or is unloading.
///
/// The session
public delegate void TorchSessionLoadDel(ITorchSession session);
///
/// Manages the creation and destruction of instances for each created by Space Engineers.
///
public interface ITorchSessionManager : IManager
{
///
/// Fired when a has finished loading.
///
event TorchSessionLoadDel SessionLoaded;
///
/// Fired when a has begun unloading.
///
event TorchSessionLoadDel SessionUnloading;
///
/// The currently running session
///
ITorchSession CurrentSession { get; }
///
/// Adds the given factory as a supplier for session based managers
///
/// Session based manager supplier
/// true if added, false if already present
/// If the factory is null
bool AddFactory(SessionManagerFactoryDel factory);
///
/// Remove the given factory from the suppliers for session based managers
///
/// Session based manager supplier
/// true if removed, false if not present
/// If the factory is null
bool RemoveFactory(SessionManagerFactoryDel factory);
}
}