Initial Commit
This commit is contained in:
parent
53eb92e9af
commit
270ab7d11f
15341 changed files with 700234 additions and 0 deletions
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using Unity.Cloud.Collaborate.UserInterface;
|
||||
|
||||
namespace Unity.Cloud.Collaborate.Models
|
||||
{
|
||||
internal interface IModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Inform the presenter that the state of the model has changed.
|
||||
/// </summary>
|
||||
event Action StateChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Called when the model is started and the model should setup events and fetch data.
|
||||
/// </summary>
|
||||
void OnStart();
|
||||
|
||||
/// <summary>
|
||||
/// Called when the model should be stopped and data and events should closed.
|
||||
/// </summary>
|
||||
void OnStop();
|
||||
|
||||
/// <summary>
|
||||
/// Restores the state of the model from the provide cache. Must be called after OnStart.
|
||||
/// </summary>
|
||||
/// <param name="cache">Cache to read the state from.</param>
|
||||
void RestoreState([NotNull] IWindowCache cache);
|
||||
|
||||
/// <summary>
|
||||
/// Saves the state of the model into the cache. Must be called before OnStop.
|
||||
/// </summary>
|
||||
/// <param name="cache">Cache to save the state into.</param>
|
||||
void SaveState([NotNull] IWindowCache cache);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue