Profiles - Dispose WIP

This commit is contained in:
SpoinkyNL committed 2020-08-09 22:34:45 +02:00
1 parent 1f70c65651
commit c0bdd8cf26
26 files changed
+246 -105

No files matched your search

@@ -7,19 +7,50 @@ namespace Artemis.Core.Services.Storage.Interfaces
{
public interface IProfileService : IArtemisService
{
void ActivateDefaultProfiles();
Profile CreateProfile(ProfileModule module, string name);
List<Profile> GetProfiles(ProfileModule module);
Profile GetActiveProfile(ProfileModule module);
/// <summary>
/// Activates the last profile for each module
/// </summary>
void ActivateLastActiveProfiles();
/// <summary>
/// Creates a new profile for the given module and returns a descriptor pointing to it
/// </summary>
/// <param name="module">The profile module to create the profile for</param>
/// <param name="name">The name of the new profile</param>
/// <returns></returns>
ProfileDescriptor CreateProfile(ProfileModule module, string name);
/// <summary>
/// Gets a descriptor for each profile stored for the given <see cref="ProfileModule" />
/// </summary>
/// <param name="module">The module to return profile descriptors for</param>
/// <returns></returns>
List<ProfileDescriptor> GetProfiles(ProfileModule module);
/// <summary>
/// Writes the profile to persistent storage
/// </summary>
/// <param name="profile"></param>
/// <param name="includeChildren"></param>
void UpdateProfile(Profile profile, bool includeChildren);
/// <summary>
/// Disposes and permanently deletes the provided profile
/// </summary>
/// <param name="profile">The profile to delete</param>
void DeleteProfile(Profile profile);
/// <summary>
/// Activates the profile for the given <see cref="ProfileModule" /> with the currently active surface
/// Activates the profile described in the given <see cref="ProfileDescriptor" /> with the currently active surface
/// </summary>
/// <param name="module">The module to activate the profile for</param>
/// <param name="profile">The profile to activate</param>
void ActivateProfile(ProfileModule module, Profile profile);
/// <param name="profileDescriptor">The descriptor describing the profile to activate</param>
Profile ActivateProfile(ProfileDescriptor profileDescriptor);
/// <summary>
/// Clears the active profile on the given <see cref="ProfileModule" />
/// </summary>
/// <param name="module">The profile module to deactivate the active profile on</param>
void ClearActiveProfile(ProfileModule module);
/// <summary>
/// Attempts to restore the profile to the state it had before the last <see cref="UpdateProfile" /> call.